Skip to content

Commit

Permalink
Add function to create a new Tuple Type (umbracle#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
ferranbt authored Aug 19, 2021
1 parent aa4f748 commit 32ac414
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions abi/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ type Type struct {
t reflect.Type
}

func NewTupleType(inputs []*TupleElem) *Type {
return &Type{
kind: KindTuple,
tuple: inputs,
}
}

// ParseLog parses a log using this type
func (t *Type) ParseLog(log *web3.Log) (map[string]interface{}, error) {
return ParseLog(t, log)
Expand Down

0 comments on commit 32ac414

Please sign in to comment.