-
Couldn't load subscription status.
- Fork 2.2k
feat: transaction access list option #8818
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
Conversation
crates/cli/src/utils/mod.rs
Outdated
| } | ||
|
|
||
| // Parses a `AccessList` from a &str | ||
| pub fn parse_access_list(s: &str) -> Result<AccessList> { |
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.
hmm, I am wondering if we should add some additional formats for better UX here? eg fallback to comma-separated addresses list or something similar
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.
@minhd-vu let's make access_list arg an Option<Option<String>> and if just --access-list with no value is provided, we'll use provider.create_access_list to create it through RPC
I think this would be pretty useful and would allow us to keep a way to invoke it without manually providing JSON access list
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 like that idea, I'll try my best to implement it.
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.
let me know if any questions!
crates/cast/bin/tx.rs
Outdated
| tx.set_nonce(nonce.to()); | ||
| } | ||
|
|
||
| if let Some(access_list) = match tx_opts.access_list { |
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.
we should do it right before estimating gas in _build
we don't yet have calldata here, so calling rpc will result in incomplete data or an error
* add access list * fix lint * improve * set access list even if legacy is true * update grammar * update comment to doc string * call access list if no string provided * address comments * update docs * update docs again * address comments * refactor
Motivation
cast sendorcast mktx, it would be nice to be able to provide an access listSolution
--access-listflag for transactions--access-listprovided with no value will usecast access-listto populate the access list