diff --git a/accounts/abi/bind/v2/lib.go b/accounts/abi/bind/v2/lib.go index 632c6fc831..b1857228b8 100644 --- a/accounts/abi/bind/v2/lib.go +++ b/accounts/abi/bind/v2/lib.go @@ -34,6 +34,10 @@ type ContractInstance struct { abi abi.ABI } +func NewContractInstance(addr common.Address, backend ContractBackend, abi abi.ABI) *ContractInstance { + return &ContractInstance{addr, backend, abi} +} + // FilterEvents returns an EventIterator instance for filtering historical events based on the event id and a block range. func FilterEvents[T any](instance *ContractInstance, opts *FilterOpts, eventName string, unpack func(*types.Log) (*T, error), topics ...[]any) (*EventIterator[T], error) { backend := instance.Backend