{"uid":"cap_1STXTdt2cKLkvtdnBFPJz","slug":"payai-abi-encoder-e9f8029f","name":"PayAI ABI Encoder","description":"ABI-encode a function call (selector + args) or encode/decode arbitrary ABI types — build and parse EVM calldata correctly.","url":"https://payai.agentstools.dev/crypto/abi","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"op":{"enum":["encode_call","encode","decode"],"type":"string"},"args":{"type":"array","description":"Argument values for op=encode_call/encode"},"data":{"type":"string","description":"0x calldata/abi bytes for op=decode"},"types":{"type":"array","items":{"type":"string"},"description":"ABI type list for op=encode/decode"},"signature":{"type":"string","description":"Function signature for op=encode_call, e.g. transfer(address,uint256)"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_k98KEffqTefhYerneJkra","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Encodes a Solidity function signature and arguments into EVM ABI selector and calldata for on-chain transactions.","exampleAgentPrompt":"Can you encode the ERC-20 transfer function call — `transfer(address,uint256)` — with recipient `0xAbC...123` and amount `1000000000000000000` into ABI calldata so I can build my raw Ethereum transaction?","exampleUseCases":[{"title":"Encoding ERC-20 token transfer","prompt":"Encode the `transfer(address,uint256)` Solidity function with recipient `0x1234567890abcdef1234567890abcdef12345678` and amount `500000000000000000` into ABI calldata for an Ethereum transaction."},{"title":"Building DeFi swap calldata","prompt":"I need to call a Uniswap-style `swapExactTokensForTokens(uint256,uint256,address[],address,uint256)` function — can you encode it with amountIn 1000000, amountOutMin 990000, path [0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48, 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2], to 0xRecipientAddress, and deadline 1700000000?"},{"title":"Constructing contract ownership transfer","prompt":"Encode a call to `transferOwnership(address)` with new owner `0xDeadBeefDeadBeefDeadBeefDeadBeefDeadBeef` so I can prepare the raw calldata for an admin transaction on my smart contract."}],"resultDescription":"Returns the 4-byte ABI function selector and the full hex-encoded calldata string that can be embedded directly in an EVM transaction's data field to invoke the specified contract function with the given arguments.","failureModes":["Invalid function signature format causes encoding failure","Mismatched argument types vs. declared parameter types result in encoding error","Unsupported Solidity types may not be handled correctly","Missing required arguments returns a validation error","Malformed ABI input produces an error response"],"whenToPreferThis":"Choose this endpoint when you need to programmatically build raw EVM transaction calldata from a known function signature and arguments, especially in agent workflows that construct or relay on-chain transactions without a full Web3 library. Ideal when you want a lightweight, hosted ABI encoding service rather than running ethers.js or web3.py locally.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:49:31.081Z","isFirstParty":false}