# Transaction Bot Monitoring

### What is Transaction Bot Monitoring?

Transaction Bot Monitoring is primarily used for on-chain transaction monitoring.

### Typical Scenarios of Transaction Bot Monitoring

1. Monitoring transactions from a specific sender
2. Monitoring transactions to a specific recipient
3. Sending alerts when ETH is greater than or less than a target threshold
4. Monitoring transactions with a specific methodId

**Supported Data Sources**

| Data Source   | Type     | Stability |
| ------------- | -------- | --------- |
| Ethereum      | on chain | Very High |
| BSC           | on chain | High      |
| Avalanche     | on chain | High      |
| Polygon Pos   | on chain | High      |
| Arbitrum      | on chain | High      |
| Optimism      | on chain | High      |
| Polygon zkEVM | on chain | High      |
| ZkSync Era    | on chain | High      |
| Base          | on chain | High      |
| Scroll        | on chain | High      |
| Manta         | on chain | High      |
| ZKFair        | on chain | High      |
| Blast         | on chain | High      |
| Linea         | on chain | High      |
| B2            | on chain | High      |
| Merlin        | on chain | High      |

### How to Configure Transaction Bot Monitoring?

After logging into the ChainBot platform, click "Create Bot" at the top right corner -> "Transaction Monitor".

<figure><img src="/files/3obMYmHYUmC0Hm7BNQ9L" alt=""><figcaption><p>Create a Transaction Bot</p></figcaption></figure>

#### Info Description

| Field    | Description                            | Required |
| -------- | -------------------------------------- | -------- |
| Name     | Bot Monitoring Name                    | Yes      |
| Chain    | Selected Chain                         | Yes      |
| Contract | Selected Smart Contract Address        | Yes      |
| Function | Selected Smart Contract Method         | Yes      |
| Tags     | Bot Monitoring Tags, for better search | Yes      |

#### Conditions Description

<table><thead><tr><th>Parameter</th><th width="202.33333333333331">Symbol</th><th>Description</th></tr></thead><tbody><tr><td>From</td><td>==, in</td><td>Sender address of the transaction; formats differ between chains</td></tr><tr><td>To</td><td>==, in</td><td>Recipient address of the transaction</td></tr><tr><td>Value</td><td>>, >=, &#x3C;, &#x3C;=, ==, !=, in</td><td>Value of the transaction in wei, 1 ETH == 1000000000000000000 wei</td></tr><tr><td>methodId</td><td>==, in</td><td>Method ID of the transaction, must be a 4-byte string starting with 0x, e.g., 0x95d89b41</td></tr><tr><td>data</td><td>Optional</td><td>Complete string</td></tr></tbody></table>

#### Template Variables Description

<table><thead><tr><th width="331">Variable</th><th>Description</th></tr></thead><tbody><tr><td>$subscription.name</td><td>Subscription name, typically the same as the Bot Monitoring name</td></tr><tr><td>$chain.explore</td><td>Blockchain explorer prefix</td></tr><tr><td>$chain.network</td><td>Chain chainId</td></tr><tr><td>$block.time</td><td>Block time at which the transaction occurred</td></tr><tr><td>$tx.hash</td><td>Transaction hash</td></tr><tr><td>$tx.height</td><td>Block height at which the transaction occurred</td></tr><tr><td>$tx.nonce</td><td>Transaction nonce value</td></tr><tr><td>$tx.from</td><td>Sender address of the transaction</td></tr><tr><td>$tx.to</td><td>Recipient address of the transaction</td></tr><tr><td>$tx.value</td><td>Transaction amount in Ether, use $tx.value/1e18 for ETH units</td></tr><tr><td>$tx.gas</td><td>Gas fee consumed by the transaction</td></tr><tr><td>$tx.gasPrice</td><td>Gas price of the transaction</td></tr><tr><td>$tx.input</td><td>Input data of the transaction</td></tr><tr><td>$tx.type</td><td>Transaction type</td></tr><tr><td>$tx.accessList</td><td>Supported for some transactions</td></tr><tr><td>$tx.chainId</td><td>Chain ID of the transaction</td></tr><tr><td>$tx.maxFeePerGas</td><td>Available in EIP-1559</td></tr><tr><td>$tx.maxPriorityFeePerGas</td><td>Available in EIP-1559</td></tr><tr><td>$tx.r</td><td>R value of the transaction signature</td></tr><tr><td>$tx.s</td><td>S value of the transaction signature</td></tr><tr><td>$tx.v</td><td>V value of the transaction signature</td></tr><tr><td>$tx.method</td><td>Transaction method name</td></tr></tbody></table>

#### Default Alert Template

```
[{$bot.name}]
From: {$tx.from}
To: {$tx.to}
Detail: {$parsed.message}
Method: {$tx.method}
Status: {$tx.status}
Explore: {$chain.explore}/tx/{$tx.hash}
Time: {$alert.time}
```

[Learn about alert notification templates?](https://github.com/ChainbotAI/doc-en/blob/master/advanced-features/alarm-notification-template/README.md)

#### Notification Message Example

> \[ Transaction Monitor ]\
> Name: mim Minting Monitor\
> From: 0xfddfe525054efaad204600d00ca86adb1cc2ea8a\
> To: 0x5f0dee98360d8200b20812e174d139a1a633edd2\
> Method: execTransaction(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,bytes)\
> Explore: <https://etherscan.io/tx/0x5a1a9f01fd3fad6fa3909bcdd284e8023eedf9797d94458a13bb6df929d80a1a>\
> Time: 2022-05-10 22:40:29 +0800 CST
>
> Created By [ChainBot.io](https://www.chainbot.io)

#### Transaction Bot Monitoring Case

[Transaction Bot Example](/bot-case/transaction-bot-demo.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.chainbot.io/basic-usage/bots/transaction-bot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
