useContract
Usage
import { useContract } from 'useink'
const CONTRACT_ADDRESS = '..'
const ALEPH_CONTRACT_ADDRESS = '..'
export const MyContractView: React.FC = () => {
// The default chain will be used if you omit chainId as the third argument
// The default chain is the first item in the chain config for UseInkProvider
const contract = useContract(CONTRACT_ADDRESS, metadata)
const alephContract = useContract(ALEPH_CONTRACT_ADDRESS, metadata, 'aleph')
// use with other hooks...
// e.g. useCall, useCallSubscription, useTx, etc
return null
}Return Value
Last updated