-
Notifications
You must be signed in to change notification settings - Fork 13
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
[WIP]Feat: add EIP-1559 transaction type #12
[WIP]Feat: add EIP-1559 transaction type #12
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.
Hey! Thank you for your contribution! That was fast!
Congratulations on being the first external contributor.
I left a couple of comments. Could you also include a test to validate the encoding/decoding?
@@ -38,7 +53,26 @@ library Transactions { | |||
return RLPWriter.writeList(items); | |||
} | |||
|
|||
function decodeRLP(bytes memory rlp) internal pure returns (Legacy memory) { | |||
function encodeRLP(EIP1559 memory txStruct) internal pure returns (bytes memory) { | |||
bytes[] memory items = new bytes[](12); |
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.
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 just fixed this, lmk if it is still not correct.
src/Transactions.sol
Outdated
bytes v; | ||
} | ||
|
||
function encodeLegacyRLP(Legacy memory txStruct) internal pure returns (bytes memory) { |
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.
Can you keep the same name here? I imagine having the same encodeRLP
name overloaded for both transactions.
I made some changes to the encoding of legacy transactions. You'll need to pull the new changes. |
Cool will do. |
Hey @haythemsellami. Do you need any help on the PR? |
Trying to finish the test and make it working, but I may have a bug in the encoding implementation as the output is not matching(maybe the access list encoding is wrong?) |
Closing this in favour of #36. |
No description provided.