Skip to content
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

fix(forge): replace loaded and untouched accounts on fork init #3222

Merged
merged 3 commits into from Sep 15, 2022

Conversation

joshieDo
Copy link
Collaborator

Motivation

#3221

From revm:

    /// Loading account does not mean that account will need to be added to MerkleTree (touched).
    /// Only when account is called (to execute contract or transfer balance) only then account is made touched.
    /// Action: Mark account touched
    /// Revert: Unmark account touched
    AccountTouched { address: H160 },

Solution

Remove acc.is_touched requirement on prepare_init_journal_state

@joshieDo joshieDo added T-bug Type: bug Cmd-forge-script Command: forge script labels Sep 15, 2022
@joshieDo joshieDo changed the title forge(fix): replace loaded and untouched accounts on fork init fix(forge): replace loaded and untouched accounts on fork init Sep 15, 2022
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice catch!

@mattsse mattsse merged commit bf3de0b into foundry-rs:master Sep 15, 2022
iFrostizz pushed a commit to iFrostizz/foundry that referenced this pull request Nov 9, 2022
…ry-rs#3222)

* replace loaded and untouched accounts

* add repro

* forge fmt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cmd-forge-script Command: forge script T-bug Type: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants