Ethereum icon

Ethereum

Interact with Ethereum blockchain

ERC20 → Approve

AI-generated

Summary

Approve an ERC20 token allowance for a spender address

Inputs

  • tokenAddress (required) — The blockchain address of the ERC20 token contract
  • spender (required) — The address that is allowed to spend the tokens
  • amount (required) — Amount of tokens to approve, expressed in token units or wei

Output shape

a JSON object indicating the approval result, typically containing a success indicator and optionally an allowance field

The node returns a single record; fields are optional and may vary by implementation; no pagination

Examples

Example 1: Standard ERC20 approval

tokenAddress: 0xToken..., spender: 0xSpender..., amount: 1000

Example 2: Approve maximum allowance

tokenAddress: 0xToken..., spender: 0xSpender..., amount: MAX_UINT

Example 3: Approve with amount in wei

tokenAddress: 0xToken..., spender: 0xSpender..., amount: 1000000000000000000

Links

Discussion