ethabi icon indicating copy to clipboard operation
ethabi copied to clipboard

decode doesn't work

Open simplespy opened this issue 5 years ago • 1 comments

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)

simplespy avatar Feb 08 '20 00:02 simplespy

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

midnightexigent avatar May 08 '21 08:05 midnightexigent