{"uid":"cap_exndz3eOJS2IwTDIZNCXH","slug":"eip-2612-permit-calldata-builder-5e79241f","name":"EIP-2612 Permit Calldata Builder","description":"Build EIP-2612 permit calldata for signature-based allowances","url":"https://evm-canon-base.onrender.com/encode/permit","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["args"],"properties":{"args":{"type":"object","description":"arguments keyed by parameter name"},"chain":{"description":"chain name, alias or numeric chainId"},"token":{"type":"string","description":"symbol or contract address"},"value":{"type":"string","description":"native value in wei"},"function":{"type":"string","description":"name or full signature (generic route only)"}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_8sVnzuInw8tYOcAfX0hhv","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Builds EIP-2612 permit calldata for signature-based ERC-20 token allowances without requiring a separate approval transaction","exampleAgentPrompt":"Build me the EIP-2612 permit calldata so that Uniswap's router contract at 0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24 can spend up to 500 USDC from my wallet 0xAbCd...1234 on Base — use nonce 0 and set the deadline 1 hour from now.","exampleUseCases":[{"title":"Gasless DEX swap approval","prompt":"I want to let Uniswap's router spend 1000 USDC from my wallet 0xAbCd...1234 on Base without sending a separate approve transaction — build me the EIP-2612 permit calldata with nonce 0 and a deadline 30 minutes from now, targeting spender 0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24."},{"title":"Permit-based lending protocol deposit","prompt":"Generate the permit calldata so that the Aave lending pool at 0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2 can pull 500 DAI from my address 0x1234...ABCD on Base — use nonce 2 and set the deadline to expire in 2 hours."},{"title":"Batch permit for automated portfolio rebalancer","prompt":"Build the EIP-2612 permit encoding for my rebalancer contract at 0xDEAD...BEEF to spend up to 10000 USDT from wallet 0x9999...AAAA — nonce is 5, deadline should be 15 minutes from now, on Base mainnet."}],"resultDescription":"Returns ABI-encoded calldata for the ERC-20 permit function conforming to EIP-2612, including the encoded owner, spender, value, deadline, and nonce parameters ready to be signed and submitted as part of a gasless token approval flow.","failureModes":["Token does not implement EIP-2612 permit interface — returns error indicating unsupported token","Invalid or mismatched nonce — calldata may be built but will revert on-chain if nonce is stale","Deadline already expired at encode time — may return a validation warning","Malformed address inputs — returns 400-level error with field-level validation message","Unsupported chain ID — returns error if the token registry cannot resolve decimals or domain separator"],"whenToPreferThis":"Use this endpoint when you need to construct EIP-2612 permit calldata for gasless, signature-based ERC-20 allowances on EVM chains, particularly when you want to avoid a separate on-chain approve transaction. Prefer this over manual ABI encoding when you need deterministic, validated calldata with human-readable amount inputs resolved through the pinned token registry. Best suited for DeFi workflows involving DEX swaps, lending protocols, or any protocol that accepts permit signatures in lieu of prior approvals.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:54:03.228Z","isFirstParty":false}