Commit Graph

18 Commits

Author SHA1 Message Date
Péter Szilágyi 4d05bbf2a4
accounts/abi: clean up PR and add type parsing tests 2016-12-19 14:11:11 +02:00
VoR0220 471990f771
accounts/abi: prepare ABI to handle fixed point types
Signed-off-by: VoR0220 <rj@erisindustries.com>
2016-12-19 14:11:11 +02:00
RJ 2ad5dba50a accounts/abi: differentiate between static and dynamic arrays (#3121)
solves #3119

Signed-off-by: VoR0220 <rj@erisindustries.com>
2016-11-03 23:25:19 +01:00
Jeffrey Wilcke 4880868c88 accounts/abi: fixed string and fixed size bytes packing 2016-04-28 12:41:47 +02:00
Jeffrey Wilcke 5127ec10cb accouns/abi: refactored ABI package
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
2016-04-20 16:43:57 +02:00
Jeffrey Wilcke a306e17a26 abi: removed implicit type casting & refactored type parsing 2016-04-04 20:30:59 +02:00
Jeffrey Wilcke 968d8ffe94 abi: accept output slices of all supported types 2016-04-04 20:30:59 +02:00
Jeffrey Wilcke 022cbd6800 abi: accept input slices of all supported types 2016-04-04 20:30:58 +02:00
Jeffrey Wilcke fe45210c55 accounts/abi: Fixed bytes input accept []byte and variable input support
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`.
2016-03-15 14:10:39 +01:00
Jeffrey Wilcke ecc876cec0 accounts/abi: fixed return tuple and string, bytes return type parsing
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.
2016-02-11 10:16:38 +01:00
Jeffrey Wilcke bddf8f76c8 account/abi: implements event parsing
Implementation of basic event parsing and its input types. This
separates methods and events and fixes an issue with go type parsing and
validation.
2016-02-02 15:28:59 +01:00
Jeffrey Wilcke a0bf2ea7e7 accounts/abi: added output parsing & added call mechanism
Added calling mechanism and return value parsing
2015-11-25 12:23:29 +01:00
Jeffrey Wilcke 1f72952f04 accounts/abi: ABI fixes & added types
Changed field `input` to new `inputs`. Addad Hash and Address as input
types.

Added bytes[N] and N validation
2015-10-29 21:40:18 +01:00
Felix Lange bfbcfbe4a9 all: fix license headers one more time
I forgot to update one instance of "go-ethereum" in commit 3f047be5a.
2015-07-23 18:35:11 +02:00
Felix Lange 3f047be5aa all: update license headers to distiguish GPL/LGPL
All code outside of cmd/ is licensed as LGPL. The headers
now reflect this by calling the whole work "the go-ethereum library".
2015-07-22 18:51:45 +02:00
Felix Lange ea54283b30 all: update license information 2015-07-07 14:12:44 +02:00
obscuren b523441361 Moved ethutil => common 2015-03-16 11:27:38 +01:00
obscuren aa5b29e2f2 Implemented contract ABI 2015-01-27 16:19:21 +01:00