aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/numbers.go
Commit message (Collapse)AuthorAgeFilesLines
* accounts/abi: fix uint64 upper range encoding.Péter Szilágyi2016-06-101-9/+3
|
* accounts/abi: Negative numbers not properly converted in ABI encodingThomas Bocek2016-06-061-38/+4
| | | | | | | | | | | | | | | 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?
* accouns/abi: refactored ABI packageJeffrey Wilcke2016-04-201-2/+2
| | | | | | | | | | | | | | | | | Refactored the abi package parsing and type handling. Relying mostly on package reflect as opposed to most of our own type reflection. Our own type reflection is still used however for cases such as Bytes and FixedBytes (abi: bytes•). This also inclused several fixes for slice handling of arbitrary and fixed size for all supported types. This also further removes implicit type casting such as assigning, for example `[2]T{} = []T{1}` will fail, however `[2]T{} == []T{1, 2}` (notice assigning *slice* to fixed size *array*). Assigning arrays to slices will always succeed if they are of the same element type. Incidentally also fixes #2379
* abi: accept input slices of all supported typesJeffrey Wilcke2016-04-051-2/+0
|
* accounts/abi: Fixed bytes input accept []byte and variable input supportJeffrey Wilcke2016-03-151-28/+30
| | | | | | | | | Fixed up `[]byte` slice support such that `function print(bytes input)` accepts `[]byte` as input and treats it as 1 element rather than a slice of multiple elements. Added support for variable length input parameters like `bytes` and `strings`.
* accounts/abi: added output parsing & added call mechanismJeffrey Wilcke2015-11-251-0/+2
| | | | Added calling mechanism and return value parsing
* all: fix license headers one more timeFelix Lange2015-07-241-1/+1
| | | | I forgot to update one instance of "go-ethereum" in commit 3f047be5a.
* all: update license headers to distiguish GPL/LGPLFelix Lange2015-07-231-4/+4
| | | | | All code outside of cmd/ is licensed as LGPL. The headers now reflect this by calling the whole work "the go-ethereum library".
* all: update license informationFelix Lange2015-07-071-0/+16
|
* Moved ethutil => commonobscuren2015-03-161-5/+5
|
* Implemented contract ABIobscuren2015-01-271-0/+106