go-ethereum/accounts/abi
Thomas Bocek 39f1d909d1 [release/1.4.7] accounts/abi: Negative numbers not properly converted in ABI encoding
When converting a negative number e.g., -2, the resulting ABI encoding
should look as follows:
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe.
However, since the check of the type is for an uint instead of an
int, it results in the following ABI encoding:
0101010101010101010101010101010101010101010101010101010101010102. The
Ethereum ABI
(https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI) says,
that signed integers are stored in two's complement which should be
of the form ffffff.... and not 01010101..... for e.g. -1. Thus, I
removed the type check in numbers.go as well as the function S256
as I don't think they are correct. Or maybe I'm missing something?

(cherry picked from commit 89c6c5bb85)
2016-06-14 17:11:57 +03:00
..
bind [release 1.4.5] accounts/abi/bind, eth: rely on getCode for sanity checks, not estimate and call 2016-05-24 09:33:15 +02:00
abi.go [release/1.4.4] accounts/abi: fixed unpacking in to already slice interfaces 2016-05-12 17:19:29 +02:00
abi_test.go [release 1.4.5] accounts/abi: fix abi test for go vet... 2016-05-24 09:45:40 +02:00
argument.go account/abi: implements event parsing 2016-02-02 15:28:59 +01:00
doc.go all: fix license headers one more time 2015-07-23 18:35:11 +02:00
error.go accounts/abi: fixed string and fixed size bytes packing 2016-04-28 12:41:47 +02:00
event.go all: Rename crypto.Sha3{,Hash}() to crypto.Keccak256{,Hash}() 2016-02-21 22:34:34 +00:00
event_test.go all: update license information 2016-04-15 09:48:05 +02:00
method.go [release/1.4.7] accounts/abi: Negative numbers not properly converted in ABI encoding 2016-06-14 17:11:57 +03:00
numbers.go [release/1.4.7] accounts/abi: Negative numbers not properly converted in ABI encoding 2016-06-14 17:11:57 +03:00
numbers_test.go [release/1.4.7] accounts/abi: Negative numbers not properly converted in ABI encoding 2016-06-14 17:11:57 +03:00
packing.go [release/1.4.7] accounts/abi: Negative numbers not properly converted in ABI encoding 2016-06-14 17:11:57 +03:00
reflect.go [release/1.4.4] accounts/abi: fixed unpacking in to already slice interfaces 2016-05-12 17:19:29 +02:00
type.go accounts/abi: fixed string and fixed size bytes packing 2016-04-28 12:41:47 +02:00