class Contract
class Contract
: public Thirdweb.Routable
Convenient wrapper to interact with any EVM contract
Summary
Members | Type | Descriptions |
---|---|---|
chain | variable | |
address | variable | |
abi | variable | |
ERC20 | variable | Call any ERC20 supported functions |
ERC721 | variable | Call any ERC721 supported functions |
ERC1155 | variable | Call any ERC1155 supported functions |
marketplace | variable | Call any Marketplace supported functions |
pack | variable | Call any Pack supported functions |
Contract | function | |
GetBalance | function | |
Read< T > | function | Read data from a contract |
Write | function | Execute a write transaction on a contract |
Write | function | Execute a write transaction on a contract |
Members
public string
chain
public string
address
public string
abi
Call any ERC20 supported functions
Call any ERC721 supported functions
Call any ERC1155 supported functions
public
Marketplace
marketplace
Call any Marketplace supported functions
Call any Pack supported functions
public inline
Contract
(string chain,string address,string abi)
public inline async Task<
CurrencyValue
>
GetBalance
()
public inline async Task< T >
Read< T >
(string functionName,params object[] args)
Read data from a contract
Parameters
functionName
The contract function name to callargs
Optional function arguments. Structs and Lists will get serialized automatically
Returns
The data deserialized to the given typed
public inline Task<
TransactionResult
>
Write
(string functionName,params object[] args)
Execute a write transaction on a contract
Parameters
functionName
The contract function name to callargs
Optional function arguments. Structs and Lists will get serialized automatically
Returns
The transaction receipt
public inline async Task<
TransactionResult
>
Write
(string functionName,
TransactionRequest
? transactionOverrides,params object[] args)
Execute a write transaction on a contract
Parameters
functionName
The contract function name to calltransactionOverrides
Overrides to pass with the transactionargs
Optional function arguments. Structs and Lists will get serialized automatically
Returns
The transaction receipt