Hooks
To easily read/sync data, we recommend using the built-in hooks when possible to automatically combine selectors & action dispatchers.
Contract
These hooks are for both Smart Contracts and Externally Owned Accounts.
General Info
- useGetBalance: Get balance of address.
- useGetNonce: Get nonce (tx count) of address.
- useGetCode: Get code at address.
0x
indicates an EOA.
Smart Contract Data
- useContractCall: Make a contract call.
- useEvents: Get past or sync contract event logs.
Pre-configured Interfaces
- useERC20: Popular token standard.
- useERC721: Popular NFT standard.
- useERC1155: Popular Multi-Token standard.
- useERC165: Introspection standard to check if a contract supports an interface.
Etherscan API
- useFetchAbi: Fetch contract ABI using Etherscan API.
- useFetchTransactions: Fetch transactions for address using Etherscan API.
Block
- useBlock: Fetch specific block by number or blockHash.
- useLatestBlock: Fetch latest block for network.
- useBlockSync: Subscribe to new blocks.
Transaction
- useTransaction: Fetch specific transaction by hash.
Contract Event
- useGetPastLogs: Fetch past logs using raw subscribe filter. Enables syncing event across multiple smart contracts efficiently.
- useGetAssets: Fetch all tokenized assets for address.
IPFS
- useIpfs: Fetch IPFS resource using content hash.