-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
forge verify-bytecode
panics
#7667
Comments
cc @yash-atreya |
@QGarchery Try setting the etherscan config in foundry.toml like so https://book.getfoundry.sh/reference/config/etherscan?highlight=ETHERSCAN#etherscan |
Oh I thought I would not need it since I'm providing the constructor args, and I care about the runtime bytecode only. Is it possible to bypass etherscan in this case ? It works great when I give the etherscan API key though, thanks ! Maybe the error message can be improved in this case |
Indeed, error message can be improved here. There's no way to bypass Etherscan. It is required as we want to cross-check the onchain and local bytecode against each other. |
To be fair we can make this not rely on block explorers if:
We can also verify creation code but finding creation code is harder and RPC intensive (binary search over blocks to find deployment block, iterate through each tx, trace tx find where it was deployed( |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (1ca9b85 2024-04-15T02:34:32.892525726Z)
What command(s) is the bug in?
forge verify-bytecode
Operating System
Linux
Describe the bug
When trying to run
forge verify-bytecode
on Morpho Blue it panics with:Reproduce on morpho-blue at last commit on main
470a6871b3eaa56e94efdc2ee15b873c5f03e086
, and run the following command:forge verify-bytecode --rpc-url $ETHEREUM_RPC --constructor-args 0xcBa28b38103307Ec8dA98377ffF9816C164f9AFa 0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb src/Morpho.sol:Morpho --verification-type partial
(with your ownETHEREUM_RPC
)The text was updated successfully, but these errors were encountered: