Skip to content

Conversation

@tomip01
Copy link
Contributor

@tomip01 tomip01 commented Dec 4, 2025

Important

This may break scripts with deploy, transfer, sign, deposit, claim-withdraw and withdraw

Description

Make overall improvements to rex CLI UX.

Changes

Better Output Formatting

  • Add function for readable transaction receipt display after transfer, send, and deploy commands
  • Add function for readable transaction output with input data as hex string (instead of raw bytes)
  • Add --cast (-c) flag to skip waiting for receipt (send async)
  • Add --silent (-s) flag to suppress receipt output

CLI Ergonomics

  • Change private_key from positional argument to --private-key flag (also reads from PRIVATE_KEY env var)
  • Change rpc_url from positional argument to --rpc-url flag with sane defaults
  • Add keccak as visible alias for hash command

Calldata Parsing Improvements

  • Fix bytes parsing to accept 0x prefix (e.g., 0x1234 now works, not just 1234)
  • Add support for fixed-size array types in encode-calldata (e.g., uint64[3] with [1234,5678,9012])

Documentation

  • Update README with new commands: create2-address, encode-calldata, decode-calldata, authorize
  • Update README to show keccak alias for hash command

Examples

Better receipt print

$ rex receipt 0xdb71a29300fd372ced76e37260034e1e7c48334889fad676f017630e490d67df
Receipt for transaction 0xdb71a29300fd372ced76e37260034e1e7c48334889fad676f017630e490d67df:
  transaction index:    126
  from:                 0x000aebc2568796fdb763cab67b31e0fee58fe17d
  to:                   0x039efa1cb568c5daa8c41ad887d9332ce68a9a06
  gas used:             94838
  effective gas price:  1200008
  contract address:
  blob gas price:
  blob gas used:
  status:               success
  cumulative gas used:  12095726
  logs bloom:           0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000080000000000000000000000000000000000000002000000000000000000000000000000000000000000040000000020000000000000000000000000000000000000000000000000000400000000000000000000000800000000000000000000000000000000000000000800000000000000000000
  tx type:              EIP1559
  block hash:           0x922c7afbb9f4845579bce116224c3e24697137c7b256a49b899a7a637d51344a
  block number:         153
  transaction hash:     0xdb71a29300fd372ced76e37260034e1e7c48334889fad676f017630e490d67df
  logs:
    [126] address:      0x039efa1cb568c5daa8c41ad887d9332ce68a9a06
         topics:
           [0] 0x7d76dd36798b00b9c38def780dc4741f49a0f441afba4260388a8f5634eac186
           [1] 0x000000000000000000000000000aebc2568796fdb763cab67b31e0fee58fe17d
         data: 0x000000000000000000000000000000000000000000000000000000000000ffff000000000000000000000000000000000000000000000000000000000000ffff000000000000000000000000000000000000000000000000000000000000007e0000000000000000000000000000000000000000019d971e4fe8401e740000000000000000000000000000000000000000000000000000000000000000019a2800000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000024b0f4d395000000000000000000000000000aebc2568796fdb763cab67b31e0fee58fe17d00000000000000000000000000000000000000000000000000000000

Better Transaction Display (rex tx)

$ rex tx 0x149eaf7a3873ff49a9e2800e261abbe44115d860e9640c2587f94b31ae8bd7ab
Transaction 0x149eaf7a3873ff49a9e2800e261abbe44115d860e9640c2587f94b31ae8bd7ab:
  type:               EIP1559
  from:               0x17d6e059e156e245871c9995b0e8add553d50d79
  to:                 0xd15fe25ed0dba12fe05e7029c88b10c25e8880e3
  value:              2225362083535689
  nonce:              3524
  gas limit:          100000
  max fee per gas:    927742796
  max priority fee:   0
  chain id:           560048
  input:              0xe63d38ed00000000000000000000000000000000...

Keccak Alias

$ rex keccak --input 0x1234
0x56570de287d73cd1cb6092bb8fdee6173974955fdef345ae579ee9f475ea7432

Bytes Parsing with 0x Prefix

$ rex encode-calldata "test(bytes)" 0x1234
0x2f570a2300000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002123400...

Array Types Support

$ rex encode-calldata "test(uint64[3])" "[1234,5678,9012]"
0x479b0b4d00000000000000000000000000000000000000000000000000000000000004d2000000000000000000000000000000000000000000000000000000000000162e0000000000000000000000000000000000000000000000000000000000002334

tomip01 and others added 8 commits December 4, 2025 12:22
…ata parsing

- Add print_transaction function for readable tx output with hex input
- Add 'keccak' as visible alias for 'hash' command
- Fix bytes parsing to accept 0x prefix
- Add support for array types in encode-calldata (e.g. uint64[3])
@JereSalo JereSalo changed the title General ux cli refactor(cli): General ux improvements Jan 15, 2026
@JereSalo JereSalo changed the title refactor(cli): General ux improvements refactor(cli): general ux improvements Jan 15, 2026
@JereSalo JereSalo marked this pull request as ready for review January 16, 2026 14:09
@JereSalo JereSalo requested a review from a team as a code owner January 16, 2026 14:09
Copy link
Contributor Author

@tomip01 tomip01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, two small comments

@JereSalo JereSalo enabled auto-merge (squash) January 16, 2026 21:17
@JereSalo JereSalo merged commit 54985f7 into main Jan 16, 2026
10 checks passed
@JereSalo JereSalo deleted the general_ux_cli branch January 16, 2026 21:22
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.

3 participants