aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/bind/bind_test.go
Commit message (Collapse)AuthorAgeFilesLines
* accounts/abi/bind: stop using goimports in the binding generator (#17768)Jeremy Schlatter2018-10-061-16/+126
|
* backends: configurable gas limit to allow testing large contracts (#17358)Jeff Prestes2018-08-151-12/+12
| | | | | | | | * backends: increase gaslimit in order to allow tests of large contracts * backends: increase gaslimit in order to allow tests of large contracts * backends: increase gaslimit in order to allow tests of large contracts
* accounts/abi: normalize method name to a camel-case string (#15976)Mark2018-03-071-5/+11
|
* accounts/abi: Abi binding support for nested arrays, fixes #15648, including ↵protolambda2018-03-051-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/bind: support event filtering in abigenPéter Szilágyi2018-01-241-1/+230
|
* all: switch gas limits from big.Int to uint64Péter Szilágyi2018-01-031-1/+0
|
* accounts/abi: handle named ouputs prefixed with underscores (#15766)Péter Szilágyi2017-12-301-0/+62
| | | | | | | | * accounts/abi: handle named ouputs prefixed with underscores * accounts/abi: handle collinding outputs for struct unpacks * accounts: handle purely underscore output names
* all: gofmt -w -s (#15419)ferhat elmas2017-11-081-1/+1
|
* accounts/abi: improve type handling, add event support (#14743)RJ Catalano2017-10-171-1/+1
|
* accounts/abi/bind: pass non-empty directory when calling goimports (#15070)nkbai2017-09-081-1/+1
|
* core: refactor genesis handlingFelix Lange2017-03-231-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | This commit solves several issues concerning the genesis block: * Genesis/ChainConfig loading was handled by cmd/geth code. This left library users in the cold. They could specify a JSON-encoded string and overwrite the config, but didn't get any of the additional checks performed by geth. * Decoding and writing of genesis JSON was conflated in WriteGenesisBlock. This made it a lot harder to embed the genesis block into the forthcoming config file loader. This commit changes things so there is a single Genesis type that represents genesis blocks. All uses of Write*Genesis* are changed to use the new type instead. * If the chain config supplied by the user was incompatible with the current chain (i.e. the chain had already advanced beyond a scheduled fork), it got overwritten. This is not an issue in practice because previous forks have always had the highest total difficulty. It might matter in the future though. The new code reverts the local chain to the point of the fork when upgrading configuration. The change to genesis block data removes compression library dependencies from package core.
* accounts/abi/bind: allow client to specify sender address for call (#3782)bas-vk2017-03-161-0/+39
|
* accounts/abi/bind, internal/ethapi: binary search gas estimation (#3587)Péter Szilágyi2017-01-211-4/+47
| | | | | | | | | | | | | Gas estimation currently mostly works, but can underestimate for more funky refunds. This is because various ops (e.g. CALL) need more gas to run than they actually consume (e.g. 2300 stipend that is refunded if not used). With more intricate contract interplays, it becomes almost impossible to return a proper value to the user. This commit swaps out the simplistic gas estimation to a binary search approach, honing in on the correct gas use. This does mean that gas estimation needs to rerun the transaction log(max-price) times to measure whether it fails or not, but it's a price paid by the transaction issuer, and it should be worth it to support proper estimates.
* mobile: initial wrappers for mobile supportPéter Szilágyi2016-11-141-1/+1
|
* accounts/abi/bind/backends: remove nil and remote backendsFelix Lange2016-08-211-9/+9
| | | | | | | | | | | | The remote backend is superseded by ethclient. The nil backend's stated purpose was to enable testing of accounts/abi/bind. None of its methods actually worked. A much simpler way to get a crashing backend is to simply pass nil as the backend. With a one-line change to the generator (removing two explicit interface assertions), passing nil actually works. Removing these backends means that less changes are required later.
* accounts/abi/bind: fix multi-value anonymous unmarshallingPéter Szilágyi2016-05-121-2/+36
|
* accounts/abi/bind, eth: add contract non-existent errorPéter Szilágyi2016-04-271-0/+28
|
* accounts, crypto: move keystore to package accountsFelix Lange2016-04-121-21/+13
| | | | | | | | | | The account management API was originally implemented as a thin layer around crypto.KeyStore, on the grounds that several kinds of key stores would be implemented later on. It turns out that this won't happen so KeyStore is a superflous abstraction. In this commit crypto.KeyStore and everything related to it moves to package accounts and is unexported.
* accounts/abi/bind: support generating bindings for various arraysPéter Szilágyi2016-04-051-0/+44
|
* accounts/abi/bind: surface raw wrappers to access low level opsPéter Szilágyi2016-04-011-3/+42
|
* accounts/abi/bind: merge all tests into a single suitePéter Szilágyi2016-03-311-22/+22
|
* accounts/abi/bind: fix double pointer in generated codePéter Szilágyi2016-03-251-0/+32
|
* accounts/abi/bind, cmd/abigen: port to templates, bind to solidityPéter Szilágyi2016-03-241-20/+135
|
* accounts/abi/bind: constructor, auth utils and various backendsPéter Szilágyi2016-03-241-8/+8
|
* accounts/abi/bind, cmd/abigen: Go API generator around an EVM ABIPéter Szilágyi2016-03-241-0/+140