> ## Documentation Index
> Fetch the complete documentation index at: https://docs.b3os.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Token Metadata

Get ERC20 token metadata including name, symbol, decimals, and total supply. Use this to look up token info before transfers or to display token details. Ideal for: token discovery, display formatting, supply tracking, token validation.

![Get Token Metadata logo](https://ai-icon.b3.fun/logo/ethereum)
Catalog action EVM Onchain

Get ERC20 token metadata including name, symbol, decimals, and total supply. Use this to look up token info before transfers or to display token details. Ideal for: token discovery, display formatting, supply tracking, token validation.


## At a Glance

| Field | Value |
| --- | --- |
| Action ID | `get-token-metadata` |
| Category | EVM Onchain |
| Connector | Not required |
| Requires gas | No |
| Funds movement | None declared |
| Tags | `blockchain`, `evm`, `erc20`, `token`, `metadata`, `query`, `read`, `info`, `supply` |

## Payload Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `tokenAddress` | `string` | Yes | ERC20 token contract address. Also accepts "native" \(case-insensitive\), 0x0000...0000, or 0xEeee...EEE to look up the chain's native gas token \(e.g., ETH on Ethereum/Base, BNB on BSC\). |
| `chainId` | `number` | Yes | Chain ID \(1=Ethereum, 137=Polygon, 56=BSC, 8453=Base, etc.\) |

## Result Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | `string` | Yes | Token name |
| `symbol` | `string` | Yes | Token symbol |
| `decimals` | `number` | Yes | Token decimals |
| `totalSupply` | `string` | No | Total supply in smallest units |
| `formattedTotalSupply` | `string` | No | Human-readable total supply |
| `tokenAddress` | `string` | No | - |

## Examples

**Workflow node**

```json
{
  "type": "get-token-metadata",
  "payload": {
    "tokenAddress": "0x0000000000000000000000000000000000000000",
    "chainId": 8453
  },
  "children": []
}
```
  **Test with API**

```bash
curl -X POST "https://api.b3os.org/v1/actions/get-token-metadata/test" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "inputs": {
    "tokenAddress": "0x0000000000000000000000000000000000000000",
    "chainId": 8453
  }
}'
```

**Use expressions for dynamic values**

Payload fields can use workflow expressions such as `{{$trigger.body.amount}}`, `{{$nodes.fetch.result.price}}`, and `{{$props.asset}}` when the value should come from a trigger, prior node, or reusable workflow prop.