-
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: Add call depth to vm.stopAndReturnStateDiff()
results
#7234
Conversation
88ce027
to
3035ae9
Compare
36d4c64
to
a6a9e29
Compare
#[derive(Clone, Debug)] | ||
pub struct AccountAccess { | ||
/// The account access. | ||
pub access: crate::Vm::AccountAccess, | ||
/// The call depth the account was accessed. | ||
pub depth: u64, | ||
} |
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.
I've removed this wrapper type. It's unnecessary since depth
is now a field on the underlying AccountAccess
type. I'm happy to reverse this change if there are plans to use this wrapper for some other purpose, but it seems redundant to me.
a6a9e29
to
24903c2
Compare
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.
make sense,
this requires a forge-std change as well, right?
FYI I've edited the description to use GitHub keywords when referencing issues. |
Yeah, I believe so. Is there a contributor guide I can reference for that? |
There is no need, this will get included in the next release automatically. |
…y-rs#7234) * Added depth member to AccountAccess * Combine AccountAccess structs --------- Co-authored-by: ercembu <ercembulut@gmail.com>
Motivation
Closes #6632
Solution
The call depth was already recorded in the
cheatcodes::inspector::AccountAccess
wrapper. This PR removes that wrapper type in favor of only usingcheatcodes::vm::AccountAccess
, which now has a depth field.Credit to ercembu in #6667 for the initial implementation. I decided to pick this up since it's important to us at Sphinx, and that PR appears to be abandoned. I recommend closing that once this is merged.