aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/type.go
Commit message (Collapse)AuthorAgeFilesLines
* accounts/abi: tuple support (#18406)gary rong2019-01-101-19/+122
|
* Add packing for dynamic array and slice types (#18051)Vedhavyas Singareddi2018-12-041-9/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * added tests for new abi encoding features (#4) * added tests from bytes32[][] and string[] * added offset to other types * formatting * Abi/dynamic types (#5) * Revert "Abi/dynamic types (#5)" (#6) This reverts commit dabca31d797623d43bd780721fc0ad461d24be53. * Abi/dynamic types (#7) * some cleanup * Apply suggestions from code review apply suggestions Co-Authored-By: vedhavyas <vedhavyas.singareddi@gmail.com> * added better formatting (#8) * review chnages * better comments
* abi, signer: fix nil dereference in #17633 (#17653) Martin Holst Swende2018-09-191-1/+6
| | | | | | * abi,signer: fix nil dereference in #17633 * signer/core: tiny typo fix in test error message
* accounts/abi: improve test coverage (#16044)Ricardo Domingos2018-04-041-1/+1
|
* accounts/abi: satisfy most of the linter warningsRobert Zaremba2017-12-211-58/+56
| | | | | | | + adding missing comments + small cleanups which won't significantly change function body. + unify Method receiver name
* accounts/abi: improve type handling, add event support (#14743)RJ Catalano2017-10-171-107/+103
|
* accounts/abi: reorganizing package with small fixes (#14610)RJ Catalano2017-06-271-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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: fix comment spelling errorPéter Szilágyi2017-01-131-1/+1
|
* accounts/abi: fixed broken types slice testcasesThomas Bocek2017-01-091-2/+7
| | | | | Check for slice in type as well and adapted test case as arrays also store its types.
* accounts/abi: fixed commentsJeffrey Wilcke2017-01-091-2/+3
|
* accounts/abi: support custom int slice typesThomas Bocek2017-01-091-1/+5
| | | | | | | | | | | | | | On solidity contract I have "uint32 []" type, when abigen creates Go bindings - they are also "[]uint32" type on Go side. Even though it looks like it should work - the actual type of the data coming from the chain is of type " []*big.Int". When executing contract function from Go side - getting unmarshal error: abi: cannot unmarshal []*big.Int in to []uint32 The fix is to create array with the correct type This fixed the issue reported in: https://github.com/ethereum/go-ethereum/issues/2802
* all: fix issues reported by honnef.co/go/simple/cmd/gosimpleFelix Lange2017-01-071-1/+1
|
* accounts/abi: add support for function types (#3405)RJ2017-01-051-1/+8
|
* accounts/abi: clean up PR and add type parsing testsPéter Szilágyi2016-12-191-5/+4
|
* accounts/abi: prepare ABI to handle fixed point typesVoR02202016-12-191-5/+6
| | | | Signed-off-by: VoR0220 <rj@erisindustries.com>
* accounts/abi: differentiate between static and dynamic arrays (#3121)RJ2016-11-041-2/+7
| | | | | solves #3119 Signed-off-by: VoR0220 <rj@erisindustries.com>
* accounts/abi: fixed string and fixed size bytes packingJeffrey Wilcke2016-04-281-1/+8
|
* accouns/abi: refactored ABI packageJeffrey Wilcke2016-04-201-124/+54
| | | | | | | | | | | | | | | | | 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-41/+57
|
* abi: accept output slices of all supported typesJeffrey Wilcke2016-04-051-3/+2
|
* abi: accept input slices of all supported typesJeffrey Wilcke2016-04-051-63/+56
|
* accounts/abi: Fixed bytes input accept []byte and variable input supportJeffrey Wilcke2016-03-151-1/+14
| | | | | | | | | 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: fixed return tuple and string, bytes return type parsingJeffrey Wilcke2016-02-111-0/+10
| | | | | | | | | | | | | 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-1/+1
| | | | | | 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-3/+9
| | | | Added calling mechanism and return value parsing
* accounts/abi: ABI fixes & added typesJeffrey Wilcke2015-10-301-2/+12
| | | | | | | 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
|
* Moved ethutil => commonobscuren2015-03-161-5/+5
|
* Implemented contract ABIobscuren2015-01-271-0/+190