Docs

readContract

Reads data from a smart contract.

Example

import { readContract } from "thirdweb";
const result = await readContract({
contract,
method: "function totalSupply() view returns (uint256)",
});

Parameters

Returns

A promise that resolves with the result of the read transaction.