E

EVM & Solana Utility Tools · EVM ABI Encode

by EVM & Solana Utility Tools

POSTBaseArbitrumPolygon

$0.005

per call · USD Coin on Base

Solidity ABI calldata encoder — encode canonical typed values for an EVM smart-contract function call, with an optional selector and exact 256-bit integers.

Endpoint

POST https://chain-tools.use.x402atlas.com/evm/abi-encode

2

Calls / 30d

1

Unique payers / 30d

Sep 1

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://chain-tools.use.x402atlas.com/evm/abi-encode", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "function": "transfer",
    "include_selector": true,
    "types": [
      "address",
      "uint256"
    ],
    "values": [
      "0x0000000000000000000000000000000000000001",
      "1000"
    ]
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://chain-tools.use.x402atlas.com/evm/abi-encode" \
  -H "Content-Type: application/json" \
  -d '{"function":"transfer","include_selector":true,"types":["address","uint256"],"values":["0x0000000000000000000000000000000000000001","1000"]}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "algorithm_version": "solidity-abi-v1",
  "data": "0xa9059cbb000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000003e8",
  "function_signature": "transfer(address,uint256)",
  "include_selector": true,
  "operation": "abi-encode",
  "payload": "0x000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000003e8",
  "selector": "0xa9059cbb",
  "types": [
    "address",
    "uint256"
  ],
  "values": [
    "0x0000000000000000000000000000000000000001",
    "1000"
  ],
  "warnings": []
}

Payment details

Pay to0x8c128f1ee62bb5e47867cfbae2ad89be325df1b2
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase, Arbitrum, Polygon
Schemesexact

Is this your API?

Pin it to the top of Onchain Data and the homepage with a featured placement.

Get featured →

More from EVM & Solana Utility Tools & similar services