-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add state overrides flags to cast call
#10189
Comments
ca be implemented using alloy support https://docs.rs/alloy-provider/latest/alloy_provider/struct.EthCall.html#method.overrides |
Happy to do an implementation of this if there is some guidance as to what the interface/flags should look like from a core developer. I have a specific use case relating to balance overrides so wouldn't to propose something that fits only that. |
thank you! probably best should be an |
Ok, there is no desire to parse individual overrides similar to other flags like |
I think I missed that but not part of state overrides we support in alloy https://docs.rs/alloy-rpc-types-eth/0.13.0/alloy_rpc_types_eth/state/struct.AccountOverride.html |
I am referring to if, instead of a json object, we want to pass in more CLI-friendly formatted arguments. For example the Something like:
I am not entirely sure what To me this seems more CLI-friendly than a JSON blob as a single |
ah, I see, wasn't familiar with labels switch. For storage slots the format could become a little bit too much but I think makes sense overall. @zerosnacks @yash-atreya wdyt re proposed args? |
Could always add both and have a |
sgtm! |
I made a PR for this, would really appreciate your help with a review. Main problem is that I'm not sure how to test this. I've added some basic tests, but I'm not satisfied with them. |
Component
Cast
Describe the feature you would like
eth_call
implementations often support a state override object as the last parameter. The ability to define state overrides in a similar form to--labels
oncast
, for example--balance-override <ADDRESS>:<BALANCE>
, would be useful for debugging scenarios. The commands might get messy for large state changes, something like--state-override <ADDRESS>:<SLOT>:<VALUE>
, but being possible to do it would be nice.In my specific use case, I would like the balance overrides, but I can see uses where the other parameters could be useful.
Thanks
Additional context
No response
The text was updated successfully, but these errors were encountered: