@@ -72,7 +72,7 @@ func Transfer2(instance ContractInstance, opts *TransactOpts) (*types.Transactio
7272 return c .Transfer (opts )
7373}
7474
75- func FilterLogs [T any ](instance ContractInstance , opts * FilterOpts , eventID common.Hash , unpack func (types.Log ) (* T , error ), topics ... []any ) (* EventIterator [T ], error ) {
75+ func FilterLogs [T any ](instance ContractInstance , opts * FilterOpts , eventID common.Hash , unpack func (* types.Log ) (* T , error ), topics ... []any ) (* EventIterator [T ], error ) {
7676 backend := instance .Backend ()
7777 c := NewBoundContract (instance .Address (), abi.ABI {}, backend , backend , backend )
7878 logs , sub , err := c .filterLogs (opts , eventID , topics ... )
@@ -82,7 +82,7 @@ func FilterLogs[T any](instance ContractInstance, opts *FilterOpts, eventID comm
8282 return & EventIterator [T ]{unpack : unpack , logs : logs , sub : sub }, nil
8383}
8484
85- func WatchLogs [T any ](instance ContractInstance , opts * WatchOpts , eventID common.Hash , unpack func (types.Log ) (* T , error ), sink chan <- * T , topics ... []any ) (event.Subscription , error ) {
85+ func WatchLogs [T any ](instance ContractInstance , opts * WatchOpts , eventID common.Hash , unpack func (* types.Log ) (* T , error ), sink chan <- * T , topics ... []any ) (event.Subscription , error ) {
8686 backend := instance .Backend ()
8787 c := NewBoundContract (instance .Address (), abi.ABI {}, backend , backend , backend )
8888 logs , sub , err := c .watchLogs (opts , eventID , topics ... )
@@ -95,7 +95,7 @@ func WatchLogs[T any](instance ContractInstance, opts *WatchOpts, eventID common
9595 select {
9696 case log := <- logs :
9797 // New log arrived, parse the event and forward to the user
98- ev , err := unpack (log )
98+ ev , err := unpack (& log )
9999 if err != nil {
100100 return err
101101 }
@@ -120,7 +120,7 @@ func WatchLogs[T any](instance ContractInstance, opts *WatchOpts, eventID common
120120type EventIterator [T any ] struct {
121121 Event * T // Event containing the contract specifics and raw log
122122
123- unpack func (types.Log ) (* T , error ) // Unpack function for the event
123+ unpack func (* types.Log ) (* T , error ) // Unpack function for the event
124124
125125 logs chan types.Log // Log channel receiving the found contract events
126126 sub ethereum.Subscription // Subscription for errors, completion and termination
@@ -140,7 +140,7 @@ func (it *EventIterator[T]) Next() bool {
140140 if it .done {
141141 select {
142142 case log := <- it .logs :
143- res , err := it .unpack (log )
143+ res , err := it .unpack (& log )
144144 if err != nil {
145145 it .fail = err
146146 return false
@@ -155,7 +155,7 @@ func (it *EventIterator[T]) Next() bool {
155155 // Iterator still in progress, wait for either a data or an error event
156156 select {
157157 case log := <- it .logs :
158- res , err := it .unpack (log )
158+ res , err := it .unpack (& log )
159159 if err != nil {
160160 it .fail = err
161161 return false
0 commit comments