Skip to content

[Arc Testnet quirk] eth_estimateGas returns data:null for complex calls — use hardcoded gasLimit #2

Description

@osr21

Symptom

On Arc Testnet, eth_estimateGas returns { data: null } or an unhelpful error for multi-step transactions (e.g. ERC-20 approve followed by a CCTP depositForBurn). ethers.js interprets this as a failed estimation and throws before the transaction is even submitted.

Affected calls

  • usdc.approve(tokenMessenger, amount) — sometimes passes, sometimes fails estimation
  • tokenMessenger.depositForBurn(...7 params) — consistently fails estimation on Arc Testnet
  • Any call with complex state reads (multiple SLOADs) in the same block

Reproduction

const provider = new ethers.JsonRpcProvider('https://rpc.drpc.testnet.arc.network');
const messenger = new ethers.Contract(TOKEN_MESSENGER, ABI, provider);
// This throws: "estimateGas failed — data: null"
await messenger.estimateGas.depositForBurn(amount, domain, recipient, token, caller, maxFee, threshold);

Workaround

Supply an explicit gasLimit override so ethers.js skips estimation entirely:

const tx = await messenger.depositForBurn(...args, { gasLimit: 600_000n });

600k covers approve + CCTP burn comfortably. The actual gas used is typically 180–250k, so there's no waste — unused gas is refunded.

References

  • Tracked in arc-node#80
  • Implementation in this repo: ChainConfig.gasLimitOverride field in src/lib/chains.ts

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions