Skip to content
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

ecrecover for transactions #498

Merged
merged 5 commits into from
Feb 13, 2025
Merged

ecrecover for transactions #498

merged 5 commits into from
Feb 13, 2025

Conversation

christophercampbell
Copy link
Contributor

@christophercampbell christophercampbell commented Feb 11, 2025

Description

Adds --tx option to ecrecover by transaction (hex format). It is exclusive with --block-number and --file. Also, --file is exclusive with --rpc-url

Jira / Linear Tickets

https://github.com/orgs/0xPolygon/projects/13/views/6?pane=issue&itemId=94575989

Testing

Positive case

polycli ecrecover --tx 
0x02f86e8205390284014740d385174876e800830186a09400000000000000000000000000000000000000000180c001a05850bab315b686a2bee6ba91b869867ca2f25e612d9ee771588e9efd10a4d3b8a0157972512263193e7a96f2
2c2269691733012d98cd715a9528fed02003260198

Old cases still work

polycli ecrecover --rpc-url https://polygon-rpc.com -b 12345678
0x0375b2fc7140977c9c76D45421564e354ED42277

Error cases

polycli ecrecover -t 0xdeadbeef
10:24AM ERR Unable to decode transaction error="rlp: value size exceeds available input length"
polycli ecrecover --rpc-url https://polygon-rpc.com -t 0xdeadbeef -b 1
Error: if any flags in the group [file block-number tx] are set none of the others can be; [block-number tx] were all set
polycli ecrecover -f ./somepath -t 0xdeadbeef
Error: if any flags in the group [file block-number tx] are set none of the others can be; [file tx] were all set

Copy link
Member

@praetoriansentry praetoriansentry left a comment

Choose a reason for hiding this comment

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

Thanks! this works perfectly

@praetoriansentry praetoriansentry merged commit 74cf942 into main Feb 13, 2025
6 checks passed
@praetoriansentry praetoriansentry deleted the feat/ecrecover-for-txs branch February 13, 2025 18:46
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.

2 participants