home / skills / bankrbot / claude-plugins / bankr-arbitrary-transaction

bankr-arbitrary-transaction skill

/bankr-agent/skills/bankr-arbitrary-transaction

This skill enables you to submit raw EVM transactions and calldata to supported chains by providing to, data, value, and chainId.

npx playbooks add skill bankrbot/claude-plugins --skill bankr-arbitrary-transaction

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.4 KB
---
name: Bankr Agent - Arbitrary Transactions
description: This skill should be used when the user wants to "submit a transaction", "execute calldata", "send raw transaction", "submit transaction JSON", or provides a JSON object with to/data/value/chainId fields. Handles raw EVM transaction submission.
version: 1.0.0
---

# Arbitrary Transaction Submission

Submit raw EVM transactions with explicit calldata to any supported chain.

## JSON Format

```json
{
  "to": "0x...",
  "data": "0x...",
  "value": "0",
  "chainId": 8453
}
```

| Field | Type | Description |
|-------|------|-------------|
| `to` | string | Target contract address (0x + 40 hex chars) |
| `data` | string | Calldata to execute (0x + hex string) |
| `value` | string | Amount in wei (e.g., "0", "1000000000000000000") |
| `chainId` | number | Target chain ID |

## Supported Chains

| Chain | Chain ID |
|-------|----------|
| Ethereum | 1 |
| Polygon | 137 |
| Base | 8453 |
| Unichain | 130 |

## Prompt Examples

**Submit a raw transaction:**
```
Submit this transaction:
{
  "to": "0x1234567890abcdef1234567890abcdef12345678",
  "data": "0xa9059cbb000000000000000000000000recipient00000000000000000000000000000000000000000000000000000000000f4240",
  "value": "0",
  "chainId": 8453
}
```

**Execute calldata on a contract:**
```
Execute this calldata on Base:
{
  "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
  "data": "0x095ea7b30000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
  "value": "0",
  "chainId": 8453
}
```

**Send ETH with calldata:**
```
Submit transaction with value:
{
  "to": "0xRecipientAddress...",
  "data": "0x",
  "value": "1000000000000000000",
  "chainId": 1
}
```

## Validation Rules

| Field | Validation |
|-------|------------|
| `to` | Must be 0x followed by exactly 40 hex characters |
| `data` | Must start with 0x, can be "0x" for empty calldata |
| `value` | Wei amount as string, use "0" for no value transfer |
| `chainId` | Must be a supported chain ID |

## Common Issues

| Issue | Resolution |
|-------|------------|
| Unsupported chain | Use chainId 1, 137, 8453, or 130 |
| Invalid address | Ensure 0x + 40 hex chars |
| Invalid calldata | Ensure proper hex encoding with 0x prefix |
| Transaction reverted | Check calldata encoding and contract state |
| Insufficient funds | Ensure wallet has enough ETH/MATIC for gas + value |

Overview

This skill submits raw EVM transactions with explicit calldata to supported chains. It accepts a JSON object containing to, data, value, and chainId fields and forwards the prepared transaction for execution. Use it when you need direct calldata execution, send ETH/ERC20 transfers via calldata, or submit signed transaction payloads programmatically.

How this skill works

You provide a JSON transaction object with the target address (to), calldata (data), value in wei (value), and numeric chainId. The skill validates the address, calldata format, value string, and that the chainId is supported, then constructs and submits the raw EVM transaction to the target chain. If submission fails, it returns validation errors or on-chain revert diagnostics when available.

When to use it

  • Submit a raw transaction JSON payload to be executed on-chain
  • Execute arbitrary contract calldata (function calls) directly
  • Send native token value alongside calldata (ETH, MATIC, etc.)
  • Programmatically automate contract interactions across supported chains
  • Test calldata encoding or debug transaction reverts

Best practices

  • Always validate the `to` field is 0x + 40 hex characters before submission
  • Prefix calldata with 0x; use "0x" for empty calldata
  • Provide `value` as a string in wei (use "0" if none)
  • Confirm `chainId` is one of the supported IDs (1, 137, 8453, 130)
  • Ensure the sending wallet has enough native balance for gas + value

Example use cases

  • Call an ERC20 transfer method by providing the contract address and encoded transfer calldata
  • Approve an allowance by executing approve calldata on a token contract
  • Send 1 ETH with empty calldata to a recipient address using chainId 1
  • Execute a custom contract function on Base (chainId 8453) with encoded parameters
  • Submit transactions from CI/CD scripts or backend services that manage on-chain workflows

FAQ

What chains are supported?

Supported chain IDs are Ethereum (1), Polygon (137), Base (8453), and Unichain (130).

How must calldata and addresses be formatted?

Addresses must be 0x followed by exactly 40 hex characters. Calldata must start with 0x; use "0x" for empty calldata.

How should I represent value?

Provide `value` as a string containing the amount in wei, e.g., "0" or "1000000000000000000" for 1 ETH.

What if the transaction reverts?

Check calldata encoding, contract state, and that the sender has sufficient balance for gas and any value transfer; the skill will surface revert messages when available.