Skip to content

Conversation

@tomip01
Copy link
Contributor

@tomip01 tomip01 commented Nov 26, 2025

Note

This PR changes the ethrex pinned version to a branch instead of main
We should wait for the changes to be included in main

Motivation

We want to support the new RPC endpoints for ethrex_* implemented

Description

  • Add new fee-token option to the l2 transfers in rex cli
  • Add new commands for L2 nodes:
    • get-fee-info
    • batch-number
    • batch-by-number
    • sponsor-tx
  • Add new command authorize for creating authorization tuples
  • The command send now accepts --auth-tuple for sending EIP-7702 transactions

Examples

  • Fee token:
$ rex l2 transfer 100000 0x0001e8ff6406a7cd9071f46b8255db6c16178448 0x274442f0dabd2d7f8ce904e7f2616d9c10807e5856266d160bc6a89ec08150cf http://localhost:1729 --fee-token 0x7bb24837d49ac33b0a8d279728cd68a0a73bf710
...
0xbbc51b3491f1a6ad0f3c50bee3462b675534cd1812e3b2cc04bc843bdf1ff48a
  • Fee info:
$ rex l2 get-fee-info
L2 fee info for block 192:
  Base fee vault:                     0x000c0d6b7c4516a5b274c51ea331a9410fe69127
  Operator fee vault:                 0xd5d2a85751b6f158e5b9b8cd509206a865672362
  L1 fee vault:
  Operator fee (wei/gas):             1000000000
  L1 blob base fee (wei/blob-gas):
  • Batch by number:
$ rex l2 batch-by-number --batch-number 5
Batch info for batch 5
  Number:                         5
  First block:                    104
  Last block:                     116
  State root:                     0x7af359bb1c3a6154fb8ef96e44c67add53b3642f72eb24bc79377cea91bc9382
  Privileged transactions hash:   0x0000000000000000000000000000000000000000000000000000000000000000
  Commit tx:                      0x1fb1db71445838ad8b77619ca27e973dba172b59bd07c1c596af92fd0f2ae270
  Verify tx:
  • Batch number:
$ rex l2 batch-number
51
  • Creating authorization tuples:
$ rex authorize 0x4417092b70a3e5f10dc504d0947dd256b965fc62 --private-key 0x274442f0dabd2d7f8ce904e7f2616d9c10807e5856266d160bc6a89ec08150cf
0xf85a09944417092b70a3e5f10dc504d0947dd256b965fc620180a045931af8f6b5d5e899ec7f613e8680fe362ada6c0ab82d7a945e5214942b88dda022c97283390b7c96e63e787533998067742bdfe3ae48e725e64582561090f645
  • Sending a sponsored transaction:

First in ethrex_l2_hub rex deploy --contract-path contracts/src/Delegation.sol 0 0x941e103320615d394a55708be13e45994c7d93b932b064dbcb2b511fe3254e2e --remappings "@solady=https://github.com/Vectorized/solady" --keep-deps --rpc-url http://localhost:1729

Then run ethrex l2 --dev --no-monitor --sponsorable-addresses ~/sponsorable.txt with in sponsorable.txt 0x00e29d532f1c62a923ee51ee439bfc1500b1ce4d

$ rex l2 sponsor-tx 0x00e29d532f1c62a923ee51ee439bfc1500b1ce4d --auth-list "0xf85a099400e29d532f1c62a923ee51ee439bfc1500b1ce4d0101a0853976afa02dd0b7ffecf1e834f9827eef600a5c1acec8ecfa21c2e8834418eda03aa9bb44397036abb3f387e7a5466076de2224e004aa7e49a1f58f2bc2300673"
0x4cc7cd6bb1bd32e401523bd6169b02f50b78e29079d0eeae3412c20499669ddd
  • Sending an EIP 7702 transaction:
$ rex l2 send 0x00e29d532f1c62a923ee51ee439bfc1500b1ce4d http://localhost:1729 --private-key 0x274442f0dabd2d7f8ce904e7f2616d9c10807e5856266d160bc6a89ec08150cf --auth-tuple 0xf85e8403e803e79400e29d532f1c62a923ee51ee439bfc1500b1ce4d8001a09a1eb71526509ba843c1be6ccb80b57f2d87c767696f0235e0d61d7d2dd88965a07fee5d890b4a2a4ee34f674cefc62df3086994a093f06760fd45aa590aac9ac3 --gas-limit 210000
0x34a4202951a0d002916a934782655551d1ce230ce14e61dd5aaa4669f984d7c7
[1/100] Retrying to get transaction receipt for 0x34a4202951a0d002916a934782655551d1ce230ce14e61dd5aaa4669f984d7c7

Closes #72

@tomip01 tomip01 changed the title support new ethrex functionality feat(sdk): support new ethrex functionality Nov 27, 2025
@tomip01 tomip01 changed the title feat(sdk): support new ethrex functionality feat(sdk,cli): support new ethrex functionality Nov 27, 2025
@tomip01 tomip01 marked this pull request as ready for review November 28, 2025 15:55
@tomip01 tomip01 requested a review from a team as a code owner November 28, 2025 15:55
@tomip01 tomip01 self-assigned this Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

authorize command

2 participants