> For the complete documentation index, see [llms.txt](https://whitepaper.aitech.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://whitepaper.aitech.io/agentforge/tools/bscscan.md).

# bscscan

[BSCScan](https://bscscan.com/) is a block explorer and API platform for BNB Smart Chain. It provides access to transaction details, account histories, token transfers, verified contract source code, and contract ABIs.

In Agent Forge, the BSCScan integration allows your agents and workflows to retrieve BNB Chain data directly from BSCScan APIs. This is useful for wallet monitoring, transaction analysis, token transfer tracking, contract inspection, and blockchain reporting workflows.

### Usage Instructions

Use BSCScan when your workflow needs BNB Chain data. Provide a BSCScan API key, choose an operation, and pass the required transaction hash, wallet address, or contract address.

Advanced fields allow you to set the chain ID, block range, pagination, result size, and sort direction.

### Tools

#### `bscscan_get_tx`

Fetch transaction details by transaction hash.

#### `bscscan_get_address_txs`

Retrieve normal transactions for a wallet address.

#### `bscscan_get_token_txs`

Retrieve token transfer events for an address, optionally filtered by token contract.

#### `bscscan_get_contract_source`

Fetch verified contract source code and metadata for a contract address.

#### `bscscan_get_contract_abi`

Fetch the verified ABI for a contract address.

### Common Inputs

| Parameter         | Type   | Required           | Description                                 |
| ----------------- | ------ | ------------------ | ------------------------------------------- |
| `apiKey`          | string | Yes                | BSCScan API key                             |
| `txHash`          | string | Operation-specific | Transaction hash                            |
| `address`         | string | Operation-specific | Wallet address                              |
| `contractAddress` | string | Operation-specific | Contract address                            |
| `chainId`         | number | No                 | EVM chain ID, defaulting to BNB Smart Chain |
| `startBlock`      | number | No                 | Starting block number                       |
| `endBlock`        | number | No                 | Ending block number                         |
| `page`            | number | No                 | Page number                                 |
| `offset`          | number | No                 | Results per page                            |
| `sort`            | string | No                 | Sort direction, `asc` or `desc`             |

### Output

| Parameter | Type   | Description                |
| --------- | ------ | -------------------------- |
| `data`    | json   | Full BSCScan response data |
| `status`  | string | BSCScan status value       |
| `message` | string | BSCScan response message   |
| `result`  | json   | BSCScan result payload     |

### Notes

* Category: `tools`
* Type: `bscscan`
