TevmContract
TevmContract: <
TAbi
,TFunctionName
>(client
,params
) =>Promise
<ContractResult
<TAbi
,TFunctionName
>>
A type representing the handler for a TEVM contract procedure.
This type reuses the viem contractRead
/contractWrite
API to encode ABI, function name, and arguments.
Type Parameters
• TAbi extends Abi
| readonly unknown
[] = Abi
The ABI of the contract.
• TFunctionName extends ContractFunctionName
<TAbi
> = ContractFunctionName
<TAbi
>
The name of the contract function.
Parameters
• client: Client
<TevmTransport
<string
>>
The viem client configured with TEVM transport.
• params: ContractParams
<TAbi
, TFunctionName
>
Parameters for the contract method call, including ABI, function name, and arguments.
Returns
Promise
<ContractResult
<TAbi
, TFunctionName
>>
The result of the contract method call.
Example
See
- ContractParams for options reference.
- ContractResult for return values reference.
- BaseCallParams for the base call parameters.