Skip to main content

useGetCode

Get code at address. 0x indicates an EOA. Uses Web3.eth.getCode

const code = Contract.hooks.useGetCode(networkId, address);
tip

Use the useGetCode hook to determine if an address is an EOA or smart contract.