-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat(forge): verify contracts created inside a call #2840
Conversation
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would prefer that this is in the main test workflow since it compiles once or twice and then reuses the compiled test binary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
am ok with the double compilation, it's running on a separate job so should be ok
* verify contracts created inside a call * flat map * one less arg try_verify_contract * change name to get_verify_args * style * use AdditionalContract * add CallKind::Create2 * add additional info to trace.address doc * add commit to broadcast log * remove expect * specify how many contracts are being verified * successful verification message * make sure verifiers have library info * add complex deployment and verification test * add ci job for live tests on master * exclude live tests from PRs * fix text * change job name
I'm on the most recent version of foundry and am having trouble automatically verifying contracts deployed within other contracts. Currently, it will only automatically verify the top level contracts being deployed. Is there some recommended solution for this? 🤔 💭 |
Hi @alphak3y, would you mind opening up a new issue with this, preferably with a minimal reproduction / additional details? Thanks |
Motivation
Identifies and verifies contracts created during a
call
ordeploy
.ref #2518 (comment)
Solution
Since we recently enabled the traces for all scripts, independently of verbosity, we can get all the contracts through
CallKind::Create
andCallKind::Create2
traces.Also:
${{ secrets.ETHERSCAN_API_KEY }}
${{ secrets.TEST_PRIVATE_KEY }}
. It deploys and verifies a script which uses predeployed libraries and contracts create inside contracts.