aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/abi_test.go
Commit message (Collapse)AuthorAgeFilesLines
* accounts/abi: tuple support (#18406)gary rong2019-01-101-17/+40
|
* accounts/abi: fix panic in MethodById lookup. Fixes #17797 (#17798)Martin Holst Swende2018-10-011-1/+10
|
* accounts/abi: Add one-parameter event test case from ↵Javier Peletier2018-03-051-1/+5
|\ | | | | | | enriquefynn/unpack_one_arg_event
| * accounts/abi: address review concernsMartin Holst Swende2018-02-211-1/+1
| |
| * accounts/abi: Deduplicate code in unpackerMartin Holst Swende2018-02-211-1/+1
| |
| * accounts/abi: add another unpack interfaceMartin Holst Swende2018-02-211-1/+5
| |
* | accounts/abi: use unpackTuple to unpack event argumentsFynn2018-02-161-1/+14
|/ | | | Events with just 1 argument fail before this change
* accounts/abi: merging of https://github.com/ethereum/go-ethereum/pull/15452 ↵Martin Holst Swende2017-12-231-6/+59
| | | | + lookup by id
* acounts/abi: refactor abi, generalize abi pack/unpack to ArgumentsMartin Holst Swende2017-12-231-4/+6
|
* Merge pull request #15285 from yondonfu/abi-offset-fixed-arraysMartin Holst Swende2017-12-211-0/+182
|\ | | | | 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-4/+136
| |
| * Merge branch 'master' into abi-offset-fixed-arraysYondon Fu2017-12-191-20/+1
| |\
| * | accounts/abi: include fixed array size in offset for dynamic typeYondon Fu2017-10-121-0/+50
| | |
* | | accounts/abi: remove check for len%32==0 when unpacking events (#15670)Bob Glickstein2017-12-211-0/+41
| |/ |/| | | | | | | | | This change inlines the logic of bytesAreProper at its sole callsite, ABI.Unpack, and applies the multiple-of-32 test only in the case of unpacking methods. Event data is not required to be a multiple of 32 bytes long.
* | accounts/abi: improve type handling, add event support (#14743)RJ Catalano2017-10-171-20/+1
|/
* accounts/abi: reorganizing package with small fixes (#14610)RJ Catalano2017-06-271-802/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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: added testcase to unpack []uint32tbocek2017-01-091-0/+24
|
* all: gofmt -w -sFelix Lange2017-01-061-14/+14
|
* accounts/abi: add support for function types (#3405)RJ2017-01-051-0/+13
|
* accounts/abi: add support for "anonymous" and "indexed" for events (#3464)bas-vk2016-12-221-9/+44
|
* accounts/abi: differentiate between static and dynamic arrays (#3121)RJ2016-11-041-4/+21
| | | | | solves #3119 Signed-off-by: VoR0220 <rj@erisindustries.com>
* accounts/abi: fix abi test for go vet...Péter Szilágyi2016-05-121-2/+2
|
* accounts/abi: fixed unpacking in to already slice interfacesJeffrey Wilcke2016-05-111-0/+31
| | | | | | | | | | | | | | | | Previously it was assumed that wheneven type `[]interface{}` was given that the interface was empty. The abigen rightfully assumed that interface slices which already have pre-allocated variable sets to be assigned. This PR fixes that by checking that the given `[]interface{}` is larger than zero and assigns each value using the generic `set` function (this function has also been moved to abi/reflect.go) and checks whether the assignment was possible. The generic assignment function `set` now also deals with pointers (useful for interface slice mentioned above) by dereferencing the pointer until it finds a setable type.
* accounts/abi: fixed string and fixed size bytes packingJeffrey Wilcke2016-04-281-74/+120
|
* accounts/abi: added unpacking "anything" in to interface{}Jeffrey Wilcke2016-04-281-0/+9
|
* accounts/abi: fixed strict go-like unpackingJeffrey Wilcke2016-04-281-22/+132
|
* accouns/abi: refactored ABI packageJeffrey Wilcke2016-04-201-141/+177
| | | | | | | | | | | | | | | | | 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: removed implicit type casting & refactored type parsingJeffrey Wilcke2016-04-051-11/+22
|
* abi: accept output slices of all supported typesJeffrey Wilcke2016-04-051-1/+70
|
* abi: accept input slices of all supported typesJeffrey Wilcke2016-04-051-72/+47
|
* accounts/abi/bind, cmd/abigen: Go API generator around an EVM ABIPéter Szilágyi2016-03-241-19/+19
|
* accounts/abi: Fixed bytes input accept []byte and variable input supportJeffrey Wilcke2016-03-151-0/+128
| | | | | | | | | 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`.
* all: Rename crypto.Sha3{,Hash}() to crypto.Keccak256{,Hash}()Ricardo Catalinas Jiménez2016-02-221-5/+5
| | | | As we aren't really using the standarized SHA-3
* accounts/abi: support for typed arrayJeffrey Wilcke2016-02-151-31/+75
| | | | | Added support for fixed size and arbitrary length byte arrays to be marshallable in fixed size (typed) byte slices.
* accounts/abi: fixed return tuple and string, bytes return type parsingJeffrey Wilcke2016-02-111-0/+233
| | | | | | | | | | | | | Removed old unmarshalling of return types: `abi.Call(...).([]byte)`. This is now replaced by a new syntax: ``` var a []byte err := abi.Call(&a, ...) ``` It also addresses a few issues with Bytes and Strings and can also handle both fixed and arbitrary sized byte slices, including strings.
* account/abi: implements event parsingJeffrey Wilcke2016-02-021-24/+58
| | | | | | Implementation of basic event parsing and its input types. This separates methods and events and fixes an issue with go type parsing and validation.
* accounts/abi: added output parsing & added call mechanismJeffrey Wilcke2015-11-251-8/+39
| | | | Added calling mechanism and return value parsing
* accounts/abi: ABI fixes & added typesJeffrey Wilcke2015-10-301-13/+62
| | | | | | | Changed field `input` to new `inputs`. Addad Hash and Address as input types. Added bytes[N] and N validation
* 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
|
* Implemented contract ABIobscuren2015-01-271-0/+330