File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -89,27 +89,28 @@ type WatchOpts struct {
8989
9090// MetaData collects all metadata for a bound contract.
9191type MetaData struct {
92- mu sync.Mutex
9392 Sigs map [string ]string
9493 Bin string
9594 ABI string
96- ab * abi.ABI
9795 Pattern string
9896 Deps []* MetaData
97+
98+ mu sync.Mutex
99+ parsedABI * abi.ABI
99100}
100101
101102func (m * MetaData ) GetAbi () (* abi.ABI , error ) {
102103 m .mu .Lock ()
103104 defer m .mu .Unlock ()
104- if m .ab != nil {
105- return m .ab , nil
105+ if m .parsedABI != nil {
106+ return m .parsedABI , nil
106107 }
107108 if parsed , err := abi .JSON (strings .NewReader (m .ABI )); err != nil {
108109 return nil , err
109110 } else {
110- m .ab = & parsed
111+ m .parsedABI = & parsed
111112 }
112- return m .ab , nil
113+ return m .parsedABI , nil
113114}
114115
115116// BoundContract is the base wrapper object that reflects a contract on the
You can’t perform that action at this time.
0 commit comments