Skip to main content

Function: getContract()

getContract(params)

function getContract<A, C, W>(params): object

Type Parameters

Type Parameter

A extends any

C extends PublicClient

W extends WalletInterface

Parameters

ParameterType

params

object

params.abi

A

params.address

Address

params.client

C

params.wallet

W

Returns

object

read

read: A extends Abi ? ReadContractsMethod<A, "view" | "pure"> : CommonReadContractMethods;

write

write: A extends Abi ? WriteContractsMethod<A, "payable" | "nonpayable"> : CommonWriteContractMethods;

Defined

@nilfoundation/niljs/src/contract-factory/ContractFactory.ts:493

getContract(params)

function getContract<A, C>(params): object

Type Parameters

Type Parameter

A extends any

C extends PublicClient

Parameters

ParameterType

params

object

params.abi

A

params.address

Address

params.client

C

Returns

object

read

read: A extends Abi ? ReadContractsMethod<A, "view" | "pure"> : CommonReadContractMethods;

Defined

@nilfoundation/niljs/src/contract-factory/ContractFactory.ts:504