A

auto-verify-exex

A Reth ExEx for auto-verification of factory spawned contracts that uses immutables

20
Built at ETHIndia 2024
A

auto-verify-exex

A Reth ExEx for auto-verification of factory spawned contracts that uses immutables


The problem auto-verify-exex solves

Auto-verification on etherscan and family requires that the init code and the contract code be constant. When you use immutables it embeds the immutables directly into the deployed bytecode, and initcode has the constructor args, so neither of those things are constants anymore. As a result auto-verification doesn't work. For making the auto verification work people usually refrain from using immutables and instead have a oneoff

initiatlize

function call that initializes the constants in the storage after the deployment. BUT, in doing so they are paying a huge gas cost of extra SLOAD(2100) instead of just a PUSH(3) instruction. 700x more expensive for that one operation.

Challenges I ran into

ExEx is ran by reth right from the syncing stage, so it is not very easy to demo, but I have written tests to verify the exex logic instead.

Tracks Applied (2)

Open Track

BNB Chain is an EVM compatible chain, this exex can be used to auto-verify contracts on https://bscscan.com/ too.

BNB Chain

Pectra: Mekong Testnet

Since Pectra Mekong testnet is about testing new EIPs that haven't landed and is used for developing and testing tooling...Read More

privacy + scaling explorations

Technologies used

Cheer Project

Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.

Discussion