accounts/abi: add support for "anonymous" and "indexed" for events (#3464)

This commit is contained in:
bas-vk
2016-12-22 01:51:20 +01:00
committed by Felix Lange
parent bdaa43510b
commit 6d15d00ac4
4 changed files with 61 additions and 20 deletions

View File

@ -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,
}
}
}