Docs

readContract

Reads data from a smart contract.

Example

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

Parameters

Returns

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