{"uid":"cap_7nBQugmoS0ZfOSZpWxxC4","slug":"base-mainnet-gas-estimation-7c66230b","name":"Base Mainnet Gas Estimation","description":"Estimate gas for one Base mainnet transaction context at a resolved block, add a bounded caller-selected buffer, and preserve RPC rejection evidence without signing or broadcasting.","url":"https://apiacre.com/v1/crypto/base-gas-estimate","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"to":{"type":"string"},"block_tag":{"enum":["latest","safe","finalized"],"type":"string"},"call_data":{"type":"string"},"value_wei":{"type":"string"},"from_address":{"type":"string"},"buffer_percent":{"type":"integer"}}},"responseSchema":{"type":"json","example":{"data":{"block":{"hash":"0x1111111111111111111111111111111111111111111111111111111111111111","number":34567890,"gasLimit":120000000,"timestamp":"2026-08-10T16:00:00+00:00","requestedTag":"safe"},"source":"https://docs.base.org/base-chain/api-reference/ethereum-json-rpc-api/eth_esti...","status":"estimated","network":"eip155:8453","estimate":{"gas":24640,"gasHex":"0x6040","bufferPercent":20,"suggestedGasLimit":29568,"suggestedGasLimitHex":"0x7380"},"readOnly":true,"rpcError":null,"warnings":[],"disclaimer":"Read-only Base mainnet gas estimation only. No transaction is created, signed...","limitations":["The estimate is state-dependent and does not guarantee later execution.","Base-fee components exclude priority fees, L1 data fees, and other fee compon...","Only one existing destination is estimated; contract deployment is not suppor..."],"transaction":{"to":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","from":"0x1111111111111111111111111111111111111111","valueWei":"0","dataBytes":36,"dataSha256":"2da90680426443e99a57371fef89ebdb0cba7f941eda4e27491a3bd2069ef775"},"rpcCallsMade":2,"estimationAccepted":true,"networkRequestsMade":2,"transactionBroadcast":false},"meta":{"cached":false,"sources":[],"warnings":[],"duration_ms":42,"next_actions":[]},"service":"crypto.base-gas-estimate","version":"1","request_id":"018f1f54-7f38-7ba2-8dc3-5f90272d9f1a"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","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.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_LZ2jnlS7BNhYzvFxt9Jc6","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Estimates gas for a single Base mainnet transaction at a resolved block, applies a caller-bounded buffer, and returns RPC rejection evidence without signing or broadcasting.","exampleAgentPrompt":"Before I send this contract call on Base mainnet, estimate the gas it will need — use my address 0xAbC...123 calling contract 0xDEF...456 with this calldata 0xa9059cbb..., and add a 20% buffer so I don't run out.","exampleUseCases":[{"title":"Safe gas limit for token transfer","prompt":"I want to send USDC on Base mainnet from 0xABC...111 to 0xDEF...222 with this calldata 0xa9059cbb...; estimate the gas and add a 15% buffer so the transaction doesn't fail."},{"title":"Pre-flight check for DeFi contract call","prompt":"Before I submit this swap on a Base mainnet DEX, can you estimate how much gas the call will need? My wallet is 0x111...AAA, the router contract is 0x222...BBB, calldata is 0x38ed1739..., and I'd like a 25% buffer added."},{"title":"RPC rejection diagnosis for failing transaction","prompt":"My transaction keeps getting rejected by the Base RPC — can you run a gas estimate against the latest block for this transaction from 0x333...CCC to contract 0x444...DDD with calldata 0x095ea7b3... and show me any rejection evidence?"}],"resultDescription":"Returns the estimated gas units for the transaction at the resolved block, a buffered gas limit incorporating the caller-specified safety margin, the resolved block number, base fee and gas price data, and any RPC rejection evidence captured during the dry-run — all without signing or submitting the transaction.","failureModes":["Transaction would revert — RPC rejection evidence returned with revert reason","Invalid or unresolvable block reference — returns error with block context","Malformed calldata or address — validation error returned","Buffer percentage out of allowed bounds — rejection with allowable range","Base RPC unavailable or rate-limited — upstream error propagated","Missing required fields (from/to address or calldata) — schema validation error"],"whenToPreferThis":"Choose this endpoint when you need a safe, read-only gas estimate for a Base mainnet transaction before signing or broadcasting — especially when you want to apply a caller-controlled buffer to avoid out-of-gas failures and capture RPC rejection evidence for debugging. It is specifically scoped to Base mainnet (not Ethereum mainnet or other EVM chains) and is ideal for agents that need programmatic gas limit selection without running a full node.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:52:06.622Z","isFirstParty":false}