Return authorization list for SetCodeTx type#821
Conversation
WalkthroughThe changes introduce support for an Changes
Sequence Diagram(s)sequenceDiagram
participant TestSuite as JavaScript Test
participant PublicClient as publicClient
participant Node as Ethereum Node
TestSuite->>PublicClient: getTransaction({ hash })
PublicClient->>Node: eth_getTransactionByHash
Node-->>PublicClient: Transaction (with AuthorizationList)
PublicClient-->>TestSuite: Transaction object
TestSuite->>PublicClient: getTransactionReceipt({ hash })
PublicClient->>Node: eth_getTransactionReceipt
Node-->>PublicClient: Receipt
PublicClient-->>TestSuite: Receipt object
Note over TestSuite: Assert fields on transaction and receipt, including AuthorizationList
Suggested labels
Suggested reviewers
Poem
Tip ⚡️ Faster reviews with caching
Enjoy the performance boost—your workflow just got faster. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (4)
⏰ Context from checks skipped due to timeout of 90000ms (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
| result.BlobVersionedHashes = tx.BlobHashes() | ||
| } | ||
|
|
||
| if tx.Type() > types.BlobTxType { |
There was a problem hiding this comment.
Can you explain this check here? And maybe add https://eip7702.io/#specification to the comments for reference.
There was a problem hiding this comment.
Good point, the checks can be a bit difficult to grasp. Added some helpful comments in 3ceea86 .
c70035f to
3ceea86
Compare
| size: tx.Size(), | ||
| } | ||
|
|
||
| // After the Pectra hard-fork, the full list of supported tx types is: |
Description
As described in the specification: https://eip7702.io/#specification, the new
SetCodeTxtype, has an authorization list:Example:
{ address: '0x313af46a48eeb56d200fae0edb741628255d379f', chainId: 646, nonce: 4, r: '0xf4bc19cca28390f3628cfcda9076a8744b77cc87fa4f7745efa83b7a06cc3514', s: '0x1d736fecc68ee92ab6fd805d91a3e3dbf27097d3578561402d7105eeeee00bb7', yParity: 0 }We need to include this information in the result of
eth_getTransactionByHashJSON-RPC endpoint.For contributor use:
masterbranchFiles changedin the Github PR explorerSummary by CodeRabbit
New Features
Tests