diff options
author | bas-vk <bas-vk@users.noreply.github.com> | 2016-12-22 08:51:20 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2016-12-22 08:51:20 +0800 |
commit | 6d15d00ac4b5f162737a27dfa6f8e9976383776e (patch) | |
tree | 59fd8d8ae13451b7e830b79e84fb0083e150c3d2 /accounts/abi/abi.go | |
parent | bdaa43510b294bf49bbac1392d5518611c06eedc (diff) | |
download | dexon-6d15d00ac4b5f162737a27dfa6f8e9976383776e.tar.gz dexon-6d15d00ac4b5f162737a27dfa6f8e9976383776e.tar.zst dexon-6d15d00ac4b5f162737a27dfa6f8e9976383776e.zip |
accounts/abi: add support for "anonymous" and "indexed" for events (#3464)
Diffstat (limited to 'accounts/abi/abi.go')
-rw-r--r-- | accounts/abi/abi.go | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/accounts/abi/abi.go b/accounts/abi/abi.go index 2efac1307..4e02ae5f1 100644 --- a/accounts/abi/abi.go +++ b/accounts/abi/abi.go @@ -345,12 +345,13 @@ func (abi ABI) Unpack(v interface{}, name string, output []byte) error { func (abi *ABI) UnmarshalJSON(data []byte) error { var fields []struct { - Type string - Name string - Constant bool - Indexed bool - Inputs []Argument - Outputs []Argument + Type string + Name string + Constant bool + Indexed bool + Anonymous bool + Inputs []Argument + Outputs []Argument } if err := json.Unmarshal(data, &fields); err != nil { @@ -375,8 +376,9 @@ func (abi *ABI) UnmarshalJSON(data []byte) error { } case "event": abi.Events[field.Name] = Event{ - Name: field.Name, - Inputs: field.Inputs, + Name: field.Name, + Anonymous: field.Anonymous, + Inputs: field.Inputs, } } } |