tevmContract
tevmContract<
TAbi
,TFunctionName
>(client
,params
):Promise
<ContractResult
<TAbi
,TFunctionName
>>
A tree-shakeable version of the tevmContract
action for viem.
Interacts with a contract method call using TEVM.
Internally, tevmContract
wraps tevmCall
. It automatically encodes and decodes the contract call parameters and results, as well as any revert messages.
Type Parameters
• TAbi extends readonly unknown
[] | Abi
= Abi
• TFunctionName extends string
= ContractFunctionName
<TAbi
>
Parameters
• client: Client
<TevmTransport
<string
>>
• params: ContractParams
<TAbi
, TFunctionName
>
Returns
Promise
<ContractResult
<TAbi
, TFunctionName
>>
Example
See
- ContractParams for options reference.
- ContractResult for return values reference.
- BaseCallParams for the base call parameters.
- TEVM Actions Guide