aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/argument.go
Commit message (Collapse)AuthorAgeFilesLines
* accounts/abi: tuple support (#18406)gary rong2019-01-101-70/+117
|
* accounts/abi: change unpacking of abi fields w/ underscores (#16513)Matt K2018-12-291-9/+8
| | | | | | | | | | | | | | * accounts/abi: fix name styling when unpacking abi fields w/ underscores ABI fields with underscores that are being unpacked into structs expect structs with following form: int_one -> Int_one whereas in abigen the generated structs are camelcased int_one -> IntOne so updated the unpack method to expect camelcased structs as well.
* fix string array unpack bug in accounts/abi (#18364)weimumu2018-12-281-1/+1
|
* Add packing for dynamic array and slice types (#18051)Vedhavyas Singareddi2018-12-041-12/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* accounts/abi: allow abi: tags when unpacking structsGuillaume Ballet2018-05-141-24/+20
| | | | | | Go code users can now tag event struct members with `abi:` to specify in what fields the event will be de-serialized. See PR #16648 for details.
* accounts/abi: Modified unpackAtomic to accept struct lvaluesJavier Peletier2018-03-051-18/+32
|
* accounts/abi: Abi binding support for nested arrays, fixes #15648, including ↵protolambda2018-03-051-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nested array unpack fix (#15676) * accounts/abi/bind: support for multi-dim arrays Also: - reduce usage of regexes a bit. - fix minor Java syntax problems Fixes #15648 * accounts/abi/bind: Add some more documentation * accounts/abi/bind: Improve code readability * accounts/abi: bugfix for unpacking nested arrays The code previously assumed the arrays/slices were always 1 level deep. While the packing supports nested arrays (!!!). The current code for unpacking doesn't return the "consumed" length, so this fix had to work around that by calculating it (i.e. packing and getting resulting length) after the unpacking of the array element. It's far from ideal, but unpacking behaviour is fixed now. * accounts/abi: Fix unpacking of nested arrays Removed the temporary workaround of packing to calculate size, which was incorrect for slice-like types anyway. Full size of nested arrays is used now. * accounts/abi: deeply nested array unpack test Test unpacking of an array nested more than one level. * accounts/abi: Add deeply nested array pack test Same as the deep nested array unpack test, but the other way around. * accounts/abi/bind: deeply nested arrays bind test Test the usage of bindings that were generated for methods with multi-dimensional (and not just a single extra dimension, like foo[2][3]) array arguments and returns. edit: trigger rebuild, CI failed to fetch linter module. * accounts/abi/bind: improve array binding wrapArray uses a regex now, and arrayBindingJava is improved. * accounts/abi: Improve naming of element size func The full step size for unpacking an array is now retrieved with "getFullElemSize". * accounts/abi: support nested nested array args Previously, the code only considered the outer-size of the array, ignoring the size of the contents. This was fine for most types, but nested arrays are packed directly into it, and count towards the total size. This resulted in arguments following a nested array to replicate some of the binary contents of the array. The fix: for arrays, calculate their complete contents size: count the arg.Type.Elem.Size when Elem is an Array, and repeat when their child is an array too, etc. The count is the number of 32 byte elements, similar to how it previously counted, but nested. * accounts/abi: Test deep nested arr multi-arguments Arguments with a deeply nested array should not cause the next arguments to be read from the wrong position.
* accounts/abi: address review concernsMartin Holst Swende2018-02-211-15/+3
|
* accounts/abi: Deduplicate code in unpackerMartin Holst Swende2018-02-211-50/+31
|
* accounts/abi: add another unpack interfaceMartin Holst Swende2018-02-211-9/+50
|
* various: remove redundant parentheses (#15793)Furkan KAMACI2018-01-031-1/+1
|
* accounts/abi: handle named ouputs prefixed with underscores (#15766)Péter Szilágyi2017-12-301-2/+28
| | | | | | | | * accounts/abi: handle named ouputs prefixed with underscores * accounts/abi: handle collinding outputs for struct unpacks * accounts: handle purely underscore output names
* accounts/abi: merging of https://github.com/ethereum/go-ethereum/pull/15452 ↵Martin Holst Swende2017-12-231-35/+36
| | | | + lookup by id
* acounts/abi: refactor abi, generalize abi pack/unpack to ArgumentsMartin Holst Swende2017-12-231-0/+161
|
* accounts/abi: satisfy most of the linter warningsRobert Zaremba2017-12-211-0/+1
| | | | | | | + 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-0/+10
| | | | | | | | | | | | | | + 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
* core/vm: move Log to core/typesFelix Lange2017-01-061-2/+2
| | | | | | | | This significantly reduces the dependency closure of ethclient, which no longer depends on core/vm as of this change. All uses of vm.Logs are replaced by []*types.Log. NewLog is gone too, the constructor simply returned a literal.
* accounts/abi: add support for "anonymous" and "indexed" for events (#3464)bas-vk2016-12-221-0/+2
|
* account/abi: implements event parsingJeffrey Wilcke2016-02-021-2/+3
| | | | | | 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-0/+48
Added calling mechanism and return value parsing