{"uid":"cap_Pm7XSQ24i362iew8maIHs","slug":"abi-encode-calldata-1f9a9a25","name":"ABI Encode Calldata","description":"ABI-encode typed values into calldata-ready hex. Pass an array of solidity types and matching values; returns the 0x-encoded bytes. For agents constructing transactions and multicalls. abi encode, calldata, solidity types, encode parameters, tx builder","url":"https://api.x402node.dev/crypto/abi-encode","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"types":{"type":"string","description":"JSON array of solidity types, e.g. [\"uint256\",\"address\"] (required)"},"values":{"type":"string","description":"JSON array of matching values (required)"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_eolJmlTI19dBiSi2PB3dw","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"ABI-encodes an array of Solidity typed values into 0x-prefixed calldata-ready hex bytes for use in EVM transactions and multicalls.","exampleAgentPrompt":"ABI-encode these Solidity values for me: types are ['address','uint256','bool'] and the matching values are ['0xAbC123...','1000000000000000000','true'] — give me the 0x calldata hex I can drop into a transaction.","exampleUseCases":[{"title":"Build multicall batch transaction calldata","prompt":"I need to batch multiple token transfers into one transaction using multicall. Can you ABI-encode the parameters for each call? The types are ['address','uint256'] for each transfer, and I've got three recipient-amount pairs ready to go."},{"title":"Encode function parameters for contract interaction","prompt":"I'm calling a smart contract function that takes (address indexed user, uint256 amount, bytes32 data). Encode these three parameters into calldata hex for me: the user address is 0x742d35Cc6634C0532925a3b844Bc9e7595f42bE1, amount is 5000000000000000000, and the data hash is 0xabc...def."},{"title":"Convert Solidity types to transaction payload","prompt":"Help me prepare calldata for a contract function with signature function swap(uint256 amountIn, uint256 minAmountOut, address[] path). I need to encode amountIn as 1000000000000000000, minAmountOut as 900000000000000000, and a path array of three token addresses."}],"resultDescription":"Returns a 0x-prefixed hex string containing the ABI-encoded bytes of the supplied Solidity typed values, ready to use as calldata in an EVM transaction or multicall.","failureModes":["Mismatched types and values array lengths — returns error","Invalid Solidity type string — returns encoding error","Malformed value for given type (e.g. non-address string for address type) — returns type error","Network/service unavailability — returns HTTP 5xx"],"whenToPreferThis":"Use this endpoint when an agent needs to construct raw calldata for EVM smart contract interactions, multicalls, or transaction builders without running a local Solidity/ethers.js encoder. Ideal for serverless or lightweight agents that lack a local ABI encoder library.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T07:17:24.289Z","isFirstParty":false}