-
Notifications
You must be signed in to change notification settings - Fork 231
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
[Blocked] Update TransactionRequest's to
field to TxKind
#553
[Blocked] Update TransactionRequest's to
field to TxKind
#553
Conversation
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.
looking good overall. need to add a to
check to fn check_reqd_fields
as well
to
field to TxKindto
field to TxKind
This is now blocked by sol! expansion changes that i can work on soon |
mututally dependent with alloy-rs/core#606 |
@@ -266,7 +266,7 @@ mod tests { | |||
let tx = TransactionRequest { | |||
from: Some(anvil.addresses()[0]), | |||
value: Some(U256::from(100)), | |||
to: address!("d8dA6BF26964aF9D7eEd9e03E53415D37aA96045").into(), | |||
to: Some(address!("d8dA6BF26964aF9D7eEd9e03E53415D37aA96045").into()), |
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.
should these be using TransactionBuilder instead of defining the transaction fully?
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.
yeah but its just tests so i didn't want to clutter the diff
currently blocked by updating to a version of alloy-core with the new sol! expansion |
Unblocked now alloy-rs/core@9ff1e5a -- @DaniPopes should we cut core release? |
) * feat: change the `to` field type to TxKind, update From<TxEip4844> accordingly * refactor: update builder functions to include `to` checks. * feat: add as_create(), with_call(), and deploy_code() * refactor: remove error lines * feat: with_call impl. * feat: add the methods to the builder trait, update code that was broken. * test: update tests. * nits: reordering and default impls * fix: some test compilation * nit: fmt * lint: clippy * test: fix tests * refactor: kind vs to * feat: new_raw_deploy and generic input * doc: add note re sol usage * fix: type inference in test * chore: update core * docs --------- Co-authored-by: James <james@prestwi.ch> Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
Motivation
Issue #549
Solution
Note: This is not the full refactor, I'll mark it ready for review once it's done :)
From the issue:
[X] Modify to field to make creates explicit
[X] Error on non-4844 build if to is unset
[X] Error on 4844 build if to is unset or create
[X] Add following to the builder trait
PR Checklist