Skip to main content

ThirdwebSDK.getContractFromAbi() method

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Get an instance of a Custom contract from a json ABI

Signature:

getContractFromAbi(address: string, abi: ContractInterface): SmartContract<ethers.BaseContract>;

Parameters

ParameterTypeDescription
addressstringthe address of the deployed contract
abiContractInterfacethe JSON abi

Returns:

SmartContract<ethers.BaseContract>

the contract