-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Transaction input
and data
refactors
#6294
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
5c65103
Remove extra formatting check for input and data for transactionSchema
spacesailor24 7a5b5ca
Update transaciton builder to only use input or data provided by user…
spacesailor24 7412abe
Add check for transaction.data for getEthereumjsTxDataFromTransaction
spacesailor24 9d56a31
Update PopulatedUnsignedBaseTransaction to have optional input and da…
spacesailor24 ee074e6
Update sign_transaction test
spacesailor24 2f03bb7
Update CHANGELOGs
spacesailor24 f32feb6
Merge branch '4.x' into wyatt/4.x/6183-input-data-refactor
spacesailor24 a5b195d
Merge branch '4.x' into wyatt/4.x/6183-input-data-refactor
spacesailor24 24ae148
Add fillInputAndData option to formatTransaction. Make options.transa…
spacesailor24 19023ea
Update tests
spacesailor24 1b0b30d
Update CHANGELOGs
spacesailor24 df836d5
Convert formattedTransaction. input and data to hex string before com…
spacesailor24 e75e379
Update test fixtures
spacesailor24 a4ca37c
Add options.fillInputAndData to decodeSignedTransaction
spacesailor24 d82de1a
Update sign_transaction fixture data
spacesailor24 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,7 @@ const getEthereumjsTxDataFromTransaction = ( | |
gasLimit: transaction.gasLimit ?? transaction.gas, | ||
to: transaction.to, | ||
value: transaction.value, | ||
data: transaction.input, | ||
data: transaction.data ?? transaction.input, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The property name is still |
||
type: transaction.type, | ||
chainId: transaction.chainId, | ||
accessList: ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
A new parameter,
fillInputAndData
, was added to theoptions
argument forformatTransaction
. This method is used for formatting both user submitted and RPC response transaction objects. So, we need a flag to determine whether to leave the transaction object as given, or fill in theinput
ordata
properties if they weren't present. ThefillInputAndData
option is set inrpc_method_wrappers.ts
for relevant methodsThere 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.
This, and things similar, needs to be in the documentation.