aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/method.go
Commit message (Collapse)AuthorAgeFilesLines
* accounts/abi: argument type and name were reversed (#17947)tzapu2018-12-131-3/+3
| | | argument type and name were reversed
* accounts/abi: refactor Method#Sig() to use index in range iterator directly ↵Roc Yu2018-07-191-3/+1
| | | | (#17198)
* acounts/abi: refactor abi, generalize abi pack/unpack to ArgumentsMartin Holst Swende2017-12-231-126/+2
|
* accounts/abi: satisfy most of the linter warningsRobert Zaremba2017-12-211-27/+23
| | | | | | | + adding missing comments + small cleanups which won't significantly change function body. + unify Method receiver name
* accounts/abi: fix event unpack into sliceRobert Zaremba2017-12-211-9/+7
| | | | | | | | | | | | | | + The event slice unpacker doesn't correctly extract element from the slice. The indexed arguments are not ignored as they should be (the data offset should not include the indexed arguments). + The `Elem()` call in the slice unpack doesn't work. The Slice related tests fails because of that. + the check in the loop are suboptimal and have been extracted out of the loop. + extracted common code from event and method tupleUnpack
* Merge pull request #15285 from yondonfu/abi-offset-fixed-arraysMartin Holst Swende2017-12-211-1/+12
|\ | | | | accounts/abi: include fixed array size in offset for dynamic type
| * accounts/abi: update array type check in method.go. Add more packing testsYondon Fu2017-12-191-2/+2
| |
| * Merge branch 'master' into abi-offset-fixed-arraysYondon Fu2017-12-191-0/+79
| |\
| * | accounts/abi: include fixed array size in offset for dynamic typeYondon Fu2017-10-121-1/+12
| | |
* | | accounts/abi: update array length after parsing array (#15618)Dmitry Shulyak2017-12-201-4/+5
| |/ |/| | | Fixes #15617
* | accounts/abi: improve type handling, add event support (#14743)RJ Catalano2017-10-171-0/+79
|/
* accounts/abi: reorganizing package with small fixes (#14610)RJ Catalano2017-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * accounts/abi: reorganizing package and some notes and a quick correction of name. Signed-off-by: RJ Catalano <rj@monax.io> get rid of some imports Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: move file names Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: fix boolean decode function Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: fix for the array set and for creating a bool Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: be very very very correct Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: fix up error message and variable names Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: take out unnecessary argument in pack method Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: add bool unpack test and add a panic to readBool function Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: fix panic message Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: change from panic to basic error Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: fix nil to false Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: fill out type regex tests and fill with the correct type for integers Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: move packNumbers into pack.go. Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: separation of the testing suite into appropriately named files. Signed-off-by: RJ Catalano <rj@monax.io> * account/abi: change to hex string tests. Signed-off-by: RJ Catalano <rj@monax.io> * account/abi: fix up rest of tests to hex Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: declare bool at the package level Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: use errors package in the error file. Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: fix ugly hack and fix error type declaration. Signed-off-by: RJ Catalano <rj@monax.io>
* accounts/abi: Negative numbers not properly converted in ABI encodingThomas Bocek2016-06-061-1/+1
| | | | | | | | | | | | | | | 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?
* accounts/abi: fixed string and fixed size bytes packingJeffrey Wilcke2016-04-281-1/+1
|
* accouns/abi: refactored ABI packageJeffrey Wilcke2016-04-201-0/+39
| | | | | | | | | | | | | | | | | 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
* accounts/abi: handle the "constant" modifier for functionsPéter Szilágyi2016-03-161-2/+5
|
* all: Rename crypto.Sha3{,Hash}() to crypto.Keccak256{,Hash}()Ricardo Catalinas Jiménez2016-02-221-1/+1
| | | | As we aren't really using the standarized SHA-3
* accounts/abi: added output parsing & added call mechanismJeffrey Wilcke2015-11-251-0/+76
Added calling mechanism and return value parsing