CreateContractFn
CreateContractFn: <
TName
,TAbi
,TAddress
,TBytecode
,TDeployedBytecode
,TCode
,THumanReadableAbi
>({ name, humanReadableAbi, bytecode, deployedBytecode, code, }
) =>Contract
<TName
,THumanReadableAbi
,TAddress
,TBytecode
,TDeployedBytecode
,TCode
>
Type of createContract
factory function
Creates a tevm Contract instance from human readable abi
Examples
To use a json abi first pass it into formatAbi
to turn it into human readable
Type Parameters
• TName extends string
• TAbi extends readonly string
[] | Abi
• TAddress extends undefined
| Address
= undefined
• TBytecode extends undefined
| Hex
= undefined
• TDeployedBytecode extends undefined
| Hex
= undefined
• TCode extends undefined
| Hex
= undefined
• THumanReadableAbi extends readonly string
[] = TAbi
extends readonly string
[] ? TAbi
: TAbi
extends Abi
? FormatAbi
<TAbi
> : never
Parameters
• {
name,
humanReadableAbi,
bytecode,
deployedBytecode,
code,
}: CreateContractParams
<TName
, TAbi
, TAddress
, TBytecode
, TDeployedBytecode
, TCode
>
Returns
Contract
<TName
, THumanReadableAbi
, TAddress
, TBytecode
, TDeployedBytecode
, TCode
>