ThirdwebContract

ThirdwebContract is a wrapper around any EVM-compatible smart contract. It allows you to interact with the contract's functions easily, as well as prepare transactions.

Instantiating a ThirdwebContract

var contract = await ThirdwebManager.Instance.GetContract(address: "contract-address", chainId: 1, abi: "optional-abi");

That's it! You can now interact with the contract using the ThirdwebContract.

It contains Read, Write and Prepare methods to respectively read contract state, write to the contract and prepare transactions.

Furthermore, it contains shorthands such as ThirdwebContract.ERC20_BalanceOf to easily interact with common contract interfaces.

Interact with Smart Contracts