- useContract(abi?, address?): {
address: undefined | string | AccountId;
contract: undefined | ContractPromise;
} Parameters
Optional
abi: string | Record<string, unknown> | AbiOptional
address: string | AccountId
Returns {
address: undefined | string | AccountId;
contract: undefined | ContractPromise;
}
address: undefined | string | AccountId
contract: undefined | ContractPromise
React Hook that returns a
ContractPromise
object configured with the active api & chain as well as the givenabi
andaddress
.