Token Hooks
Hooks for interacting with ERC20 tokens.
Token Hooks
BuilderKit provides hooks for interacting with ERC20 tokens, including balance checking, approvals, and token information.
useTokens
The useTokens hook provides functions for accessing token information and performing token-related operations.
Available Functions
- getCustomToken(chain_id: number, address: string): Get token name, symbol, and decimals
- getBalance(chain_id: number, address: string, wallet: string): Get token balance for an address
- getAllowance(chain_id: number, address: string, owner: string, spender: string): Get token allowance
- approve(address: string, spender: string, amount: BigNumber, decimals: number): Generate approve transaction data
Integration Example
Is this guide helpful?