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

cmd: implement abidump #19958

Merged
merged 2 commits into from
Jan 21, 2020
Merged

cmd: implement abidump #19958

merged 2 commits into from
Jan 21, 2020

Conversation

holiman
Copy link
Contributor

@holiman holiman commented Aug 13, 2019

This PR implements abidump, a utility to parse calldata against the fourbyte directory database.

[user@work abidump]$ ./abidump 
Error: one argument needed
Usage: ./abidump <hexdata>

Parses the given ABI data and tries to interpret it from the fourbyte database.
[user@work abidump]$ ./abidump a9
WARNING: Transaction data is not valid ABI (missing the 4 byte call prefix)
[user@work abidump]$ ./abidump a9059cbb
WARNING: Transaction contains data, but provided ABI signature could not be verified: signature "function transfer(address , uint256 ) returns()" matches, but arguments mismatch: abi: cannot marshal in to go type: length insufficient 0 require 32
[user@work abidump]$ ./abidump a9059cbb000000000000000000000000ea0e2dc7d65a50e77fc7e84bff3fd2a9e781ff5c0000000000000000000000000000000000000000000000015af1d78b58c40000
Info: transfer(address: 0xEA0e2Dc7d65A50E77FC7E84bff3FD2A9E781ff5c,uint256: 25000000000000000000)

@holiman holiman changed the title Abidump cmd: implement abidump Aug 16, 2019
@holiman
Copy link
Contributor Author

holiman commented Oct 29, 2019

@karalabe you requested this once upon a time, over discord... Want it?

@holiman
Copy link
Contributor Author

holiman commented Nov 26, 2019

Rebased, let's see what travis thinks of it now

@holiman
Copy link
Contributor Author

holiman commented Nov 26, 2019

peter

@karalabe karalabe modified the milestones: 1.9.9, 1.9.10 Dec 6, 2019
@karalabe karalabe modified the milestones: 1.9.10, 1.9.11 Jan 21, 2020
@@ -0,0 +1,74 @@
// Copyright 2019 The go-ethereum Authors
Copy link
Member

Choose a reason for hiding this comment

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

it's 2020 now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but it wasn't when I wrote the code

Copy link
Member

Choose a reason for hiding this comment

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

you didn't specify a license when you wrote the code 😁

Copy link
Member

@gballet gballet left a comment

Choose a reason for hiding this comment

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

LGTM

@gballet gballet merged commit 33c56eb into ethereum:master Jan 21, 2020
kjx98 pushed a commit to kjx98/go-ethereum that referenced this pull request Jan 23, 2020
* abidump: implement abi dump command

* cmd/abidump: add license
enriquefynn pushed a commit to enriquefynn/go-ethereum that referenced this pull request Mar 10, 2021
* abidump: implement abi dump command

* cmd/abidump: add license
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.

4 participants