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

decode doesn't work #180

Open
simplespy opened this issue Feb 8, 2020 · 1 comment
Open

decode doesn't work #180

simplespy opened this issue Feb 8, 2020 · 1 comment

Comments

@simplespy
Copy link

simplespy commented Feb 8, 2020

Is the parameter of ethabi decode the same as the output of encode? I got Error: Ethabi(InvalidData) all the time.

json:

[{
	"type":"function",
	"inputs":[{
		"name":"b",
		"type":"bool"
	}],
	"name":"foo",
	"outputs": []
}]
  • encode:
    ethabi encode function ./example.json foo -p 1

  • get
    455575780000000000000000000000000000000000000000000000000000000000000001

  • decode:
    ethabi decode function ./example.json foo 455575780000000000000000000000000000000000000000000000000000000000000001

  • get:
    Error: Ethabi(InvalidData)

@midnightexigent
Copy link

hey this is more than a year later but did you manage to fix the issue ? I am facing the same problem..

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

No branches or pull requests

2 participants