mcpField
B
Bankr Dev - Arbitrary Transactions

Bankr Dev - Arbitrary Transactions

github.com/bankrbotDevelopment88370 installsUpdated 31w ago
Repository

About Bankr Dev - Arbitrary Transactions

Bankr Dev - Arbitrary Transactions is a development skill for submitting raw EVM transactions through the Bankr API. It lets developers specify a destination, calldata, value, and chain ID for contract calls or transfers with data.

Key features

  1. 01Submit prebuilt calldata
  2. 02Execute custom contract calls
  3. 03Transfer value with calldata
  4. 04Set chain and transaction fields

Use cases

  1. 01Submit an encoded contract transaction
  2. 02Call a contract function
  3. 03Transfer value while executing calldata

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/bankrbot/claude-plugins --skill bankr-dev---arbitrary-transactions

After installing, type/bankr-dev---arbitrary-transactionsin Claude Code to confirm it loaded.

Details

From the project README

Arbitrary Transaction Capability

Submit raw EVM transactions with explicit calldata via the Bankr API.

What You Can Do

OperationDescription
Submit calldataExecute pre-built calldata on any supported chain
Custom contract callsInteract with any contract using raw function calls
Value transfers with dataSend ETH/MATIC while executing calldata

JSON Schema

{
  "to": "0x...",
  "data": "0x...",
  "value": "0",
  "chainId": 8453
}
FieldTypeRequiredDescription
tostringYesContract address (0x + 40 hex chars)
datastringYesCalldata (0x + hex, or "0x" for empty)
valuestringYesWei amount as string
chainIdnumberYesTarget chain (1, 137, or 8453)

Supported Chains

ChainChain ID
Ethereum1
Polygon137
Base8453
Unichain130

Usage

import { execute } from "./bankr-client";

// Submit arbitrary transaction
const txJson = {
  to: "0x1234567890abcdef1234567890abcdef12345678",
  data: "0xa9059cbb...",
  value: "0",
  chainId: 8453
};

await execute(`Submit this transaction: ${JSON.stringify(txJson)}`);

Integration Pattern

import { execute } from "./bankr-client";

interface ArbitraryTx {
  to: string;
  data: string;
  value: string;
  chainId: number;
}

async function submitArbitraryTx(tx: ArbitraryTx): Promise<void> {
  // Validate before submission
  if (!tx.to.match(/^0x[a-fA-F0-9]{40}$/)) {
    throw new Error("Invalid address format");
  }
  if (!tx.data.startsWith("0x")) {
    throw new Error("Calldata must start with 0x");
  }
  if (![1, 137, 8453, 130].includes(tx.chainId)) {
    throw new Error("Unsupported chain");
  }

  const prompt = `Submit this transaction: ${JSON.stringify(tx)}`;
  await execute(prompt);
}

// Example: ERC-20 transfer
await submitArbitraryTx({
  to: "0xTokenContractAddress...",
  data: "0xa9059cbb000000000000000000000000...", // transfer(address,uint256)
  value: "0",
  chainId: 8453
});

Error Handling

try {
  await submitArbitraryTx(tx);
} catch (error) {
  if (error.message.includes("reverted")) {
    // Transaction reverted - check calldata encoding
    console.error("Transaction reverted:", error);
  } else if (error.message.includes("insufficient")) {
    // Not enough funds for gas + value
    console.error("Insufficient funds:", error);
  } else if (error.message.includes("unsupported")) {
    // Chain not supported
    console.error("Unsupported chain:", error);
  }
}

Related Skills

  • bankr-client-patterns - Client setup and execute function
  • bankr-api-basics - API fundamentals
  • bankr-token-trading - Higher-level trading operations

Comments

Markdown supported