CreateContract
CreateContract: <
TName
,THumanReadableAbi
>({ name, humanReadableAbi, }
) =>Contract
<TName
,THumanReadableAbi
>
Type of createContract
factory function
Creates a tevm Contract instance from human readable abi
Example
import { type Contract, createContract} from 'tevm/contract'
const contract: Contract = createContract({ name: 'MyContract', abi: [ ... ],})
To use a json abi first pass it into formatAbi
to turn it into human readable
Example
import { type Contract, createContract} from 'tevm/contract'
const contract = createContract({ name: 'MyContract', abi: [ ... ],})
Type parameters
▪ TName extends string
▪ THumanReadableAbi extends readonly string
[]
Parameters
▪ {
name,
humanReadableAbi,
}: CreateContractParams
<TName
, THumanReadableAbi
>
Source
packages/contract/src/types.ts:41
Generated using typedoc-plugin-markdown and TypeDoc