From 32ac4146de98690e216bbaa86766dcc02d951ac9 Mon Sep 17 00:00:00 2001 From: Ferran Borreguero Date: Thu, 19 Aug 2021 11:00:58 +0200 Subject: [PATCH] Add function to create a new Tuple Type (#86) --- abi/type.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/abi/type.go b/abi/type.go index 92368bfe..f13e43a9 100644 --- a/abi/type.go +++ b/abi/type.go @@ -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)