From 54ab668f7edc6224727264efba4ba9a9f6e9a885 Mon Sep 17 00:00:00 2001 From: MaxMoskalenko Date: Thu, 6 Feb 2025 11:46:30 +0200 Subject: [PATCH 1/3] fix: add go-bindings for IForceMove and IMultiAssetHolder interfaces --- pkg/abi/iforce_move/iforce_move.go | 875 ++++++++++++++++++ .../imulti_asset_holder.go | 693 ++++++++++++++ 2 files changed, 1568 insertions(+) create mode 100644 pkg/abi/iforce_move/iforce_move.go create mode 100644 pkg/abi/imulti_asset_holder/imulti_asset_holder.go diff --git a/pkg/abi/iforce_move/iforce_move.go b/pkg/abi/iforce_move/iforce_move.go new file mode 100644 index 00000000..4643de91 --- /dev/null +++ b/pkg/abi/iforce_move/iforce_move.go @@ -0,0 +1,875 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package iforce_move + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// ExitFormatAllocation is an auto generated low-level Go binding around an user-defined struct. +type ExitFormatAllocation struct { + Destination [32]byte + Amount *big.Int + AllocationType uint8 + Metadata []byte +} + +// ExitFormatAssetMetadata is an auto generated low-level Go binding around an user-defined struct. +type ExitFormatAssetMetadata struct { + AssetType uint8 + Metadata []byte +} + +// ExitFormatSingleAssetExit is an auto generated low-level Go binding around an user-defined struct. +type ExitFormatSingleAssetExit struct { + Asset common.Address + AssetMetadata ExitFormatAssetMetadata + Allocations []ExitFormatAllocation +} + +// INitroTypesFixedPart is an auto generated low-level Go binding around an user-defined struct. +type INitroTypesFixedPart struct { + Participants []common.Address + ChannelNonce uint64 + AppDefinition common.Address + ChallengeDuration *big.Int +} + +// INitroTypesSignature is an auto generated low-level Go binding around an user-defined struct. +type INitroTypesSignature struct { + V uint8 + R [32]byte + S [32]byte +} + +// INitroTypesSignedVariablePart is an auto generated low-level Go binding around an user-defined struct. +type INitroTypesSignedVariablePart struct { + VariablePart INitroTypesVariablePart + Sigs []INitroTypesSignature +} + +// INitroTypesVariablePart is an auto generated low-level Go binding around an user-defined struct. +type INitroTypesVariablePart struct { + Outcome []ExitFormatSingleAssetExit + AppData []byte + TurnNum *big.Int + IsFinal bool +} + +// IforceMoveMetaData contains all meta data concerning the IforceMove contract. +var IforceMoveMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint48\",\"name\":\"newTurnNumRecord\",\"type\":\"uint48\"}],\"name\":\"ChallengeCleared\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint48\",\"name\":\"finalizesAt\",\"type\":\"uint48\"},{\"components\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enumExitFormat.AssetType\",\"name\":\"assetType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.AssetMetadata\",\"name\":\"assetMetadata\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destination\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"allocationType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.Allocation[]\",\"name\":\"allocations\",\"type\":\"tuple[]\"}],\"internalType\":\"structExitFormat.SingleAssetExit[]\",\"name\":\"outcome\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"uint48\",\"name\":\"turnNum\",\"type\":\"uint48\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structINitroTypes.VariablePart\",\"name\":\"variablePart\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"structINitroTypes.Signature[]\",\"name\":\"sigs\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structINitroTypes.SignedVariablePart[]\",\"name\":\"proof\",\"type\":\"tuple[]\"},{\"components\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enumExitFormat.AssetType\",\"name\":\"assetType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.AssetMetadata\",\"name\":\"assetMetadata\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destination\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"allocationType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.Allocation[]\",\"name\":\"allocations\",\"type\":\"tuple[]\"}],\"internalType\":\"structExitFormat.SingleAssetExit[]\",\"name\":\"outcome\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"uint48\",\"name\":\"turnNum\",\"type\":\"uint48\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structINitroTypes.VariablePart\",\"name\":\"variablePart\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"structINitroTypes.Signature[]\",\"name\":\"sigs\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structINitroTypes.SignedVariablePart\",\"name\":\"candidate\",\"type\":\"tuple\"}],\"name\":\"ChallengeRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint48\",\"name\":\"newTurnNumRecord\",\"type\":\"uint48\"}],\"name\":\"Checkpointed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint48\",\"name\":\"finalizesAt\",\"type\":\"uint48\"}],\"name\":\"Concluded\",\"type\":\"event\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"},{\"internalType\":\"uint64\",\"name\":\"channelNonce\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"appDefinition\",\"type\":\"address\"},{\"internalType\":\"uint48\",\"name\":\"challengeDuration\",\"type\":\"uint48\"}],\"internalType\":\"structINitroTypes.FixedPart\",\"name\":\"fixedPart\",\"type\":\"tuple\"},{\"components\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enumExitFormat.AssetType\",\"name\":\"assetType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.AssetMetadata\",\"name\":\"assetMetadata\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destination\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"allocationType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.Allocation[]\",\"name\":\"allocations\",\"type\":\"tuple[]\"}],\"internalType\":\"structExitFormat.SingleAssetExit[]\",\"name\":\"outcome\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"uint48\",\"name\":\"turnNum\",\"type\":\"uint48\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structINitroTypes.VariablePart\",\"name\":\"variablePart\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"structINitroTypes.Signature[]\",\"name\":\"sigs\",\"type\":\"tuple[]\"}],\"internalType\":\"structINitroTypes.SignedVariablePart[]\",\"name\":\"proof\",\"type\":\"tuple[]\"},{\"components\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enumExitFormat.AssetType\",\"name\":\"assetType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.AssetMetadata\",\"name\":\"assetMetadata\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destination\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"allocationType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.Allocation[]\",\"name\":\"allocations\",\"type\":\"tuple[]\"}],\"internalType\":\"structExitFormat.SingleAssetExit[]\",\"name\":\"outcome\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"uint48\",\"name\":\"turnNum\",\"type\":\"uint48\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structINitroTypes.VariablePart\",\"name\":\"variablePart\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"structINitroTypes.Signature[]\",\"name\":\"sigs\",\"type\":\"tuple[]\"}],\"internalType\":\"structINitroTypes.SignedVariablePart\",\"name\":\"candidate\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"structINitroTypes.Signature\",\"name\":\"challengerSig\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"},{\"internalType\":\"uint64\",\"name\":\"channelNonce\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"appDefinition\",\"type\":\"address\"},{\"internalType\":\"uint48\",\"name\":\"challengeDuration\",\"type\":\"uint48\"}],\"internalType\":\"structINitroTypes.FixedPart\",\"name\":\"fixedPart\",\"type\":\"tuple\"},{\"components\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enumExitFormat.AssetType\",\"name\":\"assetType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.AssetMetadata\",\"name\":\"assetMetadata\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destination\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"allocationType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.Allocation[]\",\"name\":\"allocations\",\"type\":\"tuple[]\"}],\"internalType\":\"structExitFormat.SingleAssetExit[]\",\"name\":\"outcome\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"uint48\",\"name\":\"turnNum\",\"type\":\"uint48\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structINitroTypes.VariablePart\",\"name\":\"variablePart\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"structINitroTypes.Signature[]\",\"name\":\"sigs\",\"type\":\"tuple[]\"}],\"internalType\":\"structINitroTypes.SignedVariablePart[]\",\"name\":\"proof\",\"type\":\"tuple[]\"},{\"components\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enumExitFormat.AssetType\",\"name\":\"assetType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.AssetMetadata\",\"name\":\"assetMetadata\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destination\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"allocationType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.Allocation[]\",\"name\":\"allocations\",\"type\":\"tuple[]\"}],\"internalType\":\"structExitFormat.SingleAssetExit[]\",\"name\":\"outcome\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"uint48\",\"name\":\"turnNum\",\"type\":\"uint48\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structINitroTypes.VariablePart\",\"name\":\"variablePart\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"structINitroTypes.Signature[]\",\"name\":\"sigs\",\"type\":\"tuple[]\"}],\"internalType\":\"structINitroTypes.SignedVariablePart\",\"name\":\"candidate\",\"type\":\"tuple\"}],\"name\":\"checkpoint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"},{\"internalType\":\"uint64\",\"name\":\"channelNonce\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"appDefinition\",\"type\":\"address\"},{\"internalType\":\"uint48\",\"name\":\"challengeDuration\",\"type\":\"uint48\"}],\"internalType\":\"structINitroTypes.FixedPart\",\"name\":\"fixedPart\",\"type\":\"tuple\"},{\"components\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enumExitFormat.AssetType\",\"name\":\"assetType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.AssetMetadata\",\"name\":\"assetMetadata\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destination\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"allocationType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.Allocation[]\",\"name\":\"allocations\",\"type\":\"tuple[]\"}],\"internalType\":\"structExitFormat.SingleAssetExit[]\",\"name\":\"outcome\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"uint48\",\"name\":\"turnNum\",\"type\":\"uint48\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structINitroTypes.VariablePart\",\"name\":\"variablePart\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"structINitroTypes.Signature[]\",\"name\":\"sigs\",\"type\":\"tuple[]\"}],\"internalType\":\"structINitroTypes.SignedVariablePart\",\"name\":\"candidate\",\"type\":\"tuple\"}],\"name\":\"conclude\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// IforceMoveABI is the input ABI used to generate the binding from. +// Deprecated: Use IforceMoveMetaData.ABI instead. +var IforceMoveABI = IforceMoveMetaData.ABI + +// IforceMove is an auto generated Go binding around an Ethereum contract. +type IforceMove struct { + IforceMoveCaller // Read-only binding to the contract + IforceMoveTransactor // Write-only binding to the contract + IforceMoveFilterer // Log filterer for contract events +} + +// IforceMoveCaller is an auto generated read-only Go binding around an Ethereum contract. +type IforceMoveCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IforceMoveTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IforceMoveTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IforceMoveFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IforceMoveFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IforceMoveSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IforceMoveSession struct { + Contract *IforceMove // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IforceMoveCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IforceMoveCallerSession struct { + Contract *IforceMoveCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IforceMoveTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IforceMoveTransactorSession struct { + Contract *IforceMoveTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IforceMoveRaw is an auto generated low-level Go binding around an Ethereum contract. +type IforceMoveRaw struct { + Contract *IforceMove // Generic contract binding to access the raw methods on +} + +// IforceMoveCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IforceMoveCallerRaw struct { + Contract *IforceMoveCaller // Generic read-only contract binding to access the raw methods on +} + +// IforceMoveTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IforceMoveTransactorRaw struct { + Contract *IforceMoveTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIforceMove creates a new instance of IforceMove, bound to a specific deployed contract. +func NewIforceMove(address common.Address, backend bind.ContractBackend) (*IforceMove, error) { + contract, err := bindIforceMove(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IforceMove{IforceMoveCaller: IforceMoveCaller{contract: contract}, IforceMoveTransactor: IforceMoveTransactor{contract: contract}, IforceMoveFilterer: IforceMoveFilterer{contract: contract}}, nil +} + +// NewIforceMoveCaller creates a new read-only instance of IforceMove, bound to a specific deployed contract. +func NewIforceMoveCaller(address common.Address, caller bind.ContractCaller) (*IforceMoveCaller, error) { + contract, err := bindIforceMove(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IforceMoveCaller{contract: contract}, nil +} + +// NewIforceMoveTransactor creates a new write-only instance of IforceMove, bound to a specific deployed contract. +func NewIforceMoveTransactor(address common.Address, transactor bind.ContractTransactor) (*IforceMoveTransactor, error) { + contract, err := bindIforceMove(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IforceMoveTransactor{contract: contract}, nil +} + +// NewIforceMoveFilterer creates a new log filterer instance of IforceMove, bound to a specific deployed contract. +func NewIforceMoveFilterer(address common.Address, filterer bind.ContractFilterer) (*IforceMoveFilterer, error) { + contract, err := bindIforceMove(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IforceMoveFilterer{contract: contract}, nil +} + +// bindIforceMove binds a generic wrapper to an already deployed contract. +func bindIforceMove(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(IforceMoveABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IforceMove *IforceMoveRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IforceMove.Contract.IforceMoveCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IforceMove *IforceMoveRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IforceMove.Contract.IforceMoveTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IforceMove *IforceMoveRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IforceMove.Contract.IforceMoveTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IforceMove *IforceMoveCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IforceMove.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IforceMove *IforceMoveTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IforceMove.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IforceMove *IforceMoveTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IforceMove.Contract.contract.Transact(opts, method, params...) +} + +// Challenge is a paid mutator transaction binding the contract method 0x8286a060. +// +// Solidity: function challenge((address[],uint64,address,uint48) fixedPart, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[])[] proof, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[]) candidate, (uint8,bytes32,bytes32) challengerSig) returns() +func (_IforceMove *IforceMoveTransactor) Challenge(opts *bind.TransactOpts, fixedPart INitroTypesFixedPart, proof []INitroTypesSignedVariablePart, candidate INitroTypesSignedVariablePart, challengerSig INitroTypesSignature) (*types.Transaction, error) { + return _IforceMove.contract.Transact(opts, "challenge", fixedPart, proof, candidate, challengerSig) +} + +// Challenge is a paid mutator transaction binding the contract method 0x8286a060. +// +// Solidity: function challenge((address[],uint64,address,uint48) fixedPart, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[])[] proof, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[]) candidate, (uint8,bytes32,bytes32) challengerSig) returns() +func (_IforceMove *IforceMoveSession) Challenge(fixedPart INitroTypesFixedPart, proof []INitroTypesSignedVariablePart, candidate INitroTypesSignedVariablePart, challengerSig INitroTypesSignature) (*types.Transaction, error) { + return _IforceMove.Contract.Challenge(&_IforceMove.TransactOpts, fixedPart, proof, candidate, challengerSig) +} + +// Challenge is a paid mutator transaction binding the contract method 0x8286a060. +// +// Solidity: function challenge((address[],uint64,address,uint48) fixedPart, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[])[] proof, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[]) candidate, (uint8,bytes32,bytes32) challengerSig) returns() +func (_IforceMove *IforceMoveTransactorSession) Challenge(fixedPart INitroTypesFixedPart, proof []INitroTypesSignedVariablePart, candidate INitroTypesSignedVariablePart, challengerSig INitroTypesSignature) (*types.Transaction, error) { + return _IforceMove.Contract.Challenge(&_IforceMove.TransactOpts, fixedPart, proof, candidate, challengerSig) +} + +// Checkpoint is a paid mutator transaction binding the contract method 0x6d2a9c92. +// +// Solidity: function checkpoint((address[],uint64,address,uint48) fixedPart, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[])[] proof, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[]) candidate) returns() +func (_IforceMove *IforceMoveTransactor) Checkpoint(opts *bind.TransactOpts, fixedPart INitroTypesFixedPart, proof []INitroTypesSignedVariablePart, candidate INitroTypesSignedVariablePart) (*types.Transaction, error) { + return _IforceMove.contract.Transact(opts, "checkpoint", fixedPart, proof, candidate) +} + +// Checkpoint is a paid mutator transaction binding the contract method 0x6d2a9c92. +// +// Solidity: function checkpoint((address[],uint64,address,uint48) fixedPart, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[])[] proof, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[]) candidate) returns() +func (_IforceMove *IforceMoveSession) Checkpoint(fixedPart INitroTypesFixedPart, proof []INitroTypesSignedVariablePart, candidate INitroTypesSignedVariablePart) (*types.Transaction, error) { + return _IforceMove.Contract.Checkpoint(&_IforceMove.TransactOpts, fixedPart, proof, candidate) +} + +// Checkpoint is a paid mutator transaction binding the contract method 0x6d2a9c92. +// +// Solidity: function checkpoint((address[],uint64,address,uint48) fixedPart, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[])[] proof, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[]) candidate) returns() +func (_IforceMove *IforceMoveTransactorSession) Checkpoint(fixedPart INitroTypesFixedPart, proof []INitroTypesSignedVariablePart, candidate INitroTypesSignedVariablePart) (*types.Transaction, error) { + return _IforceMove.Contract.Checkpoint(&_IforceMove.TransactOpts, fixedPart, proof, candidate) +} + +// Conclude is a paid mutator transaction binding the contract method 0xee049b50. +// +// Solidity: function conclude((address[],uint64,address,uint48) fixedPart, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[]) candidate) returns() +func (_IforceMove *IforceMoveTransactor) Conclude(opts *bind.TransactOpts, fixedPart INitroTypesFixedPart, candidate INitroTypesSignedVariablePart) (*types.Transaction, error) { + return _IforceMove.contract.Transact(opts, "conclude", fixedPart, candidate) +} + +// Conclude is a paid mutator transaction binding the contract method 0xee049b50. +// +// Solidity: function conclude((address[],uint64,address,uint48) fixedPart, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[]) candidate) returns() +func (_IforceMove *IforceMoveSession) Conclude(fixedPart INitroTypesFixedPart, candidate INitroTypesSignedVariablePart) (*types.Transaction, error) { + return _IforceMove.Contract.Conclude(&_IforceMove.TransactOpts, fixedPart, candidate) +} + +// Conclude is a paid mutator transaction binding the contract method 0xee049b50. +// +// Solidity: function conclude((address[],uint64,address,uint48) fixedPart, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[]) candidate) returns() +func (_IforceMove *IforceMoveTransactorSession) Conclude(fixedPart INitroTypesFixedPart, candidate INitroTypesSignedVariablePart) (*types.Transaction, error) { + return _IforceMove.Contract.Conclude(&_IforceMove.TransactOpts, fixedPart, candidate) +} + +// IforceMoveChallengeClearedIterator is returned from FilterChallengeCleared and is used to iterate over the raw logs and unpacked data for ChallengeCleared events raised by the IforceMove contract. +type IforceMoveChallengeClearedIterator struct { + Event *IforceMoveChallengeCleared // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IforceMoveChallengeClearedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IforceMoveChallengeCleared) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IforceMoveChallengeCleared) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IforceMoveChallengeClearedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IforceMoveChallengeClearedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IforceMoveChallengeCleared represents a ChallengeCleared event raised by the IforceMove contract. +type IforceMoveChallengeCleared struct { + ChannelId [32]byte + NewTurnNumRecord *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterChallengeCleared is a free log retrieval operation binding the contract event 0x07da0a0674fb921e484018c8b81d80e292745e5d8ed134b580c8b9c631c5e9e0. +// +// Solidity: event ChallengeCleared(bytes32 indexed channelId, uint48 newTurnNumRecord) +func (_IforceMove *IforceMoveFilterer) FilterChallengeCleared(opts *bind.FilterOpts, channelId [][32]byte) (*IforceMoveChallengeClearedIterator, error) { + + var channelIdRule []interface{} + for _, channelIdItem := range channelId { + channelIdRule = append(channelIdRule, channelIdItem) + } + + logs, sub, err := _IforceMove.contract.FilterLogs(opts, "ChallengeCleared", channelIdRule) + if err != nil { + return nil, err + } + return &IforceMoveChallengeClearedIterator{contract: _IforceMove.contract, event: "ChallengeCleared", logs: logs, sub: sub}, nil +} + +// WatchChallengeCleared is a free log subscription operation binding the contract event 0x07da0a0674fb921e484018c8b81d80e292745e5d8ed134b580c8b9c631c5e9e0. +// +// Solidity: event ChallengeCleared(bytes32 indexed channelId, uint48 newTurnNumRecord) +func (_IforceMove *IforceMoveFilterer) WatchChallengeCleared(opts *bind.WatchOpts, sink chan<- *IforceMoveChallengeCleared, channelId [][32]byte) (event.Subscription, error) { + + var channelIdRule []interface{} + for _, channelIdItem := range channelId { + channelIdRule = append(channelIdRule, channelIdItem) + } + + logs, sub, err := _IforceMove.contract.WatchLogs(opts, "ChallengeCleared", channelIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IforceMoveChallengeCleared) + if err := _IforceMove.contract.UnpackLog(event, "ChallengeCleared", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseChallengeCleared is a log parse operation binding the contract event 0x07da0a0674fb921e484018c8b81d80e292745e5d8ed134b580c8b9c631c5e9e0. +// +// Solidity: event ChallengeCleared(bytes32 indexed channelId, uint48 newTurnNumRecord) +func (_IforceMove *IforceMoveFilterer) ParseChallengeCleared(log types.Log) (*IforceMoveChallengeCleared, error) { + event := new(IforceMoveChallengeCleared) + if err := _IforceMove.contract.UnpackLog(event, "ChallengeCleared", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IforceMoveChallengeRegisteredIterator is returned from FilterChallengeRegistered and is used to iterate over the raw logs and unpacked data for ChallengeRegistered events raised by the IforceMove contract. +type IforceMoveChallengeRegisteredIterator struct { + Event *IforceMoveChallengeRegistered // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IforceMoveChallengeRegisteredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IforceMoveChallengeRegistered) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IforceMoveChallengeRegistered) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IforceMoveChallengeRegisteredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IforceMoveChallengeRegisteredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IforceMoveChallengeRegistered represents a ChallengeRegistered event raised by the IforceMove contract. +type IforceMoveChallengeRegistered struct { + ChannelId [32]byte + FinalizesAt *big.Int + Proof []INitroTypesSignedVariablePart + Candidate INitroTypesSignedVariablePart + Raw types.Log // Blockchain specific contextual infos +} + +// FilterChallengeRegistered is a free log retrieval operation binding the contract event 0x0aa12461ee6c137332989aa12cec79f4772ab2c1a8732a382aada7e9f3ec9d34. +// +// Solidity: event ChallengeRegistered(bytes32 indexed channelId, uint48 finalizesAt, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[])[] proof, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[]) candidate) +func (_IforceMove *IforceMoveFilterer) FilterChallengeRegistered(opts *bind.FilterOpts, channelId [][32]byte) (*IforceMoveChallengeRegisteredIterator, error) { + + var channelIdRule []interface{} + for _, channelIdItem := range channelId { + channelIdRule = append(channelIdRule, channelIdItem) + } + + logs, sub, err := _IforceMove.contract.FilterLogs(opts, "ChallengeRegistered", channelIdRule) + if err != nil { + return nil, err + } + return &IforceMoveChallengeRegisteredIterator{contract: _IforceMove.contract, event: "ChallengeRegistered", logs: logs, sub: sub}, nil +} + +// WatchChallengeRegistered is a free log subscription operation binding the contract event 0x0aa12461ee6c137332989aa12cec79f4772ab2c1a8732a382aada7e9f3ec9d34. +// +// Solidity: event ChallengeRegistered(bytes32 indexed channelId, uint48 finalizesAt, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[])[] proof, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[]) candidate) +func (_IforceMove *IforceMoveFilterer) WatchChallengeRegistered(opts *bind.WatchOpts, sink chan<- *IforceMoveChallengeRegistered, channelId [][32]byte) (event.Subscription, error) { + + var channelIdRule []interface{} + for _, channelIdItem := range channelId { + channelIdRule = append(channelIdRule, channelIdItem) + } + + logs, sub, err := _IforceMove.contract.WatchLogs(opts, "ChallengeRegistered", channelIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IforceMoveChallengeRegistered) + if err := _IforceMove.contract.UnpackLog(event, "ChallengeRegistered", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseChallengeRegistered is a log parse operation binding the contract event 0x0aa12461ee6c137332989aa12cec79f4772ab2c1a8732a382aada7e9f3ec9d34. +// +// Solidity: event ChallengeRegistered(bytes32 indexed channelId, uint48 finalizesAt, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[])[] proof, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[]) candidate) +func (_IforceMove *IforceMoveFilterer) ParseChallengeRegistered(log types.Log) (*IforceMoveChallengeRegistered, error) { + event := new(IforceMoveChallengeRegistered) + if err := _IforceMove.contract.UnpackLog(event, "ChallengeRegistered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IforceMoveCheckpointedIterator is returned from FilterCheckpointed and is used to iterate over the raw logs and unpacked data for Checkpointed events raised by the IforceMove contract. +type IforceMoveCheckpointedIterator struct { + Event *IforceMoveCheckpointed // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IforceMoveCheckpointedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IforceMoveCheckpointed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IforceMoveCheckpointed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IforceMoveCheckpointedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IforceMoveCheckpointedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IforceMoveCheckpointed represents a Checkpointed event raised by the IforceMove contract. +type IforceMoveCheckpointed struct { + ChannelId [32]byte + NewTurnNumRecord *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCheckpointed is a free log retrieval operation binding the contract event 0xf3f2d5574c50e581f1a2371fac7dee87f7c6d599a496765fbfa2547ce7fd5f1a. +// +// Solidity: event Checkpointed(bytes32 indexed channelId, uint48 newTurnNumRecord) +func (_IforceMove *IforceMoveFilterer) FilterCheckpointed(opts *bind.FilterOpts, channelId [][32]byte) (*IforceMoveCheckpointedIterator, error) { + + var channelIdRule []interface{} + for _, channelIdItem := range channelId { + channelIdRule = append(channelIdRule, channelIdItem) + } + + logs, sub, err := _IforceMove.contract.FilterLogs(opts, "Checkpointed", channelIdRule) + if err != nil { + return nil, err + } + return &IforceMoveCheckpointedIterator{contract: _IforceMove.contract, event: "Checkpointed", logs: logs, sub: sub}, nil +} + +// WatchCheckpointed is a free log subscription operation binding the contract event 0xf3f2d5574c50e581f1a2371fac7dee87f7c6d599a496765fbfa2547ce7fd5f1a. +// +// Solidity: event Checkpointed(bytes32 indexed channelId, uint48 newTurnNumRecord) +func (_IforceMove *IforceMoveFilterer) WatchCheckpointed(opts *bind.WatchOpts, sink chan<- *IforceMoveCheckpointed, channelId [][32]byte) (event.Subscription, error) { + + var channelIdRule []interface{} + for _, channelIdItem := range channelId { + channelIdRule = append(channelIdRule, channelIdItem) + } + + logs, sub, err := _IforceMove.contract.WatchLogs(opts, "Checkpointed", channelIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IforceMoveCheckpointed) + if err := _IforceMove.contract.UnpackLog(event, "Checkpointed", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseCheckpointed is a log parse operation binding the contract event 0xf3f2d5574c50e581f1a2371fac7dee87f7c6d599a496765fbfa2547ce7fd5f1a. +// +// Solidity: event Checkpointed(bytes32 indexed channelId, uint48 newTurnNumRecord) +func (_IforceMove *IforceMoveFilterer) ParseCheckpointed(log types.Log) (*IforceMoveCheckpointed, error) { + event := new(IforceMoveCheckpointed) + if err := _IforceMove.contract.UnpackLog(event, "Checkpointed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IforceMoveConcludedIterator is returned from FilterConcluded and is used to iterate over the raw logs and unpacked data for Concluded events raised by the IforceMove contract. +type IforceMoveConcludedIterator struct { + Event *IforceMoveConcluded // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IforceMoveConcludedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IforceMoveConcluded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IforceMoveConcluded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IforceMoveConcludedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IforceMoveConcludedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IforceMoveConcluded represents a Concluded event raised by the IforceMove contract. +type IforceMoveConcluded struct { + ChannelId [32]byte + FinalizesAt *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterConcluded is a free log retrieval operation binding the contract event 0x4f465027a3d06ea73dd12be0f5c5fc0a34e21f19d6eaed4834a7a944edabc901. +// +// Solidity: event Concluded(bytes32 indexed channelId, uint48 finalizesAt) +func (_IforceMove *IforceMoveFilterer) FilterConcluded(opts *bind.FilterOpts, channelId [][32]byte) (*IforceMoveConcludedIterator, error) { + + var channelIdRule []interface{} + for _, channelIdItem := range channelId { + channelIdRule = append(channelIdRule, channelIdItem) + } + + logs, sub, err := _IforceMove.contract.FilterLogs(opts, "Concluded", channelIdRule) + if err != nil { + return nil, err + } + return &IforceMoveConcludedIterator{contract: _IforceMove.contract, event: "Concluded", logs: logs, sub: sub}, nil +} + +// WatchConcluded is a free log subscription operation binding the contract event 0x4f465027a3d06ea73dd12be0f5c5fc0a34e21f19d6eaed4834a7a944edabc901. +// +// Solidity: event Concluded(bytes32 indexed channelId, uint48 finalizesAt) +func (_IforceMove *IforceMoveFilterer) WatchConcluded(opts *bind.WatchOpts, sink chan<- *IforceMoveConcluded, channelId [][32]byte) (event.Subscription, error) { + + var channelIdRule []interface{} + for _, channelIdItem := range channelId { + channelIdRule = append(channelIdRule, channelIdItem) + } + + logs, sub, err := _IforceMove.contract.WatchLogs(opts, "Concluded", channelIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IforceMoveConcluded) + if err := _IforceMove.contract.UnpackLog(event, "Concluded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseConcluded is a log parse operation binding the contract event 0x4f465027a3d06ea73dd12be0f5c5fc0a34e21f19d6eaed4834a7a944edabc901. +// +// Solidity: event Concluded(bytes32 indexed channelId, uint48 finalizesAt) +func (_IforceMove *IforceMoveFilterer) ParseConcluded(log types.Log) (*IforceMoveConcluded, error) { + event := new(IforceMoveConcluded) + if err := _IforceMove.contract.UnpackLog(event, "Concluded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/abi/imulti_asset_holder/imulti_asset_holder.go b/pkg/abi/imulti_asset_holder/imulti_asset_holder.go new file mode 100644 index 00000000..cda36088 --- /dev/null +++ b/pkg/abi/imulti_asset_holder/imulti_asset_holder.go @@ -0,0 +1,693 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package imulti_asset_holder + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// IMultiAssetHolderReclaimArgs is an auto generated low-level Go binding around an user-defined struct. +type IMultiAssetHolderReclaimArgs struct { + SourceChannelId [32]byte + SourceStateHash [32]byte + SourceOutcomeBytes []byte + SourceAssetIndex *big.Int + IndexOfTargetInSource *big.Int + TargetStateHash [32]byte + TargetOutcomeBytes []byte + TargetAssetIndex *big.Int +} + +// ImultiAssetHolderMetaData contains all meta data concerning the ImultiAssetHolder contract. +var ImultiAssetHolderMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assetIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialHoldings\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"finalHoldings\",\"type\":\"uint256\"}],\"name\":\"AllocationUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"destination\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"destinationHoldings\",\"type\":\"uint256\"}],\"name\":\"Deposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assetIndex\",\"type\":\"uint256\"}],\"name\":\"Reclaimed\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"destination\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"expectedHeld\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"sourceChannelId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"sourceStateHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"sourceOutcomeBytes\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"sourceAssetIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"indexOfTargetInSource\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"targetStateHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"targetOutcomeBytes\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"targetAssetIndex\",\"type\":\"uint256\"}],\"internalType\":\"structIMultiAssetHolder.ReclaimArgs\",\"name\":\"reclaimArgs\",\"type\":\"tuple\"}],\"name\":\"reclaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assetIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"fromChannelId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"outcomeBytes\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"stateHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"indices\",\"type\":\"uint256[]\"}],\"name\":\"transfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// ImultiAssetHolderABI is the input ABI used to generate the binding from. +// Deprecated: Use ImultiAssetHolderMetaData.ABI instead. +var ImultiAssetHolderABI = ImultiAssetHolderMetaData.ABI + +// ImultiAssetHolder is an auto generated Go binding around an Ethereum contract. +type ImultiAssetHolder struct { + ImultiAssetHolderCaller // Read-only binding to the contract + ImultiAssetHolderTransactor // Write-only binding to the contract + ImultiAssetHolderFilterer // Log filterer for contract events +} + +// ImultiAssetHolderCaller is an auto generated read-only Go binding around an Ethereum contract. +type ImultiAssetHolderCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ImultiAssetHolderTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ImultiAssetHolderTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ImultiAssetHolderFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ImultiAssetHolderFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ImultiAssetHolderSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ImultiAssetHolderSession struct { + Contract *ImultiAssetHolder // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ImultiAssetHolderCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ImultiAssetHolderCallerSession struct { + Contract *ImultiAssetHolderCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ImultiAssetHolderTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ImultiAssetHolderTransactorSession struct { + Contract *ImultiAssetHolderTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ImultiAssetHolderRaw is an auto generated low-level Go binding around an Ethereum contract. +type ImultiAssetHolderRaw struct { + Contract *ImultiAssetHolder // Generic contract binding to access the raw methods on +} + +// ImultiAssetHolderCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ImultiAssetHolderCallerRaw struct { + Contract *ImultiAssetHolderCaller // Generic read-only contract binding to access the raw methods on +} + +// ImultiAssetHolderTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ImultiAssetHolderTransactorRaw struct { + Contract *ImultiAssetHolderTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewImultiAssetHolder creates a new instance of ImultiAssetHolder, bound to a specific deployed contract. +func NewImultiAssetHolder(address common.Address, backend bind.ContractBackend) (*ImultiAssetHolder, error) { + contract, err := bindImultiAssetHolder(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ImultiAssetHolder{ImultiAssetHolderCaller: ImultiAssetHolderCaller{contract: contract}, ImultiAssetHolderTransactor: ImultiAssetHolderTransactor{contract: contract}, ImultiAssetHolderFilterer: ImultiAssetHolderFilterer{contract: contract}}, nil +} + +// NewImultiAssetHolderCaller creates a new read-only instance of ImultiAssetHolder, bound to a specific deployed contract. +func NewImultiAssetHolderCaller(address common.Address, caller bind.ContractCaller) (*ImultiAssetHolderCaller, error) { + contract, err := bindImultiAssetHolder(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ImultiAssetHolderCaller{contract: contract}, nil +} + +// NewImultiAssetHolderTransactor creates a new write-only instance of ImultiAssetHolder, bound to a specific deployed contract. +func NewImultiAssetHolderTransactor(address common.Address, transactor bind.ContractTransactor) (*ImultiAssetHolderTransactor, error) { + contract, err := bindImultiAssetHolder(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ImultiAssetHolderTransactor{contract: contract}, nil +} + +// NewImultiAssetHolderFilterer creates a new log filterer instance of ImultiAssetHolder, bound to a specific deployed contract. +func NewImultiAssetHolderFilterer(address common.Address, filterer bind.ContractFilterer) (*ImultiAssetHolderFilterer, error) { + contract, err := bindImultiAssetHolder(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ImultiAssetHolderFilterer{contract: contract}, nil +} + +// bindImultiAssetHolder binds a generic wrapper to an already deployed contract. +func bindImultiAssetHolder(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(ImultiAssetHolderABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ImultiAssetHolder *ImultiAssetHolderRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ImultiAssetHolder.Contract.ImultiAssetHolderCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ImultiAssetHolder *ImultiAssetHolderRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ImultiAssetHolder.Contract.ImultiAssetHolderTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ImultiAssetHolder *ImultiAssetHolderRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ImultiAssetHolder.Contract.ImultiAssetHolderTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ImultiAssetHolder *ImultiAssetHolderCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ImultiAssetHolder.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ImultiAssetHolder *ImultiAssetHolderTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ImultiAssetHolder.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ImultiAssetHolder *ImultiAssetHolderTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ImultiAssetHolder.Contract.contract.Transact(opts, method, params...) +} + +// Deposit is a paid mutator transaction binding the contract method 0x2fb1d270. +// +// Solidity: function deposit(address asset, bytes32 destination, uint256 expectedHeld, uint256 amount) payable returns() +func (_ImultiAssetHolder *ImultiAssetHolderTransactor) Deposit(opts *bind.TransactOpts, asset common.Address, destination [32]byte, expectedHeld *big.Int, amount *big.Int) (*types.Transaction, error) { + return _ImultiAssetHolder.contract.Transact(opts, "deposit", asset, destination, expectedHeld, amount) +} + +// Deposit is a paid mutator transaction binding the contract method 0x2fb1d270. +// +// Solidity: function deposit(address asset, bytes32 destination, uint256 expectedHeld, uint256 amount) payable returns() +func (_ImultiAssetHolder *ImultiAssetHolderSession) Deposit(asset common.Address, destination [32]byte, expectedHeld *big.Int, amount *big.Int) (*types.Transaction, error) { + return _ImultiAssetHolder.Contract.Deposit(&_ImultiAssetHolder.TransactOpts, asset, destination, expectedHeld, amount) +} + +// Deposit is a paid mutator transaction binding the contract method 0x2fb1d270. +// +// Solidity: function deposit(address asset, bytes32 destination, uint256 expectedHeld, uint256 amount) payable returns() +func (_ImultiAssetHolder *ImultiAssetHolderTransactorSession) Deposit(asset common.Address, destination [32]byte, expectedHeld *big.Int, amount *big.Int) (*types.Transaction, error) { + return _ImultiAssetHolder.Contract.Deposit(&_ImultiAssetHolder.TransactOpts, asset, destination, expectedHeld, amount) +} + +// Reclaim is a paid mutator transaction binding the contract method 0xd3c4e738. +// +// Solidity: function reclaim((bytes32,bytes32,bytes,uint256,uint256,bytes32,bytes,uint256) reclaimArgs) returns() +func (_ImultiAssetHolder *ImultiAssetHolderTransactor) Reclaim(opts *bind.TransactOpts, reclaimArgs IMultiAssetHolderReclaimArgs) (*types.Transaction, error) { + return _ImultiAssetHolder.contract.Transact(opts, "reclaim", reclaimArgs) +} + +// Reclaim is a paid mutator transaction binding the contract method 0xd3c4e738. +// +// Solidity: function reclaim((bytes32,bytes32,bytes,uint256,uint256,bytes32,bytes,uint256) reclaimArgs) returns() +func (_ImultiAssetHolder *ImultiAssetHolderSession) Reclaim(reclaimArgs IMultiAssetHolderReclaimArgs) (*types.Transaction, error) { + return _ImultiAssetHolder.Contract.Reclaim(&_ImultiAssetHolder.TransactOpts, reclaimArgs) +} + +// Reclaim is a paid mutator transaction binding the contract method 0xd3c4e738. +// +// Solidity: function reclaim((bytes32,bytes32,bytes,uint256,uint256,bytes32,bytes,uint256) reclaimArgs) returns() +func (_ImultiAssetHolder *ImultiAssetHolderTransactorSession) Reclaim(reclaimArgs IMultiAssetHolderReclaimArgs) (*types.Transaction, error) { + return _ImultiAssetHolder.Contract.Reclaim(&_ImultiAssetHolder.TransactOpts, reclaimArgs) +} + +// Transfer is a paid mutator transaction binding the contract method 0x3033730e. +// +// Solidity: function transfer(uint256 assetIndex, bytes32 fromChannelId, bytes outcomeBytes, bytes32 stateHash, uint256[] indices) returns() +func (_ImultiAssetHolder *ImultiAssetHolderTransactor) Transfer(opts *bind.TransactOpts, assetIndex *big.Int, fromChannelId [32]byte, outcomeBytes []byte, stateHash [32]byte, indices []*big.Int) (*types.Transaction, error) { + return _ImultiAssetHolder.contract.Transact(opts, "transfer", assetIndex, fromChannelId, outcomeBytes, stateHash, indices) +} + +// Transfer is a paid mutator transaction binding the contract method 0x3033730e. +// +// Solidity: function transfer(uint256 assetIndex, bytes32 fromChannelId, bytes outcomeBytes, bytes32 stateHash, uint256[] indices) returns() +func (_ImultiAssetHolder *ImultiAssetHolderSession) Transfer(assetIndex *big.Int, fromChannelId [32]byte, outcomeBytes []byte, stateHash [32]byte, indices []*big.Int) (*types.Transaction, error) { + return _ImultiAssetHolder.Contract.Transfer(&_ImultiAssetHolder.TransactOpts, assetIndex, fromChannelId, outcomeBytes, stateHash, indices) +} + +// Transfer is a paid mutator transaction binding the contract method 0x3033730e. +// +// Solidity: function transfer(uint256 assetIndex, bytes32 fromChannelId, bytes outcomeBytes, bytes32 stateHash, uint256[] indices) returns() +func (_ImultiAssetHolder *ImultiAssetHolderTransactorSession) Transfer(assetIndex *big.Int, fromChannelId [32]byte, outcomeBytes []byte, stateHash [32]byte, indices []*big.Int) (*types.Transaction, error) { + return _ImultiAssetHolder.Contract.Transfer(&_ImultiAssetHolder.TransactOpts, assetIndex, fromChannelId, outcomeBytes, stateHash, indices) +} + +// ImultiAssetHolderAllocationUpdatedIterator is returned from FilterAllocationUpdated and is used to iterate over the raw logs and unpacked data for AllocationUpdated events raised by the ImultiAssetHolder contract. +type ImultiAssetHolderAllocationUpdatedIterator struct { + Event *ImultiAssetHolderAllocationUpdated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ImultiAssetHolderAllocationUpdatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ImultiAssetHolderAllocationUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ImultiAssetHolderAllocationUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ImultiAssetHolderAllocationUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ImultiAssetHolderAllocationUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ImultiAssetHolderAllocationUpdated represents a AllocationUpdated event raised by the ImultiAssetHolder contract. +type ImultiAssetHolderAllocationUpdated struct { + ChannelId [32]byte + AssetIndex *big.Int + InitialHoldings *big.Int + FinalHoldings *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAllocationUpdated is a free log retrieval operation binding the contract event 0xc36da2054c5669d6dac211b7366d59f2d369151c21edf4940468614b449e0b9a. +// +// Solidity: event AllocationUpdated(bytes32 indexed channelId, uint256 assetIndex, uint256 initialHoldings, uint256 finalHoldings) +func (_ImultiAssetHolder *ImultiAssetHolderFilterer) FilterAllocationUpdated(opts *bind.FilterOpts, channelId [][32]byte) (*ImultiAssetHolderAllocationUpdatedIterator, error) { + + var channelIdRule []interface{} + for _, channelIdItem := range channelId { + channelIdRule = append(channelIdRule, channelIdItem) + } + + logs, sub, err := _ImultiAssetHolder.contract.FilterLogs(opts, "AllocationUpdated", channelIdRule) + if err != nil { + return nil, err + } + return &ImultiAssetHolderAllocationUpdatedIterator{contract: _ImultiAssetHolder.contract, event: "AllocationUpdated", logs: logs, sub: sub}, nil +} + +// WatchAllocationUpdated is a free log subscription operation binding the contract event 0xc36da2054c5669d6dac211b7366d59f2d369151c21edf4940468614b449e0b9a. +// +// Solidity: event AllocationUpdated(bytes32 indexed channelId, uint256 assetIndex, uint256 initialHoldings, uint256 finalHoldings) +func (_ImultiAssetHolder *ImultiAssetHolderFilterer) WatchAllocationUpdated(opts *bind.WatchOpts, sink chan<- *ImultiAssetHolderAllocationUpdated, channelId [][32]byte) (event.Subscription, error) { + + var channelIdRule []interface{} + for _, channelIdItem := range channelId { + channelIdRule = append(channelIdRule, channelIdItem) + } + + logs, sub, err := _ImultiAssetHolder.contract.WatchLogs(opts, "AllocationUpdated", channelIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ImultiAssetHolderAllocationUpdated) + if err := _ImultiAssetHolder.contract.UnpackLog(event, "AllocationUpdated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseAllocationUpdated is a log parse operation binding the contract event 0xc36da2054c5669d6dac211b7366d59f2d369151c21edf4940468614b449e0b9a. +// +// Solidity: event AllocationUpdated(bytes32 indexed channelId, uint256 assetIndex, uint256 initialHoldings, uint256 finalHoldings) +func (_ImultiAssetHolder *ImultiAssetHolderFilterer) ParseAllocationUpdated(log types.Log) (*ImultiAssetHolderAllocationUpdated, error) { + event := new(ImultiAssetHolderAllocationUpdated) + if err := _ImultiAssetHolder.contract.UnpackLog(event, "AllocationUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ImultiAssetHolderDepositedIterator is returned from FilterDeposited and is used to iterate over the raw logs and unpacked data for Deposited events raised by the ImultiAssetHolder contract. +type ImultiAssetHolderDepositedIterator struct { + Event *ImultiAssetHolderDeposited // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ImultiAssetHolderDepositedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ImultiAssetHolderDeposited) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ImultiAssetHolderDeposited) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ImultiAssetHolderDepositedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ImultiAssetHolderDepositedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ImultiAssetHolderDeposited represents a Deposited event raised by the ImultiAssetHolder contract. +type ImultiAssetHolderDeposited struct { + Destination [32]byte + Asset common.Address + DestinationHoldings *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDeposited is a free log retrieval operation binding the contract event 0x87d4c0b5e30d6808bc8a94ba1c4d839b29d664151551a31753387ee9ef48429b. +// +// Solidity: event Deposited(bytes32 indexed destination, address asset, uint256 destinationHoldings) +func (_ImultiAssetHolder *ImultiAssetHolderFilterer) FilterDeposited(opts *bind.FilterOpts, destination [][32]byte) (*ImultiAssetHolderDepositedIterator, error) { + + var destinationRule []interface{} + for _, destinationItem := range destination { + destinationRule = append(destinationRule, destinationItem) + } + + logs, sub, err := _ImultiAssetHolder.contract.FilterLogs(opts, "Deposited", destinationRule) + if err != nil { + return nil, err + } + return &ImultiAssetHolderDepositedIterator{contract: _ImultiAssetHolder.contract, event: "Deposited", logs: logs, sub: sub}, nil +} + +// WatchDeposited is a free log subscription operation binding the contract event 0x87d4c0b5e30d6808bc8a94ba1c4d839b29d664151551a31753387ee9ef48429b. +// +// Solidity: event Deposited(bytes32 indexed destination, address asset, uint256 destinationHoldings) +func (_ImultiAssetHolder *ImultiAssetHolderFilterer) WatchDeposited(opts *bind.WatchOpts, sink chan<- *ImultiAssetHolderDeposited, destination [][32]byte) (event.Subscription, error) { + + var destinationRule []interface{} + for _, destinationItem := range destination { + destinationRule = append(destinationRule, destinationItem) + } + + logs, sub, err := _ImultiAssetHolder.contract.WatchLogs(opts, "Deposited", destinationRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ImultiAssetHolderDeposited) + if err := _ImultiAssetHolder.contract.UnpackLog(event, "Deposited", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseDeposited is a log parse operation binding the contract event 0x87d4c0b5e30d6808bc8a94ba1c4d839b29d664151551a31753387ee9ef48429b. +// +// Solidity: event Deposited(bytes32 indexed destination, address asset, uint256 destinationHoldings) +func (_ImultiAssetHolder *ImultiAssetHolderFilterer) ParseDeposited(log types.Log) (*ImultiAssetHolderDeposited, error) { + event := new(ImultiAssetHolderDeposited) + if err := _ImultiAssetHolder.contract.UnpackLog(event, "Deposited", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ImultiAssetHolderReclaimedIterator is returned from FilterReclaimed and is used to iterate over the raw logs and unpacked data for Reclaimed events raised by the ImultiAssetHolder contract. +type ImultiAssetHolderReclaimedIterator struct { + Event *ImultiAssetHolderReclaimed // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ImultiAssetHolderReclaimedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ImultiAssetHolderReclaimed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ImultiAssetHolderReclaimed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ImultiAssetHolderReclaimedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ImultiAssetHolderReclaimedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ImultiAssetHolderReclaimed represents a Reclaimed event raised by the ImultiAssetHolder contract. +type ImultiAssetHolderReclaimed struct { + ChannelId [32]byte + AssetIndex *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterReclaimed is a free log retrieval operation binding the contract event 0x4d3754632451ebba9812a9305e7bca17b67a17186a5cff93d2e9ae1b01e3d27b. +// +// Solidity: event Reclaimed(bytes32 indexed channelId, uint256 assetIndex) +func (_ImultiAssetHolder *ImultiAssetHolderFilterer) FilterReclaimed(opts *bind.FilterOpts, channelId [][32]byte) (*ImultiAssetHolderReclaimedIterator, error) { + + var channelIdRule []interface{} + for _, channelIdItem := range channelId { + channelIdRule = append(channelIdRule, channelIdItem) + } + + logs, sub, err := _ImultiAssetHolder.contract.FilterLogs(opts, "Reclaimed", channelIdRule) + if err != nil { + return nil, err + } + return &ImultiAssetHolderReclaimedIterator{contract: _ImultiAssetHolder.contract, event: "Reclaimed", logs: logs, sub: sub}, nil +} + +// WatchReclaimed is a free log subscription operation binding the contract event 0x4d3754632451ebba9812a9305e7bca17b67a17186a5cff93d2e9ae1b01e3d27b. +// +// Solidity: event Reclaimed(bytes32 indexed channelId, uint256 assetIndex) +func (_ImultiAssetHolder *ImultiAssetHolderFilterer) WatchReclaimed(opts *bind.WatchOpts, sink chan<- *ImultiAssetHolderReclaimed, channelId [][32]byte) (event.Subscription, error) { + + var channelIdRule []interface{} + for _, channelIdItem := range channelId { + channelIdRule = append(channelIdRule, channelIdItem) + } + + logs, sub, err := _ImultiAssetHolder.contract.WatchLogs(opts, "Reclaimed", channelIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ImultiAssetHolderReclaimed) + if err := _ImultiAssetHolder.contract.UnpackLog(event, "Reclaimed", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseReclaimed is a log parse operation binding the contract event 0x4d3754632451ebba9812a9305e7bca17b67a17186a5cff93d2e9ae1b01e3d27b. +// +// Solidity: event Reclaimed(bytes32 indexed channelId, uint256 assetIndex) +func (_ImultiAssetHolder *ImultiAssetHolderFilterer) ParseReclaimed(log types.Log) (*ImultiAssetHolderReclaimed, error) { + event := new(ImultiAssetHolderReclaimed) + if err := _ImultiAssetHolder.contract.UnpackLog(event, "Reclaimed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} From 0ac9406003bf7548c03b63c0d8fc9d7bc83a520c Mon Sep 17 00:00:00 2001 From: MaxMoskalenko Date: Thu, 6 Feb 2025 11:54:20 +0200 Subject: [PATCH 2/3] feat: add proper ierc20 interface go-binding --- pkg/abi/ierc20/ierc20.go | 738 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 738 insertions(+) create mode 100644 pkg/abi/ierc20/ierc20.go diff --git a/pkg/abi/ierc20/ierc20.go b/pkg/abi/ierc20/ierc20.go new file mode 100644 index 00000000..50edc5ac --- /dev/null +++ b/pkg/abi/ierc20/ierc20.go @@ -0,0 +1,738 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package ierc20 + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// IERC20MetaData contains all meta data concerning the IERC20 contract. +var IERC20MetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// IERC20ABI is the input ABI used to generate the binding from. +// Deprecated: Use IERC20MetaData.ABI instead. +var IERC20ABI = IERC20MetaData.ABI + +// IERC20 is an auto generated Go binding around an Ethereum contract. +type IERC20 struct { + IERC20Caller // Read-only binding to the contract + IERC20Transactor // Write-only binding to the contract + IERC20Filterer // Log filterer for contract events +} + +// IERC20Caller is an auto generated read-only Go binding around an Ethereum contract. +type IERC20Caller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. +type IERC20Transactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IERC20Filterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC20Session is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IERC20Session struct { + Contract *IERC20 // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IERC20CallerSession struct { + Contract *IERC20Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IERC20TransactorSession struct { + Contract *IERC20Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IERC20Raw is an auto generated low-level Go binding around an Ethereum contract. +type IERC20Raw struct { + Contract *IERC20 // Generic contract binding to access the raw methods on +} + +// IERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IERC20CallerRaw struct { + Contract *IERC20Caller // Generic read-only contract binding to access the raw methods on +} + +// IERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IERC20TransactorRaw struct { + Contract *IERC20Transactor // Generic write-only contract binding to access the raw methods on +} + +// NewIERC20 creates a new instance of IERC20, bound to a specific deployed contract. +func NewIERC20(address common.Address, backend bind.ContractBackend) (*IERC20, error) { + contract, err := bindIERC20(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IERC20{IERC20Caller: IERC20Caller{contract: contract}, IERC20Transactor: IERC20Transactor{contract: contract}, IERC20Filterer: IERC20Filterer{contract: contract}}, nil +} + +// NewIERC20Caller creates a new read-only instance of IERC20, bound to a specific deployed contract. +func NewIERC20Caller(address common.Address, caller bind.ContractCaller) (*IERC20Caller, error) { + contract, err := bindIERC20(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IERC20Caller{contract: contract}, nil +} + +// NewIERC20Transactor creates a new write-only instance of IERC20, bound to a specific deployed contract. +func NewIERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*IERC20Transactor, error) { + contract, err := bindIERC20(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IERC20Transactor{contract: contract}, nil +} + +// NewIERC20Filterer creates a new log filterer instance of IERC20, bound to a specific deployed contract. +func NewIERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*IERC20Filterer, error) { + contract, err := bindIERC20(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IERC20Filterer{contract: contract}, nil +} + +// bindIERC20 binds a generic wrapper to an already deployed contract. +func bindIERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IERC20MetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IERC20 *IERC20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IERC20.Contract.IERC20Caller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IERC20 *IERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IERC20.Contract.IERC20Transactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IERC20 *IERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IERC20.Contract.IERC20Transactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IERC20 *IERC20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IERC20.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IERC20 *IERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IERC20.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IERC20 *IERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IERC20.Contract.contract.Transact(opts, method, params...) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_IERC20 *IERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { + var out []interface{} + err := _IERC20.contract.Call(opts, &out, "allowance", owner, spender) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_IERC20 *IERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_IERC20 *IERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_IERC20 *IERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { + var out []interface{} + err := _IERC20.contract.Call(opts, &out, "balanceOf", account) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_IERC20 *IERC20Session) BalanceOf(account common.Address) (*big.Int, error) { + return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_IERC20 *IERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) { + return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_IERC20 *IERC20Caller) Decimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _IERC20.contract.Call(opts, &out, "decimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_IERC20 *IERC20Session) Decimals() (uint8, error) { + return _IERC20.Contract.Decimals(&_IERC20.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_IERC20 *IERC20CallerSession) Decimals() (uint8, error) { + return _IERC20.Contract.Decimals(&_IERC20.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_IERC20 *IERC20Caller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _IERC20.contract.Call(opts, &out, "name") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_IERC20 *IERC20Session) Name() (string, error) { + return _IERC20.Contract.Name(&_IERC20.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_IERC20 *IERC20CallerSession) Name() (string, error) { + return _IERC20.Contract.Name(&_IERC20.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_IERC20 *IERC20Caller) Symbol(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _IERC20.contract.Call(opts, &out, "symbol") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_IERC20 *IERC20Session) Symbol() (string, error) { + return _IERC20.Contract.Symbol(&_IERC20.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_IERC20 *IERC20CallerSession) Symbol() (string, error) { + return _IERC20.Contract.Symbol(&_IERC20.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_IERC20 *IERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _IERC20.contract.Call(opts, &out, "totalSupply") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_IERC20 *IERC20Session) TotalSupply() (*big.Int, error) { + return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_IERC20 *IERC20CallerSession) TotalSupply() (*big.Int, error) { + return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_IERC20 *IERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { + return _IERC20.contract.Transact(opts, "approve", spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_IERC20 *IERC20Session) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_IERC20 *IERC20TransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_IERC20 *IERC20Transactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error) { + return _IERC20.contract.Transact(opts, "transfer", to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_IERC20 *IERC20Session) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_IERC20 *IERC20TransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_IERC20 *IERC20Transactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _IERC20.contract.Transact(opts, "transferFrom", from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_IERC20 *IERC20Session) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_IERC20 *IERC20TransactorSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, from, to, value) +} + +// IERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IERC20 contract. +type IERC20ApprovalIterator struct { + Event *IERC20Approval // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IERC20ApprovalIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IERC20Approval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IERC20Approval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IERC20ApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IERC20ApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IERC20Approval represents a Approval event raised by the IERC20 contract. +type IERC20Approval struct { + Owner common.Address + Spender common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_IERC20 *IERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*IERC20ApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _IERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &IERC20ApprovalIterator{contract: _IERC20.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_IERC20 *IERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _IERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IERC20Approval) + if err := _IERC20.contract.UnpackLog(event, "Approval", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_IERC20 *IERC20Filterer) ParseApproval(log types.Log) (*IERC20Approval, error) { + event := new(IERC20Approval) + if err := _IERC20.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IERC20 contract. +type IERC20TransferIterator struct { + Event *IERC20Transfer // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IERC20TransferIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IERC20Transfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IERC20Transfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IERC20TransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IERC20TransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IERC20Transfer represents a Transfer event raised by the IERC20 contract. +type IERC20Transfer struct { + From common.Address + To common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_IERC20 *IERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IERC20TransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &IERC20TransferIterator{contract: _IERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_IERC20 *IERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IERC20Transfer) + if err := _IERC20.contract.UnpackLog(event, "Transfer", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_IERC20 *IERC20Filterer) ParseTransfer(log types.Log) (*IERC20Transfer, error) { + event := new(IERC20Transfer) + if err := _IERC20.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} From cf4907488a7275e62108c0c89bc9583a1b997f24 Mon Sep 17 00:00:00 2001 From: MaxMoskalenko Date: Thu, 6 Feb 2025 12:08:12 +0200 Subject: [PATCH 3/3] fix: add proper naming --- pkg/abi/iforce_move/iforce_move.go | 326 +++++++++--------- .../imulti_asset_holder.go | 286 +++++++-------- 2 files changed, 306 insertions(+), 306 deletions(-) diff --git a/pkg/abi/iforce_move/iforce_move.go b/pkg/abi/iforce_move/iforce_move.go index 4643de91..b69640bd 100644 --- a/pkg/abi/iforce_move/iforce_move.go +++ b/pkg/abi/iforce_move/iforce_move.go @@ -78,113 +78,113 @@ type INitroTypesVariablePart struct { IsFinal bool } -// IforceMoveMetaData contains all meta data concerning the IforceMove contract. -var IforceMoveMetaData = &bind.MetaData{ +// IForceMoveMetaData contains all meta data concerning the IForceMove contract. +var IForceMoveMetaData = &bind.MetaData{ ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint48\",\"name\":\"newTurnNumRecord\",\"type\":\"uint48\"}],\"name\":\"ChallengeCleared\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint48\",\"name\":\"finalizesAt\",\"type\":\"uint48\"},{\"components\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enumExitFormat.AssetType\",\"name\":\"assetType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.AssetMetadata\",\"name\":\"assetMetadata\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destination\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"allocationType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.Allocation[]\",\"name\":\"allocations\",\"type\":\"tuple[]\"}],\"internalType\":\"structExitFormat.SingleAssetExit[]\",\"name\":\"outcome\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"uint48\",\"name\":\"turnNum\",\"type\":\"uint48\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structINitroTypes.VariablePart\",\"name\":\"variablePart\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"structINitroTypes.Signature[]\",\"name\":\"sigs\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structINitroTypes.SignedVariablePart[]\",\"name\":\"proof\",\"type\":\"tuple[]\"},{\"components\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enumExitFormat.AssetType\",\"name\":\"assetType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.AssetMetadata\",\"name\":\"assetMetadata\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destination\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"allocationType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.Allocation[]\",\"name\":\"allocations\",\"type\":\"tuple[]\"}],\"internalType\":\"structExitFormat.SingleAssetExit[]\",\"name\":\"outcome\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"uint48\",\"name\":\"turnNum\",\"type\":\"uint48\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structINitroTypes.VariablePart\",\"name\":\"variablePart\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"structINitroTypes.Signature[]\",\"name\":\"sigs\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structINitroTypes.SignedVariablePart\",\"name\":\"candidate\",\"type\":\"tuple\"}],\"name\":\"ChallengeRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint48\",\"name\":\"newTurnNumRecord\",\"type\":\"uint48\"}],\"name\":\"Checkpointed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint48\",\"name\":\"finalizesAt\",\"type\":\"uint48\"}],\"name\":\"Concluded\",\"type\":\"event\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"},{\"internalType\":\"uint64\",\"name\":\"channelNonce\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"appDefinition\",\"type\":\"address\"},{\"internalType\":\"uint48\",\"name\":\"challengeDuration\",\"type\":\"uint48\"}],\"internalType\":\"structINitroTypes.FixedPart\",\"name\":\"fixedPart\",\"type\":\"tuple\"},{\"components\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enumExitFormat.AssetType\",\"name\":\"assetType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.AssetMetadata\",\"name\":\"assetMetadata\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destination\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"allocationType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.Allocation[]\",\"name\":\"allocations\",\"type\":\"tuple[]\"}],\"internalType\":\"structExitFormat.SingleAssetExit[]\",\"name\":\"outcome\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"uint48\",\"name\":\"turnNum\",\"type\":\"uint48\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structINitroTypes.VariablePart\",\"name\":\"variablePart\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"structINitroTypes.Signature[]\",\"name\":\"sigs\",\"type\":\"tuple[]\"}],\"internalType\":\"structINitroTypes.SignedVariablePart[]\",\"name\":\"proof\",\"type\":\"tuple[]\"},{\"components\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enumExitFormat.AssetType\",\"name\":\"assetType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.AssetMetadata\",\"name\":\"assetMetadata\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destination\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"allocationType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.Allocation[]\",\"name\":\"allocations\",\"type\":\"tuple[]\"}],\"internalType\":\"structExitFormat.SingleAssetExit[]\",\"name\":\"outcome\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"uint48\",\"name\":\"turnNum\",\"type\":\"uint48\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structINitroTypes.VariablePart\",\"name\":\"variablePart\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"structINitroTypes.Signature[]\",\"name\":\"sigs\",\"type\":\"tuple[]\"}],\"internalType\":\"structINitroTypes.SignedVariablePart\",\"name\":\"candidate\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"structINitroTypes.Signature\",\"name\":\"challengerSig\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"},{\"internalType\":\"uint64\",\"name\":\"channelNonce\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"appDefinition\",\"type\":\"address\"},{\"internalType\":\"uint48\",\"name\":\"challengeDuration\",\"type\":\"uint48\"}],\"internalType\":\"structINitroTypes.FixedPart\",\"name\":\"fixedPart\",\"type\":\"tuple\"},{\"components\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enumExitFormat.AssetType\",\"name\":\"assetType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.AssetMetadata\",\"name\":\"assetMetadata\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destination\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"allocationType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.Allocation[]\",\"name\":\"allocations\",\"type\":\"tuple[]\"}],\"internalType\":\"structExitFormat.SingleAssetExit[]\",\"name\":\"outcome\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"uint48\",\"name\":\"turnNum\",\"type\":\"uint48\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structINitroTypes.VariablePart\",\"name\":\"variablePart\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"structINitroTypes.Signature[]\",\"name\":\"sigs\",\"type\":\"tuple[]\"}],\"internalType\":\"structINitroTypes.SignedVariablePart[]\",\"name\":\"proof\",\"type\":\"tuple[]\"},{\"components\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enumExitFormat.AssetType\",\"name\":\"assetType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.AssetMetadata\",\"name\":\"assetMetadata\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destination\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"allocationType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.Allocation[]\",\"name\":\"allocations\",\"type\":\"tuple[]\"}],\"internalType\":\"structExitFormat.SingleAssetExit[]\",\"name\":\"outcome\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"uint48\",\"name\":\"turnNum\",\"type\":\"uint48\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structINitroTypes.VariablePart\",\"name\":\"variablePart\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"structINitroTypes.Signature[]\",\"name\":\"sigs\",\"type\":\"tuple[]\"}],\"internalType\":\"structINitroTypes.SignedVariablePart\",\"name\":\"candidate\",\"type\":\"tuple\"}],\"name\":\"checkpoint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"},{\"internalType\":\"uint64\",\"name\":\"channelNonce\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"appDefinition\",\"type\":\"address\"},{\"internalType\":\"uint48\",\"name\":\"challengeDuration\",\"type\":\"uint48\"}],\"internalType\":\"structINitroTypes.FixedPart\",\"name\":\"fixedPart\",\"type\":\"tuple\"},{\"components\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enumExitFormat.AssetType\",\"name\":\"assetType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.AssetMetadata\",\"name\":\"assetMetadata\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destination\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"allocationType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.Allocation[]\",\"name\":\"allocations\",\"type\":\"tuple[]\"}],\"internalType\":\"structExitFormat.SingleAssetExit[]\",\"name\":\"outcome\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"uint48\",\"name\":\"turnNum\",\"type\":\"uint48\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structINitroTypes.VariablePart\",\"name\":\"variablePart\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"structINitroTypes.Signature[]\",\"name\":\"sigs\",\"type\":\"tuple[]\"}],\"internalType\":\"structINitroTypes.SignedVariablePart\",\"name\":\"candidate\",\"type\":\"tuple\"}],\"name\":\"conclude\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } -// IforceMoveABI is the input ABI used to generate the binding from. -// Deprecated: Use IforceMoveMetaData.ABI instead. -var IforceMoveABI = IforceMoveMetaData.ABI +// IForceMoveABI is the input ABI used to generate the binding from. +// Deprecated: Use IForceMoveMetaData.ABI instead. +var IForceMoveABI = IForceMoveMetaData.ABI -// IforceMove is an auto generated Go binding around an Ethereum contract. -type IforceMove struct { - IforceMoveCaller // Read-only binding to the contract - IforceMoveTransactor // Write-only binding to the contract - IforceMoveFilterer // Log filterer for contract events +// IForceMove is an auto generated Go binding around an Ethereum contract. +type IForceMove struct { + IForceMoveCaller // Read-only binding to the contract + IForceMoveTransactor // Write-only binding to the contract + IForceMoveFilterer // Log filterer for contract events } -// IforceMoveCaller is an auto generated read-only Go binding around an Ethereum contract. -type IforceMoveCaller struct { +// IForceMoveCaller is an auto generated read-only Go binding around an Ethereum contract. +type IForceMoveCaller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// IforceMoveTransactor is an auto generated write-only Go binding around an Ethereum contract. -type IforceMoveTransactor struct { +// IForceMoveTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IForceMoveTransactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// IforceMoveFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type IforceMoveFilterer struct { +// IForceMoveFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IForceMoveFilterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// IforceMoveSession is an auto generated Go binding around an Ethereum contract, +// IForceMoveSession is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. -type IforceMoveSession struct { - Contract *IforceMove // Generic contract binding to set the session for +type IForceMoveSession struct { + Contract *IForceMove // Generic contract binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } -// IforceMoveCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// IForceMoveCallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. -type IforceMoveCallerSession struct { - Contract *IforceMoveCaller // Generic contract caller binding to set the session for +type IForceMoveCallerSession struct { + Contract *IForceMoveCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session } -// IforceMoveTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// IForceMoveTransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. -type IforceMoveTransactorSession struct { - Contract *IforceMoveTransactor // Generic contract transactor binding to set the session for +type IForceMoveTransactorSession struct { + Contract *IForceMoveTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } -// IforceMoveRaw is an auto generated low-level Go binding around an Ethereum contract. -type IforceMoveRaw struct { - Contract *IforceMove // Generic contract binding to access the raw methods on +// IForceMoveRaw is an auto generated low-level Go binding around an Ethereum contract. +type IForceMoveRaw struct { + Contract *IForceMove // Generic contract binding to access the raw methods on } -// IforceMoveCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type IforceMoveCallerRaw struct { - Contract *IforceMoveCaller // Generic read-only contract binding to access the raw methods on +// IForceMoveCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IForceMoveCallerRaw struct { + Contract *IForceMoveCaller // Generic read-only contract binding to access the raw methods on } -// IforceMoveTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type IforceMoveTransactorRaw struct { - Contract *IforceMoveTransactor // Generic write-only contract binding to access the raw methods on +// IForceMoveTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IForceMoveTransactorRaw struct { + Contract *IForceMoveTransactor // Generic write-only contract binding to access the raw methods on } -// NewIforceMove creates a new instance of IforceMove, bound to a specific deployed contract. -func NewIforceMove(address common.Address, backend bind.ContractBackend) (*IforceMove, error) { - contract, err := bindIforceMove(address, backend, backend, backend) +// NewIForceMove creates a new instance of IForceMove, bound to a specific deployed contract. +func NewIForceMove(address common.Address, backend bind.ContractBackend) (*IForceMove, error) { + contract, err := bindIForceMove(address, backend, backend, backend) if err != nil { return nil, err } - return &IforceMove{IforceMoveCaller: IforceMoveCaller{contract: contract}, IforceMoveTransactor: IforceMoveTransactor{contract: contract}, IforceMoveFilterer: IforceMoveFilterer{contract: contract}}, nil + return &IForceMove{IForceMoveCaller: IForceMoveCaller{contract: contract}, IForceMoveTransactor: IForceMoveTransactor{contract: contract}, IForceMoveFilterer: IForceMoveFilterer{contract: contract}}, nil } -// NewIforceMoveCaller creates a new read-only instance of IforceMove, bound to a specific deployed contract. -func NewIforceMoveCaller(address common.Address, caller bind.ContractCaller) (*IforceMoveCaller, error) { - contract, err := bindIforceMove(address, caller, nil, nil) +// NewIForceMoveCaller creates a new read-only instance of IForceMove, bound to a specific deployed contract. +func NewIForceMoveCaller(address common.Address, caller bind.ContractCaller) (*IForceMoveCaller, error) { + contract, err := bindIForceMove(address, caller, nil, nil) if err != nil { return nil, err } - return &IforceMoveCaller{contract: contract}, nil + return &IForceMoveCaller{contract: contract}, nil } -// NewIforceMoveTransactor creates a new write-only instance of IforceMove, bound to a specific deployed contract. -func NewIforceMoveTransactor(address common.Address, transactor bind.ContractTransactor) (*IforceMoveTransactor, error) { - contract, err := bindIforceMove(address, nil, transactor, nil) +// NewIForceMoveTransactor creates a new write-only instance of IForceMove, bound to a specific deployed contract. +func NewIForceMoveTransactor(address common.Address, transactor bind.ContractTransactor) (*IForceMoveTransactor, error) { + contract, err := bindIForceMove(address, nil, transactor, nil) if err != nil { return nil, err } - return &IforceMoveTransactor{contract: contract}, nil + return &IForceMoveTransactor{contract: contract}, nil } -// NewIforceMoveFilterer creates a new log filterer instance of IforceMove, bound to a specific deployed contract. -func NewIforceMoveFilterer(address common.Address, filterer bind.ContractFilterer) (*IforceMoveFilterer, error) { - contract, err := bindIforceMove(address, nil, nil, filterer) +// NewIForceMoveFilterer creates a new log filterer instance of IForceMove, bound to a specific deployed contract. +func NewIForceMoveFilterer(address common.Address, filterer bind.ContractFilterer) (*IForceMoveFilterer, error) { + contract, err := bindIForceMove(address, nil, nil, filterer) if err != nil { return nil, err } - return &IforceMoveFilterer{contract: contract}, nil + return &IForceMoveFilterer{contract: contract}, nil } -// bindIforceMove binds a generic wrapper to an already deployed contract. -func bindIforceMove(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(IforceMoveABI)) +// bindIForceMove binds a generic wrapper to an already deployed contract. +func bindIForceMove(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(IForceMoveABI)) if err != nil { return nil, err } @@ -195,106 +195,106 @@ func bindIforceMove(address common.Address, caller bind.ContractCaller, transact // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. -func (_IforceMove *IforceMoveRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _IforceMove.Contract.IforceMoveCaller.contract.Call(opts, result, method, params...) +func (_IForceMove *IForceMoveRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IForceMove.Contract.IForceMoveCaller.contract.Call(opts, result, method, params...) } // Transfer initiates a plain transaction to move funds to the contract, calling // its default method if one is available. -func (_IforceMove *IforceMoveRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IforceMove.Contract.IforceMoveTransactor.contract.Transfer(opts) +func (_IForceMove *IForceMoveRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IForceMove.Contract.IForceMoveTransactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. -func (_IforceMove *IforceMoveRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IforceMove.Contract.IforceMoveTransactor.contract.Transact(opts, method, params...) +func (_IForceMove *IForceMoveRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IForceMove.Contract.IForceMoveTransactor.contract.Transact(opts, method, params...) } // Call invokes the (constant) contract method with params as input values and // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. -func (_IforceMove *IforceMoveCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _IforceMove.Contract.contract.Call(opts, result, method, params...) +func (_IForceMove *IForceMoveCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IForceMove.Contract.contract.Call(opts, result, method, params...) } // Transfer initiates a plain transaction to move funds to the contract, calling // its default method if one is available. -func (_IforceMove *IforceMoveTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IforceMove.Contract.contract.Transfer(opts) +func (_IForceMove *IForceMoveTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IForceMove.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. -func (_IforceMove *IforceMoveTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IforceMove.Contract.contract.Transact(opts, method, params...) +func (_IForceMove *IForceMoveTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IForceMove.Contract.contract.Transact(opts, method, params...) } // Challenge is a paid mutator transaction binding the contract method 0x8286a060. // // Solidity: function challenge((address[],uint64,address,uint48) fixedPart, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[])[] proof, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[]) candidate, (uint8,bytes32,bytes32) challengerSig) returns() -func (_IforceMove *IforceMoveTransactor) Challenge(opts *bind.TransactOpts, fixedPart INitroTypesFixedPart, proof []INitroTypesSignedVariablePart, candidate INitroTypesSignedVariablePart, challengerSig INitroTypesSignature) (*types.Transaction, error) { - return _IforceMove.contract.Transact(opts, "challenge", fixedPart, proof, candidate, challengerSig) +func (_IForceMove *IForceMoveTransactor) Challenge(opts *bind.TransactOpts, fixedPart INitroTypesFixedPart, proof []INitroTypesSignedVariablePart, candidate INitroTypesSignedVariablePart, challengerSig INitroTypesSignature) (*types.Transaction, error) { + return _IForceMove.contract.Transact(opts, "challenge", fixedPart, proof, candidate, challengerSig) } // Challenge is a paid mutator transaction binding the contract method 0x8286a060. // // Solidity: function challenge((address[],uint64,address,uint48) fixedPart, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[])[] proof, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[]) candidate, (uint8,bytes32,bytes32) challengerSig) returns() -func (_IforceMove *IforceMoveSession) Challenge(fixedPart INitroTypesFixedPart, proof []INitroTypesSignedVariablePart, candidate INitroTypesSignedVariablePart, challengerSig INitroTypesSignature) (*types.Transaction, error) { - return _IforceMove.Contract.Challenge(&_IforceMove.TransactOpts, fixedPart, proof, candidate, challengerSig) +func (_IForceMove *IForceMoveSession) Challenge(fixedPart INitroTypesFixedPart, proof []INitroTypesSignedVariablePart, candidate INitroTypesSignedVariablePart, challengerSig INitroTypesSignature) (*types.Transaction, error) { + return _IForceMove.Contract.Challenge(&_IForceMove.TransactOpts, fixedPart, proof, candidate, challengerSig) } // Challenge is a paid mutator transaction binding the contract method 0x8286a060. // // Solidity: function challenge((address[],uint64,address,uint48) fixedPart, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[])[] proof, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[]) candidate, (uint8,bytes32,bytes32) challengerSig) returns() -func (_IforceMove *IforceMoveTransactorSession) Challenge(fixedPart INitroTypesFixedPart, proof []INitroTypesSignedVariablePart, candidate INitroTypesSignedVariablePart, challengerSig INitroTypesSignature) (*types.Transaction, error) { - return _IforceMove.Contract.Challenge(&_IforceMove.TransactOpts, fixedPart, proof, candidate, challengerSig) +func (_IForceMove *IForceMoveTransactorSession) Challenge(fixedPart INitroTypesFixedPart, proof []INitroTypesSignedVariablePart, candidate INitroTypesSignedVariablePart, challengerSig INitroTypesSignature) (*types.Transaction, error) { + return _IForceMove.Contract.Challenge(&_IForceMove.TransactOpts, fixedPart, proof, candidate, challengerSig) } // Checkpoint is a paid mutator transaction binding the contract method 0x6d2a9c92. // // Solidity: function checkpoint((address[],uint64,address,uint48) fixedPart, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[])[] proof, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[]) candidate) returns() -func (_IforceMove *IforceMoveTransactor) Checkpoint(opts *bind.TransactOpts, fixedPart INitroTypesFixedPart, proof []INitroTypesSignedVariablePart, candidate INitroTypesSignedVariablePart) (*types.Transaction, error) { - return _IforceMove.contract.Transact(opts, "checkpoint", fixedPart, proof, candidate) +func (_IForceMove *IForceMoveTransactor) Checkpoint(opts *bind.TransactOpts, fixedPart INitroTypesFixedPart, proof []INitroTypesSignedVariablePart, candidate INitroTypesSignedVariablePart) (*types.Transaction, error) { + return _IForceMove.contract.Transact(opts, "checkpoint", fixedPart, proof, candidate) } // Checkpoint is a paid mutator transaction binding the contract method 0x6d2a9c92. // // Solidity: function checkpoint((address[],uint64,address,uint48) fixedPart, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[])[] proof, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[]) candidate) returns() -func (_IforceMove *IforceMoveSession) Checkpoint(fixedPart INitroTypesFixedPart, proof []INitroTypesSignedVariablePart, candidate INitroTypesSignedVariablePart) (*types.Transaction, error) { - return _IforceMove.Contract.Checkpoint(&_IforceMove.TransactOpts, fixedPart, proof, candidate) +func (_IForceMove *IForceMoveSession) Checkpoint(fixedPart INitroTypesFixedPart, proof []INitroTypesSignedVariablePart, candidate INitroTypesSignedVariablePart) (*types.Transaction, error) { + return _IForceMove.Contract.Checkpoint(&_IForceMove.TransactOpts, fixedPart, proof, candidate) } // Checkpoint is a paid mutator transaction binding the contract method 0x6d2a9c92. // // Solidity: function checkpoint((address[],uint64,address,uint48) fixedPart, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[])[] proof, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[]) candidate) returns() -func (_IforceMove *IforceMoveTransactorSession) Checkpoint(fixedPart INitroTypesFixedPart, proof []INitroTypesSignedVariablePart, candidate INitroTypesSignedVariablePart) (*types.Transaction, error) { - return _IforceMove.Contract.Checkpoint(&_IforceMove.TransactOpts, fixedPart, proof, candidate) +func (_IForceMove *IForceMoveTransactorSession) Checkpoint(fixedPart INitroTypesFixedPart, proof []INitroTypesSignedVariablePart, candidate INitroTypesSignedVariablePart) (*types.Transaction, error) { + return _IForceMove.Contract.Checkpoint(&_IForceMove.TransactOpts, fixedPart, proof, candidate) } // Conclude is a paid mutator transaction binding the contract method 0xee049b50. // // Solidity: function conclude((address[],uint64,address,uint48) fixedPart, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[]) candidate) returns() -func (_IforceMove *IforceMoveTransactor) Conclude(opts *bind.TransactOpts, fixedPart INitroTypesFixedPart, candidate INitroTypesSignedVariablePart) (*types.Transaction, error) { - return _IforceMove.contract.Transact(opts, "conclude", fixedPart, candidate) +func (_IForceMove *IForceMoveTransactor) Conclude(opts *bind.TransactOpts, fixedPart INitroTypesFixedPart, candidate INitroTypesSignedVariablePart) (*types.Transaction, error) { + return _IForceMove.contract.Transact(opts, "conclude", fixedPart, candidate) } // Conclude is a paid mutator transaction binding the contract method 0xee049b50. // // Solidity: function conclude((address[],uint64,address,uint48) fixedPart, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[]) candidate) returns() -func (_IforceMove *IforceMoveSession) Conclude(fixedPart INitroTypesFixedPart, candidate INitroTypesSignedVariablePart) (*types.Transaction, error) { - return _IforceMove.Contract.Conclude(&_IforceMove.TransactOpts, fixedPart, candidate) +func (_IForceMove *IForceMoveSession) Conclude(fixedPart INitroTypesFixedPart, candidate INitroTypesSignedVariablePart) (*types.Transaction, error) { + return _IForceMove.Contract.Conclude(&_IForceMove.TransactOpts, fixedPart, candidate) } // Conclude is a paid mutator transaction binding the contract method 0xee049b50. // // Solidity: function conclude((address[],uint64,address,uint48) fixedPart, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[]) candidate) returns() -func (_IforceMove *IforceMoveTransactorSession) Conclude(fixedPart INitroTypesFixedPart, candidate INitroTypesSignedVariablePart) (*types.Transaction, error) { - return _IforceMove.Contract.Conclude(&_IforceMove.TransactOpts, fixedPart, candidate) +func (_IForceMove *IForceMoveTransactorSession) Conclude(fixedPart INitroTypesFixedPart, candidate INitroTypesSignedVariablePart) (*types.Transaction, error) { + return _IForceMove.Contract.Conclude(&_IForceMove.TransactOpts, fixedPart, candidate) } -// IforceMoveChallengeClearedIterator is returned from FilterChallengeCleared and is used to iterate over the raw logs and unpacked data for ChallengeCleared events raised by the IforceMove contract. -type IforceMoveChallengeClearedIterator struct { - Event *IforceMoveChallengeCleared // Event containing the contract specifics and raw log +// IForceMoveChallengeClearedIterator is returned from FilterChallengeCleared and is used to iterate over the raw logs and unpacked data for ChallengeCleared events raised by the IForceMove contract. +type IForceMoveChallengeClearedIterator struct { + Event *IForceMoveChallengeCleared // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -308,7 +308,7 @@ type IforceMoveChallengeClearedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *IforceMoveChallengeClearedIterator) Next() bool { +func (it *IForceMoveChallengeClearedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -317,7 +317,7 @@ func (it *IforceMoveChallengeClearedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IforceMoveChallengeCleared) + it.Event = new(IForceMoveChallengeCleared) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -332,7 +332,7 @@ func (it *IforceMoveChallengeClearedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(IforceMoveChallengeCleared) + it.Event = new(IForceMoveChallengeCleared) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -348,19 +348,19 @@ func (it *IforceMoveChallengeClearedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *IforceMoveChallengeClearedIterator) Error() error { +func (it *IForceMoveChallengeClearedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *IforceMoveChallengeClearedIterator) Close() error { +func (it *IForceMoveChallengeClearedIterator) Close() error { it.sub.Unsubscribe() return nil } -// IforceMoveChallengeCleared represents a ChallengeCleared event raised by the IforceMove contract. -type IforceMoveChallengeCleared struct { +// IForceMoveChallengeCleared represents a ChallengeCleared event raised by the IForceMove contract. +type IForceMoveChallengeCleared struct { ChannelId [32]byte NewTurnNumRecord *big.Int Raw types.Log // Blockchain specific contextual infos @@ -369,31 +369,31 @@ type IforceMoveChallengeCleared struct { // FilterChallengeCleared is a free log retrieval operation binding the contract event 0x07da0a0674fb921e484018c8b81d80e292745e5d8ed134b580c8b9c631c5e9e0. // // Solidity: event ChallengeCleared(bytes32 indexed channelId, uint48 newTurnNumRecord) -func (_IforceMove *IforceMoveFilterer) FilterChallengeCleared(opts *bind.FilterOpts, channelId [][32]byte) (*IforceMoveChallengeClearedIterator, error) { +func (_IForceMove *IForceMoveFilterer) FilterChallengeCleared(opts *bind.FilterOpts, channelId [][32]byte) (*IForceMoveChallengeClearedIterator, error) { var channelIdRule []interface{} for _, channelIdItem := range channelId { channelIdRule = append(channelIdRule, channelIdItem) } - logs, sub, err := _IforceMove.contract.FilterLogs(opts, "ChallengeCleared", channelIdRule) + logs, sub, err := _IForceMove.contract.FilterLogs(opts, "ChallengeCleared", channelIdRule) if err != nil { return nil, err } - return &IforceMoveChallengeClearedIterator{contract: _IforceMove.contract, event: "ChallengeCleared", logs: logs, sub: sub}, nil + return &IForceMoveChallengeClearedIterator{contract: _IForceMove.contract, event: "ChallengeCleared", logs: logs, sub: sub}, nil } // WatchChallengeCleared is a free log subscription operation binding the contract event 0x07da0a0674fb921e484018c8b81d80e292745e5d8ed134b580c8b9c631c5e9e0. // // Solidity: event ChallengeCleared(bytes32 indexed channelId, uint48 newTurnNumRecord) -func (_IforceMove *IforceMoveFilterer) WatchChallengeCleared(opts *bind.WatchOpts, sink chan<- *IforceMoveChallengeCleared, channelId [][32]byte) (event.Subscription, error) { +func (_IForceMove *IForceMoveFilterer) WatchChallengeCleared(opts *bind.WatchOpts, sink chan<- *IForceMoveChallengeCleared, channelId [][32]byte) (event.Subscription, error) { var channelIdRule []interface{} for _, channelIdItem := range channelId { channelIdRule = append(channelIdRule, channelIdItem) } - logs, sub, err := _IforceMove.contract.WatchLogs(opts, "ChallengeCleared", channelIdRule) + logs, sub, err := _IForceMove.contract.WatchLogs(opts, "ChallengeCleared", channelIdRule) if err != nil { return nil, err } @@ -403,8 +403,8 @@ func (_IforceMove *IforceMoveFilterer) WatchChallengeCleared(opts *bind.WatchOpt select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(IforceMoveChallengeCleared) - if err := _IforceMove.contract.UnpackLog(event, "ChallengeCleared", log); err != nil { + event := new(IForceMoveChallengeCleared) + if err := _IForceMove.contract.UnpackLog(event, "ChallengeCleared", log); err != nil { return err } event.Raw = log @@ -428,18 +428,18 @@ func (_IforceMove *IforceMoveFilterer) WatchChallengeCleared(opts *bind.WatchOpt // ParseChallengeCleared is a log parse operation binding the contract event 0x07da0a0674fb921e484018c8b81d80e292745e5d8ed134b580c8b9c631c5e9e0. // // Solidity: event ChallengeCleared(bytes32 indexed channelId, uint48 newTurnNumRecord) -func (_IforceMove *IforceMoveFilterer) ParseChallengeCleared(log types.Log) (*IforceMoveChallengeCleared, error) { - event := new(IforceMoveChallengeCleared) - if err := _IforceMove.contract.UnpackLog(event, "ChallengeCleared", log); err != nil { +func (_IForceMove *IForceMoveFilterer) ParseChallengeCleared(log types.Log) (*IForceMoveChallengeCleared, error) { + event := new(IForceMoveChallengeCleared) + if err := _IForceMove.contract.UnpackLog(event, "ChallengeCleared", log); err != nil { return nil, err } event.Raw = log return event, nil } -// IforceMoveChallengeRegisteredIterator is returned from FilterChallengeRegistered and is used to iterate over the raw logs and unpacked data for ChallengeRegistered events raised by the IforceMove contract. -type IforceMoveChallengeRegisteredIterator struct { - Event *IforceMoveChallengeRegistered // Event containing the contract specifics and raw log +// IForceMoveChallengeRegisteredIterator is returned from FilterChallengeRegistered and is used to iterate over the raw logs and unpacked data for ChallengeRegistered events raised by the IForceMove contract. +type IForceMoveChallengeRegisteredIterator struct { + Event *IForceMoveChallengeRegistered // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -453,7 +453,7 @@ type IforceMoveChallengeRegisteredIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *IforceMoveChallengeRegisteredIterator) Next() bool { +func (it *IForceMoveChallengeRegisteredIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -462,7 +462,7 @@ func (it *IforceMoveChallengeRegisteredIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IforceMoveChallengeRegistered) + it.Event = new(IForceMoveChallengeRegistered) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -477,7 +477,7 @@ func (it *IforceMoveChallengeRegisteredIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(IforceMoveChallengeRegistered) + it.Event = new(IForceMoveChallengeRegistered) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -493,19 +493,19 @@ func (it *IforceMoveChallengeRegisteredIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *IforceMoveChallengeRegisteredIterator) Error() error { +func (it *IForceMoveChallengeRegisteredIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *IforceMoveChallengeRegisteredIterator) Close() error { +func (it *IForceMoveChallengeRegisteredIterator) Close() error { it.sub.Unsubscribe() return nil } -// IforceMoveChallengeRegistered represents a ChallengeRegistered event raised by the IforceMove contract. -type IforceMoveChallengeRegistered struct { +// IForceMoveChallengeRegistered represents a ChallengeRegistered event raised by the IForceMove contract. +type IForceMoveChallengeRegistered struct { ChannelId [32]byte FinalizesAt *big.Int Proof []INitroTypesSignedVariablePart @@ -516,31 +516,31 @@ type IforceMoveChallengeRegistered struct { // FilterChallengeRegistered is a free log retrieval operation binding the contract event 0x0aa12461ee6c137332989aa12cec79f4772ab2c1a8732a382aada7e9f3ec9d34. // // Solidity: event ChallengeRegistered(bytes32 indexed channelId, uint48 finalizesAt, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[])[] proof, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[]) candidate) -func (_IforceMove *IforceMoveFilterer) FilterChallengeRegistered(opts *bind.FilterOpts, channelId [][32]byte) (*IforceMoveChallengeRegisteredIterator, error) { +func (_IForceMove *IForceMoveFilterer) FilterChallengeRegistered(opts *bind.FilterOpts, channelId [][32]byte) (*IForceMoveChallengeRegisteredIterator, error) { var channelIdRule []interface{} for _, channelIdItem := range channelId { channelIdRule = append(channelIdRule, channelIdItem) } - logs, sub, err := _IforceMove.contract.FilterLogs(opts, "ChallengeRegistered", channelIdRule) + logs, sub, err := _IForceMove.contract.FilterLogs(opts, "ChallengeRegistered", channelIdRule) if err != nil { return nil, err } - return &IforceMoveChallengeRegisteredIterator{contract: _IforceMove.contract, event: "ChallengeRegistered", logs: logs, sub: sub}, nil + return &IForceMoveChallengeRegisteredIterator{contract: _IForceMove.contract, event: "ChallengeRegistered", logs: logs, sub: sub}, nil } // WatchChallengeRegistered is a free log subscription operation binding the contract event 0x0aa12461ee6c137332989aa12cec79f4772ab2c1a8732a382aada7e9f3ec9d34. // // Solidity: event ChallengeRegistered(bytes32 indexed channelId, uint48 finalizesAt, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[])[] proof, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[]) candidate) -func (_IforceMove *IforceMoveFilterer) WatchChallengeRegistered(opts *bind.WatchOpts, sink chan<- *IforceMoveChallengeRegistered, channelId [][32]byte) (event.Subscription, error) { +func (_IForceMove *IForceMoveFilterer) WatchChallengeRegistered(opts *bind.WatchOpts, sink chan<- *IForceMoveChallengeRegistered, channelId [][32]byte) (event.Subscription, error) { var channelIdRule []interface{} for _, channelIdItem := range channelId { channelIdRule = append(channelIdRule, channelIdItem) } - logs, sub, err := _IforceMove.contract.WatchLogs(opts, "ChallengeRegistered", channelIdRule) + logs, sub, err := _IForceMove.contract.WatchLogs(opts, "ChallengeRegistered", channelIdRule) if err != nil { return nil, err } @@ -550,8 +550,8 @@ func (_IforceMove *IforceMoveFilterer) WatchChallengeRegistered(opts *bind.Watch select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(IforceMoveChallengeRegistered) - if err := _IforceMove.contract.UnpackLog(event, "ChallengeRegistered", log); err != nil { + event := new(IForceMoveChallengeRegistered) + if err := _IForceMove.contract.UnpackLog(event, "ChallengeRegistered", log); err != nil { return err } event.Raw = log @@ -575,18 +575,18 @@ func (_IforceMove *IforceMoveFilterer) WatchChallengeRegistered(opts *bind.Watch // ParseChallengeRegistered is a log parse operation binding the contract event 0x0aa12461ee6c137332989aa12cec79f4772ab2c1a8732a382aada7e9f3ec9d34. // // Solidity: event ChallengeRegistered(bytes32 indexed channelId, uint48 finalizesAt, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[])[] proof, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),(uint8,bytes32,bytes32)[]) candidate) -func (_IforceMove *IforceMoveFilterer) ParseChallengeRegistered(log types.Log) (*IforceMoveChallengeRegistered, error) { - event := new(IforceMoveChallengeRegistered) - if err := _IforceMove.contract.UnpackLog(event, "ChallengeRegistered", log); err != nil { +func (_IForceMove *IForceMoveFilterer) ParseChallengeRegistered(log types.Log) (*IForceMoveChallengeRegistered, error) { + event := new(IForceMoveChallengeRegistered) + if err := _IForceMove.contract.UnpackLog(event, "ChallengeRegistered", log); err != nil { return nil, err } event.Raw = log return event, nil } -// IforceMoveCheckpointedIterator is returned from FilterCheckpointed and is used to iterate over the raw logs and unpacked data for Checkpointed events raised by the IforceMove contract. -type IforceMoveCheckpointedIterator struct { - Event *IforceMoveCheckpointed // Event containing the contract specifics and raw log +// IForceMoveCheckpointedIterator is returned from FilterCheckpointed and is used to iterate over the raw logs and unpacked data for Checkpointed events raised by the IForceMove contract. +type IForceMoveCheckpointedIterator struct { + Event *IForceMoveCheckpointed // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -600,7 +600,7 @@ type IforceMoveCheckpointedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *IforceMoveCheckpointedIterator) Next() bool { +func (it *IForceMoveCheckpointedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -609,7 +609,7 @@ func (it *IforceMoveCheckpointedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IforceMoveCheckpointed) + it.Event = new(IForceMoveCheckpointed) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -624,7 +624,7 @@ func (it *IforceMoveCheckpointedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(IforceMoveCheckpointed) + it.Event = new(IForceMoveCheckpointed) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -640,19 +640,19 @@ func (it *IforceMoveCheckpointedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *IforceMoveCheckpointedIterator) Error() error { +func (it *IForceMoveCheckpointedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *IforceMoveCheckpointedIterator) Close() error { +func (it *IForceMoveCheckpointedIterator) Close() error { it.sub.Unsubscribe() return nil } -// IforceMoveCheckpointed represents a Checkpointed event raised by the IforceMove contract. -type IforceMoveCheckpointed struct { +// IForceMoveCheckpointed represents a Checkpointed event raised by the IForceMove contract. +type IForceMoveCheckpointed struct { ChannelId [32]byte NewTurnNumRecord *big.Int Raw types.Log // Blockchain specific contextual infos @@ -661,31 +661,31 @@ type IforceMoveCheckpointed struct { // FilterCheckpointed is a free log retrieval operation binding the contract event 0xf3f2d5574c50e581f1a2371fac7dee87f7c6d599a496765fbfa2547ce7fd5f1a. // // Solidity: event Checkpointed(bytes32 indexed channelId, uint48 newTurnNumRecord) -func (_IforceMove *IforceMoveFilterer) FilterCheckpointed(opts *bind.FilterOpts, channelId [][32]byte) (*IforceMoveCheckpointedIterator, error) { +func (_IForceMove *IForceMoveFilterer) FilterCheckpointed(opts *bind.FilterOpts, channelId [][32]byte) (*IForceMoveCheckpointedIterator, error) { var channelIdRule []interface{} for _, channelIdItem := range channelId { channelIdRule = append(channelIdRule, channelIdItem) } - logs, sub, err := _IforceMove.contract.FilterLogs(opts, "Checkpointed", channelIdRule) + logs, sub, err := _IForceMove.contract.FilterLogs(opts, "Checkpointed", channelIdRule) if err != nil { return nil, err } - return &IforceMoveCheckpointedIterator{contract: _IforceMove.contract, event: "Checkpointed", logs: logs, sub: sub}, nil + return &IForceMoveCheckpointedIterator{contract: _IForceMove.contract, event: "Checkpointed", logs: logs, sub: sub}, nil } // WatchCheckpointed is a free log subscription operation binding the contract event 0xf3f2d5574c50e581f1a2371fac7dee87f7c6d599a496765fbfa2547ce7fd5f1a. // // Solidity: event Checkpointed(bytes32 indexed channelId, uint48 newTurnNumRecord) -func (_IforceMove *IforceMoveFilterer) WatchCheckpointed(opts *bind.WatchOpts, sink chan<- *IforceMoveCheckpointed, channelId [][32]byte) (event.Subscription, error) { +func (_IForceMove *IForceMoveFilterer) WatchCheckpointed(opts *bind.WatchOpts, sink chan<- *IForceMoveCheckpointed, channelId [][32]byte) (event.Subscription, error) { var channelIdRule []interface{} for _, channelIdItem := range channelId { channelIdRule = append(channelIdRule, channelIdItem) } - logs, sub, err := _IforceMove.contract.WatchLogs(opts, "Checkpointed", channelIdRule) + logs, sub, err := _IForceMove.contract.WatchLogs(opts, "Checkpointed", channelIdRule) if err != nil { return nil, err } @@ -695,8 +695,8 @@ func (_IforceMove *IforceMoveFilterer) WatchCheckpointed(opts *bind.WatchOpts, s select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(IforceMoveCheckpointed) - if err := _IforceMove.contract.UnpackLog(event, "Checkpointed", log); err != nil { + event := new(IForceMoveCheckpointed) + if err := _IForceMove.contract.UnpackLog(event, "Checkpointed", log); err != nil { return err } event.Raw = log @@ -720,18 +720,18 @@ func (_IforceMove *IforceMoveFilterer) WatchCheckpointed(opts *bind.WatchOpts, s // ParseCheckpointed is a log parse operation binding the contract event 0xf3f2d5574c50e581f1a2371fac7dee87f7c6d599a496765fbfa2547ce7fd5f1a. // // Solidity: event Checkpointed(bytes32 indexed channelId, uint48 newTurnNumRecord) -func (_IforceMove *IforceMoveFilterer) ParseCheckpointed(log types.Log) (*IforceMoveCheckpointed, error) { - event := new(IforceMoveCheckpointed) - if err := _IforceMove.contract.UnpackLog(event, "Checkpointed", log); err != nil { +func (_IForceMove *IForceMoveFilterer) ParseCheckpointed(log types.Log) (*IForceMoveCheckpointed, error) { + event := new(IForceMoveCheckpointed) + if err := _IForceMove.contract.UnpackLog(event, "Checkpointed", log); err != nil { return nil, err } event.Raw = log return event, nil } -// IforceMoveConcludedIterator is returned from FilterConcluded and is used to iterate over the raw logs and unpacked data for Concluded events raised by the IforceMove contract. -type IforceMoveConcludedIterator struct { - Event *IforceMoveConcluded // Event containing the contract specifics and raw log +// IForceMoveConcludedIterator is returned from FilterConcluded and is used to iterate over the raw logs and unpacked data for Concluded events raised by the IForceMove contract. +type IForceMoveConcludedIterator struct { + Event *IForceMoveConcluded // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -745,7 +745,7 @@ type IforceMoveConcludedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *IforceMoveConcludedIterator) Next() bool { +func (it *IForceMoveConcludedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -754,7 +754,7 @@ func (it *IforceMoveConcludedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IforceMoveConcluded) + it.Event = new(IForceMoveConcluded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -769,7 +769,7 @@ func (it *IforceMoveConcludedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(IforceMoveConcluded) + it.Event = new(IForceMoveConcluded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -785,19 +785,19 @@ func (it *IforceMoveConcludedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *IforceMoveConcludedIterator) Error() error { +func (it *IForceMoveConcludedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *IforceMoveConcludedIterator) Close() error { +func (it *IForceMoveConcludedIterator) Close() error { it.sub.Unsubscribe() return nil } -// IforceMoveConcluded represents a Concluded event raised by the IforceMove contract. -type IforceMoveConcluded struct { +// IForceMoveConcluded represents a Concluded event raised by the IForceMove contract. +type IForceMoveConcluded struct { ChannelId [32]byte FinalizesAt *big.Int Raw types.Log // Blockchain specific contextual infos @@ -806,31 +806,31 @@ type IforceMoveConcluded struct { // FilterConcluded is a free log retrieval operation binding the contract event 0x4f465027a3d06ea73dd12be0f5c5fc0a34e21f19d6eaed4834a7a944edabc901. // // Solidity: event Concluded(bytes32 indexed channelId, uint48 finalizesAt) -func (_IforceMove *IforceMoveFilterer) FilterConcluded(opts *bind.FilterOpts, channelId [][32]byte) (*IforceMoveConcludedIterator, error) { +func (_IForceMove *IForceMoveFilterer) FilterConcluded(opts *bind.FilterOpts, channelId [][32]byte) (*IForceMoveConcludedIterator, error) { var channelIdRule []interface{} for _, channelIdItem := range channelId { channelIdRule = append(channelIdRule, channelIdItem) } - logs, sub, err := _IforceMove.contract.FilterLogs(opts, "Concluded", channelIdRule) + logs, sub, err := _IForceMove.contract.FilterLogs(opts, "Concluded", channelIdRule) if err != nil { return nil, err } - return &IforceMoveConcludedIterator{contract: _IforceMove.contract, event: "Concluded", logs: logs, sub: sub}, nil + return &IForceMoveConcludedIterator{contract: _IForceMove.contract, event: "Concluded", logs: logs, sub: sub}, nil } // WatchConcluded is a free log subscription operation binding the contract event 0x4f465027a3d06ea73dd12be0f5c5fc0a34e21f19d6eaed4834a7a944edabc901. // // Solidity: event Concluded(bytes32 indexed channelId, uint48 finalizesAt) -func (_IforceMove *IforceMoveFilterer) WatchConcluded(opts *bind.WatchOpts, sink chan<- *IforceMoveConcluded, channelId [][32]byte) (event.Subscription, error) { +func (_IForceMove *IForceMoveFilterer) WatchConcluded(opts *bind.WatchOpts, sink chan<- *IForceMoveConcluded, channelId [][32]byte) (event.Subscription, error) { var channelIdRule []interface{} for _, channelIdItem := range channelId { channelIdRule = append(channelIdRule, channelIdItem) } - logs, sub, err := _IforceMove.contract.WatchLogs(opts, "Concluded", channelIdRule) + logs, sub, err := _IForceMove.contract.WatchLogs(opts, "Concluded", channelIdRule) if err != nil { return nil, err } @@ -840,8 +840,8 @@ func (_IforceMove *IforceMoveFilterer) WatchConcluded(opts *bind.WatchOpts, sink select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(IforceMoveConcluded) - if err := _IforceMove.contract.UnpackLog(event, "Concluded", log); err != nil { + event := new(IForceMoveConcluded) + if err := _IForceMove.contract.UnpackLog(event, "Concluded", log); err != nil { return err } event.Raw = log @@ -865,9 +865,9 @@ func (_IforceMove *IforceMoveFilterer) WatchConcluded(opts *bind.WatchOpts, sink // ParseConcluded is a log parse operation binding the contract event 0x4f465027a3d06ea73dd12be0f5c5fc0a34e21f19d6eaed4834a7a944edabc901. // // Solidity: event Concluded(bytes32 indexed channelId, uint48 finalizesAt) -func (_IforceMove *IforceMoveFilterer) ParseConcluded(log types.Log) (*IforceMoveConcluded, error) { - event := new(IforceMoveConcluded) - if err := _IforceMove.contract.UnpackLog(event, "Concluded", log); err != nil { +func (_IForceMove *IForceMoveFilterer) ParseConcluded(log types.Log) (*IForceMoveConcluded, error) { + event := new(IForceMoveConcluded) + if err := _IForceMove.contract.UnpackLog(event, "Concluded", log); err != nil { return nil, err } event.Raw = log diff --git a/pkg/abi/imulti_asset_holder/imulti_asset_holder.go b/pkg/abi/imulti_asset_holder/imulti_asset_holder.go index cda36088..da0721a0 100644 --- a/pkg/abi/imulti_asset_holder/imulti_asset_holder.go +++ b/pkg/abi/imulti_asset_holder/imulti_asset_holder.go @@ -40,113 +40,113 @@ type IMultiAssetHolderReclaimArgs struct { TargetAssetIndex *big.Int } -// ImultiAssetHolderMetaData contains all meta data concerning the ImultiAssetHolder contract. -var ImultiAssetHolderMetaData = &bind.MetaData{ +// IMultiAssetHolderMetaData contains all meta data concerning the IMultiAssetHolder contract. +var IMultiAssetHolderMetaData = &bind.MetaData{ ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assetIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialHoldings\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"finalHoldings\",\"type\":\"uint256\"}],\"name\":\"AllocationUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"destination\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"destinationHoldings\",\"type\":\"uint256\"}],\"name\":\"Deposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assetIndex\",\"type\":\"uint256\"}],\"name\":\"Reclaimed\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"destination\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"expectedHeld\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"sourceChannelId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"sourceStateHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"sourceOutcomeBytes\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"sourceAssetIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"indexOfTargetInSource\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"targetStateHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"targetOutcomeBytes\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"targetAssetIndex\",\"type\":\"uint256\"}],\"internalType\":\"structIMultiAssetHolder.ReclaimArgs\",\"name\":\"reclaimArgs\",\"type\":\"tuple\"}],\"name\":\"reclaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assetIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"fromChannelId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"outcomeBytes\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"stateHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"indices\",\"type\":\"uint256[]\"}],\"name\":\"transfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } -// ImultiAssetHolderABI is the input ABI used to generate the binding from. -// Deprecated: Use ImultiAssetHolderMetaData.ABI instead. -var ImultiAssetHolderABI = ImultiAssetHolderMetaData.ABI +// IMultiAssetHolderABI is the input ABI used to generate the binding from. +// Deprecated: Use IMultiAssetHolderMetaData.ABI instead. +var IMultiAssetHolderABI = IMultiAssetHolderMetaData.ABI -// ImultiAssetHolder is an auto generated Go binding around an Ethereum contract. -type ImultiAssetHolder struct { - ImultiAssetHolderCaller // Read-only binding to the contract - ImultiAssetHolderTransactor // Write-only binding to the contract - ImultiAssetHolderFilterer // Log filterer for contract events +// IMultiAssetHolder is an auto generated Go binding around an Ethereum contract. +type IMultiAssetHolder struct { + IMultiAssetHolderCaller // Read-only binding to the contract + IMultiAssetHolderTransactor // Write-only binding to the contract + IMultiAssetHolderFilterer // Log filterer for contract events } -// ImultiAssetHolderCaller is an auto generated read-only Go binding around an Ethereum contract. -type ImultiAssetHolderCaller struct { +// IMultiAssetHolderCaller is an auto generated read-only Go binding around an Ethereum contract. +type IMultiAssetHolderCaller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// ImultiAssetHolderTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ImultiAssetHolderTransactor struct { +// IMultiAssetHolderTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IMultiAssetHolderTransactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// ImultiAssetHolderFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ImultiAssetHolderFilterer struct { +// IMultiAssetHolderFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IMultiAssetHolderFilterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// ImultiAssetHolderSession is an auto generated Go binding around an Ethereum contract, +// IMultiAssetHolderSession is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. -type ImultiAssetHolderSession struct { - Contract *ImultiAssetHolder // Generic contract binding to set the session for +type IMultiAssetHolderSession struct { + Contract *IMultiAssetHolder // Generic contract binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } -// ImultiAssetHolderCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// IMultiAssetHolderCallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. -type ImultiAssetHolderCallerSession struct { - Contract *ImultiAssetHolderCaller // Generic contract caller binding to set the session for +type IMultiAssetHolderCallerSession struct { + Contract *IMultiAssetHolderCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session } -// ImultiAssetHolderTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// IMultiAssetHolderTransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. -type ImultiAssetHolderTransactorSession struct { - Contract *ImultiAssetHolderTransactor // Generic contract transactor binding to set the session for +type IMultiAssetHolderTransactorSession struct { + Contract *IMultiAssetHolderTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } -// ImultiAssetHolderRaw is an auto generated low-level Go binding around an Ethereum contract. -type ImultiAssetHolderRaw struct { - Contract *ImultiAssetHolder // Generic contract binding to access the raw methods on +// IMultiAssetHolderRaw is an auto generated low-level Go binding around an Ethereum contract. +type IMultiAssetHolderRaw struct { + Contract *IMultiAssetHolder // Generic contract binding to access the raw methods on } -// ImultiAssetHolderCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ImultiAssetHolderCallerRaw struct { - Contract *ImultiAssetHolderCaller // Generic read-only contract binding to access the raw methods on +// IMultiAssetHolderCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IMultiAssetHolderCallerRaw struct { + Contract *IMultiAssetHolderCaller // Generic read-only contract binding to access the raw methods on } -// ImultiAssetHolderTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ImultiAssetHolderTransactorRaw struct { - Contract *ImultiAssetHolderTransactor // Generic write-only contract binding to access the raw methods on +// IMultiAssetHolderTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IMultiAssetHolderTransactorRaw struct { + Contract *IMultiAssetHolderTransactor // Generic write-only contract binding to access the raw methods on } -// NewImultiAssetHolder creates a new instance of ImultiAssetHolder, bound to a specific deployed contract. -func NewImultiAssetHolder(address common.Address, backend bind.ContractBackend) (*ImultiAssetHolder, error) { - contract, err := bindImultiAssetHolder(address, backend, backend, backend) +// NewIMultiAssetHolder creates a new instance of IMultiAssetHolder, bound to a specific deployed contract. +func NewIMultiAssetHolder(address common.Address, backend bind.ContractBackend) (*IMultiAssetHolder, error) { + contract, err := bindIMultiAssetHolder(address, backend, backend, backend) if err != nil { return nil, err } - return &ImultiAssetHolder{ImultiAssetHolderCaller: ImultiAssetHolderCaller{contract: contract}, ImultiAssetHolderTransactor: ImultiAssetHolderTransactor{contract: contract}, ImultiAssetHolderFilterer: ImultiAssetHolderFilterer{contract: contract}}, nil + return &IMultiAssetHolder{IMultiAssetHolderCaller: IMultiAssetHolderCaller{contract: contract}, IMultiAssetHolderTransactor: IMultiAssetHolderTransactor{contract: contract}, IMultiAssetHolderFilterer: IMultiAssetHolderFilterer{contract: contract}}, nil } -// NewImultiAssetHolderCaller creates a new read-only instance of ImultiAssetHolder, bound to a specific deployed contract. -func NewImultiAssetHolderCaller(address common.Address, caller bind.ContractCaller) (*ImultiAssetHolderCaller, error) { - contract, err := bindImultiAssetHolder(address, caller, nil, nil) +// NewIMultiAssetHolderCaller creates a new read-only instance of IMultiAssetHolder, bound to a specific deployed contract. +func NewIMultiAssetHolderCaller(address common.Address, caller bind.ContractCaller) (*IMultiAssetHolderCaller, error) { + contract, err := bindIMultiAssetHolder(address, caller, nil, nil) if err != nil { return nil, err } - return &ImultiAssetHolderCaller{contract: contract}, nil + return &IMultiAssetHolderCaller{contract: contract}, nil } -// NewImultiAssetHolderTransactor creates a new write-only instance of ImultiAssetHolder, bound to a specific deployed contract. -func NewImultiAssetHolderTransactor(address common.Address, transactor bind.ContractTransactor) (*ImultiAssetHolderTransactor, error) { - contract, err := bindImultiAssetHolder(address, nil, transactor, nil) +// NewIMultiAssetHolderTransactor creates a new write-only instance of IMultiAssetHolder, bound to a specific deployed contract. +func NewIMultiAssetHolderTransactor(address common.Address, transactor bind.ContractTransactor) (*IMultiAssetHolderTransactor, error) { + contract, err := bindIMultiAssetHolder(address, nil, transactor, nil) if err != nil { return nil, err } - return &ImultiAssetHolderTransactor{contract: contract}, nil + return &IMultiAssetHolderTransactor{contract: contract}, nil } -// NewImultiAssetHolderFilterer creates a new log filterer instance of ImultiAssetHolder, bound to a specific deployed contract. -func NewImultiAssetHolderFilterer(address common.Address, filterer bind.ContractFilterer) (*ImultiAssetHolderFilterer, error) { - contract, err := bindImultiAssetHolder(address, nil, nil, filterer) +// NewIMultiAssetHolderFilterer creates a new log filterer instance of IMultiAssetHolder, bound to a specific deployed contract. +func NewIMultiAssetHolderFilterer(address common.Address, filterer bind.ContractFilterer) (*IMultiAssetHolderFilterer, error) { + contract, err := bindIMultiAssetHolder(address, nil, nil, filterer) if err != nil { return nil, err } - return &ImultiAssetHolderFilterer{contract: contract}, nil + return &IMultiAssetHolderFilterer{contract: contract}, nil } -// bindImultiAssetHolder binds a generic wrapper to an already deployed contract. -func bindImultiAssetHolder(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ImultiAssetHolderABI)) +// bindIMultiAssetHolder binds a generic wrapper to an already deployed contract. +func bindIMultiAssetHolder(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(IMultiAssetHolderABI)) if err != nil { return nil, err } @@ -157,106 +157,106 @@ func bindImultiAssetHolder(address common.Address, caller bind.ContractCaller, t // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. -func (_ImultiAssetHolder *ImultiAssetHolderRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _ImultiAssetHolder.Contract.ImultiAssetHolderCaller.contract.Call(opts, result, method, params...) +func (_IMultiAssetHolder *IMultiAssetHolderRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IMultiAssetHolder.Contract.IMultiAssetHolderCaller.contract.Call(opts, result, method, params...) } // Transfer initiates a plain transaction to move funds to the contract, calling // its default method if one is available. -func (_ImultiAssetHolder *ImultiAssetHolderRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ImultiAssetHolder.Contract.ImultiAssetHolderTransactor.contract.Transfer(opts) +func (_IMultiAssetHolder *IMultiAssetHolderRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IMultiAssetHolder.Contract.IMultiAssetHolderTransactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. -func (_ImultiAssetHolder *ImultiAssetHolderRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ImultiAssetHolder.Contract.ImultiAssetHolderTransactor.contract.Transact(opts, method, params...) +func (_IMultiAssetHolder *IMultiAssetHolderRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IMultiAssetHolder.Contract.IMultiAssetHolderTransactor.contract.Transact(opts, method, params...) } // Call invokes the (constant) contract method with params as input values and // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. -func (_ImultiAssetHolder *ImultiAssetHolderCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _ImultiAssetHolder.Contract.contract.Call(opts, result, method, params...) +func (_IMultiAssetHolder *IMultiAssetHolderCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IMultiAssetHolder.Contract.contract.Call(opts, result, method, params...) } // Transfer initiates a plain transaction to move funds to the contract, calling // its default method if one is available. -func (_ImultiAssetHolder *ImultiAssetHolderTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ImultiAssetHolder.Contract.contract.Transfer(opts) +func (_IMultiAssetHolder *IMultiAssetHolderTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IMultiAssetHolder.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. -func (_ImultiAssetHolder *ImultiAssetHolderTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ImultiAssetHolder.Contract.contract.Transact(opts, method, params...) +func (_IMultiAssetHolder *IMultiAssetHolderTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IMultiAssetHolder.Contract.contract.Transact(opts, method, params...) } // Deposit is a paid mutator transaction binding the contract method 0x2fb1d270. // // Solidity: function deposit(address asset, bytes32 destination, uint256 expectedHeld, uint256 amount) payable returns() -func (_ImultiAssetHolder *ImultiAssetHolderTransactor) Deposit(opts *bind.TransactOpts, asset common.Address, destination [32]byte, expectedHeld *big.Int, amount *big.Int) (*types.Transaction, error) { - return _ImultiAssetHolder.contract.Transact(opts, "deposit", asset, destination, expectedHeld, amount) +func (_IMultiAssetHolder *IMultiAssetHolderTransactor) Deposit(opts *bind.TransactOpts, asset common.Address, destination [32]byte, expectedHeld *big.Int, amount *big.Int) (*types.Transaction, error) { + return _IMultiAssetHolder.contract.Transact(opts, "deposit", asset, destination, expectedHeld, amount) } // Deposit is a paid mutator transaction binding the contract method 0x2fb1d270. // // Solidity: function deposit(address asset, bytes32 destination, uint256 expectedHeld, uint256 amount) payable returns() -func (_ImultiAssetHolder *ImultiAssetHolderSession) Deposit(asset common.Address, destination [32]byte, expectedHeld *big.Int, amount *big.Int) (*types.Transaction, error) { - return _ImultiAssetHolder.Contract.Deposit(&_ImultiAssetHolder.TransactOpts, asset, destination, expectedHeld, amount) +func (_IMultiAssetHolder *IMultiAssetHolderSession) Deposit(asset common.Address, destination [32]byte, expectedHeld *big.Int, amount *big.Int) (*types.Transaction, error) { + return _IMultiAssetHolder.Contract.Deposit(&_IMultiAssetHolder.TransactOpts, asset, destination, expectedHeld, amount) } // Deposit is a paid mutator transaction binding the contract method 0x2fb1d270. // // Solidity: function deposit(address asset, bytes32 destination, uint256 expectedHeld, uint256 amount) payable returns() -func (_ImultiAssetHolder *ImultiAssetHolderTransactorSession) Deposit(asset common.Address, destination [32]byte, expectedHeld *big.Int, amount *big.Int) (*types.Transaction, error) { - return _ImultiAssetHolder.Contract.Deposit(&_ImultiAssetHolder.TransactOpts, asset, destination, expectedHeld, amount) +func (_IMultiAssetHolder *IMultiAssetHolderTransactorSession) Deposit(asset common.Address, destination [32]byte, expectedHeld *big.Int, amount *big.Int) (*types.Transaction, error) { + return _IMultiAssetHolder.Contract.Deposit(&_IMultiAssetHolder.TransactOpts, asset, destination, expectedHeld, amount) } // Reclaim is a paid mutator transaction binding the contract method 0xd3c4e738. // // Solidity: function reclaim((bytes32,bytes32,bytes,uint256,uint256,bytes32,bytes,uint256) reclaimArgs) returns() -func (_ImultiAssetHolder *ImultiAssetHolderTransactor) Reclaim(opts *bind.TransactOpts, reclaimArgs IMultiAssetHolderReclaimArgs) (*types.Transaction, error) { - return _ImultiAssetHolder.contract.Transact(opts, "reclaim", reclaimArgs) +func (_IMultiAssetHolder *IMultiAssetHolderTransactor) Reclaim(opts *bind.TransactOpts, reclaimArgs IMultiAssetHolderReclaimArgs) (*types.Transaction, error) { + return _IMultiAssetHolder.contract.Transact(opts, "reclaim", reclaimArgs) } // Reclaim is a paid mutator transaction binding the contract method 0xd3c4e738. // // Solidity: function reclaim((bytes32,bytes32,bytes,uint256,uint256,bytes32,bytes,uint256) reclaimArgs) returns() -func (_ImultiAssetHolder *ImultiAssetHolderSession) Reclaim(reclaimArgs IMultiAssetHolderReclaimArgs) (*types.Transaction, error) { - return _ImultiAssetHolder.Contract.Reclaim(&_ImultiAssetHolder.TransactOpts, reclaimArgs) +func (_IMultiAssetHolder *IMultiAssetHolderSession) Reclaim(reclaimArgs IMultiAssetHolderReclaimArgs) (*types.Transaction, error) { + return _IMultiAssetHolder.Contract.Reclaim(&_IMultiAssetHolder.TransactOpts, reclaimArgs) } // Reclaim is a paid mutator transaction binding the contract method 0xd3c4e738. // // Solidity: function reclaim((bytes32,bytes32,bytes,uint256,uint256,bytes32,bytes,uint256) reclaimArgs) returns() -func (_ImultiAssetHolder *ImultiAssetHolderTransactorSession) Reclaim(reclaimArgs IMultiAssetHolderReclaimArgs) (*types.Transaction, error) { - return _ImultiAssetHolder.Contract.Reclaim(&_ImultiAssetHolder.TransactOpts, reclaimArgs) +func (_IMultiAssetHolder *IMultiAssetHolderTransactorSession) Reclaim(reclaimArgs IMultiAssetHolderReclaimArgs) (*types.Transaction, error) { + return _IMultiAssetHolder.Contract.Reclaim(&_IMultiAssetHolder.TransactOpts, reclaimArgs) } // Transfer is a paid mutator transaction binding the contract method 0x3033730e. // // Solidity: function transfer(uint256 assetIndex, bytes32 fromChannelId, bytes outcomeBytes, bytes32 stateHash, uint256[] indices) returns() -func (_ImultiAssetHolder *ImultiAssetHolderTransactor) Transfer(opts *bind.TransactOpts, assetIndex *big.Int, fromChannelId [32]byte, outcomeBytes []byte, stateHash [32]byte, indices []*big.Int) (*types.Transaction, error) { - return _ImultiAssetHolder.contract.Transact(opts, "transfer", assetIndex, fromChannelId, outcomeBytes, stateHash, indices) +func (_IMultiAssetHolder *IMultiAssetHolderTransactor) Transfer(opts *bind.TransactOpts, assetIndex *big.Int, fromChannelId [32]byte, outcomeBytes []byte, stateHash [32]byte, indices []*big.Int) (*types.Transaction, error) { + return _IMultiAssetHolder.contract.Transact(opts, "transfer", assetIndex, fromChannelId, outcomeBytes, stateHash, indices) } // Transfer is a paid mutator transaction binding the contract method 0x3033730e. // // Solidity: function transfer(uint256 assetIndex, bytes32 fromChannelId, bytes outcomeBytes, bytes32 stateHash, uint256[] indices) returns() -func (_ImultiAssetHolder *ImultiAssetHolderSession) Transfer(assetIndex *big.Int, fromChannelId [32]byte, outcomeBytes []byte, stateHash [32]byte, indices []*big.Int) (*types.Transaction, error) { - return _ImultiAssetHolder.Contract.Transfer(&_ImultiAssetHolder.TransactOpts, assetIndex, fromChannelId, outcomeBytes, stateHash, indices) +func (_IMultiAssetHolder *IMultiAssetHolderSession) Transfer(assetIndex *big.Int, fromChannelId [32]byte, outcomeBytes []byte, stateHash [32]byte, indices []*big.Int) (*types.Transaction, error) { + return _IMultiAssetHolder.Contract.Transfer(&_IMultiAssetHolder.TransactOpts, assetIndex, fromChannelId, outcomeBytes, stateHash, indices) } // Transfer is a paid mutator transaction binding the contract method 0x3033730e. // // Solidity: function transfer(uint256 assetIndex, bytes32 fromChannelId, bytes outcomeBytes, bytes32 stateHash, uint256[] indices) returns() -func (_ImultiAssetHolder *ImultiAssetHolderTransactorSession) Transfer(assetIndex *big.Int, fromChannelId [32]byte, outcomeBytes []byte, stateHash [32]byte, indices []*big.Int) (*types.Transaction, error) { - return _ImultiAssetHolder.Contract.Transfer(&_ImultiAssetHolder.TransactOpts, assetIndex, fromChannelId, outcomeBytes, stateHash, indices) +func (_IMultiAssetHolder *IMultiAssetHolderTransactorSession) Transfer(assetIndex *big.Int, fromChannelId [32]byte, outcomeBytes []byte, stateHash [32]byte, indices []*big.Int) (*types.Transaction, error) { + return _IMultiAssetHolder.Contract.Transfer(&_IMultiAssetHolder.TransactOpts, assetIndex, fromChannelId, outcomeBytes, stateHash, indices) } -// ImultiAssetHolderAllocationUpdatedIterator is returned from FilterAllocationUpdated and is used to iterate over the raw logs and unpacked data for AllocationUpdated events raised by the ImultiAssetHolder contract. -type ImultiAssetHolderAllocationUpdatedIterator struct { - Event *ImultiAssetHolderAllocationUpdated // Event containing the contract specifics and raw log +// IMultiAssetHolderAllocationUpdatedIterator is returned from FilterAllocationUpdated and is used to iterate over the raw logs and unpacked data for AllocationUpdated events raised by the IMultiAssetHolder contract. +type IMultiAssetHolderAllocationUpdatedIterator struct { + Event *IMultiAssetHolderAllocationUpdated // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -270,7 +270,7 @@ type ImultiAssetHolderAllocationUpdatedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *ImultiAssetHolderAllocationUpdatedIterator) Next() bool { +func (it *IMultiAssetHolderAllocationUpdatedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -279,7 +279,7 @@ func (it *ImultiAssetHolderAllocationUpdatedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ImultiAssetHolderAllocationUpdated) + it.Event = new(IMultiAssetHolderAllocationUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -294,7 +294,7 @@ func (it *ImultiAssetHolderAllocationUpdatedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(ImultiAssetHolderAllocationUpdated) + it.Event = new(IMultiAssetHolderAllocationUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -310,19 +310,19 @@ func (it *ImultiAssetHolderAllocationUpdatedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *ImultiAssetHolderAllocationUpdatedIterator) Error() error { +func (it *IMultiAssetHolderAllocationUpdatedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *ImultiAssetHolderAllocationUpdatedIterator) Close() error { +func (it *IMultiAssetHolderAllocationUpdatedIterator) Close() error { it.sub.Unsubscribe() return nil } -// ImultiAssetHolderAllocationUpdated represents a AllocationUpdated event raised by the ImultiAssetHolder contract. -type ImultiAssetHolderAllocationUpdated struct { +// IMultiAssetHolderAllocationUpdated represents a AllocationUpdated event raised by the IMultiAssetHolder contract. +type IMultiAssetHolderAllocationUpdated struct { ChannelId [32]byte AssetIndex *big.Int InitialHoldings *big.Int @@ -333,31 +333,31 @@ type ImultiAssetHolderAllocationUpdated struct { // FilterAllocationUpdated is a free log retrieval operation binding the contract event 0xc36da2054c5669d6dac211b7366d59f2d369151c21edf4940468614b449e0b9a. // // Solidity: event AllocationUpdated(bytes32 indexed channelId, uint256 assetIndex, uint256 initialHoldings, uint256 finalHoldings) -func (_ImultiAssetHolder *ImultiAssetHolderFilterer) FilterAllocationUpdated(opts *bind.FilterOpts, channelId [][32]byte) (*ImultiAssetHolderAllocationUpdatedIterator, error) { +func (_IMultiAssetHolder *IMultiAssetHolderFilterer) FilterAllocationUpdated(opts *bind.FilterOpts, channelId [][32]byte) (*IMultiAssetHolderAllocationUpdatedIterator, error) { var channelIdRule []interface{} for _, channelIdItem := range channelId { channelIdRule = append(channelIdRule, channelIdItem) } - logs, sub, err := _ImultiAssetHolder.contract.FilterLogs(opts, "AllocationUpdated", channelIdRule) + logs, sub, err := _IMultiAssetHolder.contract.FilterLogs(opts, "AllocationUpdated", channelIdRule) if err != nil { return nil, err } - return &ImultiAssetHolderAllocationUpdatedIterator{contract: _ImultiAssetHolder.contract, event: "AllocationUpdated", logs: logs, sub: sub}, nil + return &IMultiAssetHolderAllocationUpdatedIterator{contract: _IMultiAssetHolder.contract, event: "AllocationUpdated", logs: logs, sub: sub}, nil } // WatchAllocationUpdated is a free log subscription operation binding the contract event 0xc36da2054c5669d6dac211b7366d59f2d369151c21edf4940468614b449e0b9a. // // Solidity: event AllocationUpdated(bytes32 indexed channelId, uint256 assetIndex, uint256 initialHoldings, uint256 finalHoldings) -func (_ImultiAssetHolder *ImultiAssetHolderFilterer) WatchAllocationUpdated(opts *bind.WatchOpts, sink chan<- *ImultiAssetHolderAllocationUpdated, channelId [][32]byte) (event.Subscription, error) { +func (_IMultiAssetHolder *IMultiAssetHolderFilterer) WatchAllocationUpdated(opts *bind.WatchOpts, sink chan<- *IMultiAssetHolderAllocationUpdated, channelId [][32]byte) (event.Subscription, error) { var channelIdRule []interface{} for _, channelIdItem := range channelId { channelIdRule = append(channelIdRule, channelIdItem) } - logs, sub, err := _ImultiAssetHolder.contract.WatchLogs(opts, "AllocationUpdated", channelIdRule) + logs, sub, err := _IMultiAssetHolder.contract.WatchLogs(opts, "AllocationUpdated", channelIdRule) if err != nil { return nil, err } @@ -367,8 +367,8 @@ func (_ImultiAssetHolder *ImultiAssetHolderFilterer) WatchAllocationUpdated(opts select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(ImultiAssetHolderAllocationUpdated) - if err := _ImultiAssetHolder.contract.UnpackLog(event, "AllocationUpdated", log); err != nil { + event := new(IMultiAssetHolderAllocationUpdated) + if err := _IMultiAssetHolder.contract.UnpackLog(event, "AllocationUpdated", log); err != nil { return err } event.Raw = log @@ -392,18 +392,18 @@ func (_ImultiAssetHolder *ImultiAssetHolderFilterer) WatchAllocationUpdated(opts // ParseAllocationUpdated is a log parse operation binding the contract event 0xc36da2054c5669d6dac211b7366d59f2d369151c21edf4940468614b449e0b9a. // // Solidity: event AllocationUpdated(bytes32 indexed channelId, uint256 assetIndex, uint256 initialHoldings, uint256 finalHoldings) -func (_ImultiAssetHolder *ImultiAssetHolderFilterer) ParseAllocationUpdated(log types.Log) (*ImultiAssetHolderAllocationUpdated, error) { - event := new(ImultiAssetHolderAllocationUpdated) - if err := _ImultiAssetHolder.contract.UnpackLog(event, "AllocationUpdated", log); err != nil { +func (_IMultiAssetHolder *IMultiAssetHolderFilterer) ParseAllocationUpdated(log types.Log) (*IMultiAssetHolderAllocationUpdated, error) { + event := new(IMultiAssetHolderAllocationUpdated) + if err := _IMultiAssetHolder.contract.UnpackLog(event, "AllocationUpdated", log); err != nil { return nil, err } event.Raw = log return event, nil } -// ImultiAssetHolderDepositedIterator is returned from FilterDeposited and is used to iterate over the raw logs and unpacked data for Deposited events raised by the ImultiAssetHolder contract. -type ImultiAssetHolderDepositedIterator struct { - Event *ImultiAssetHolderDeposited // Event containing the contract specifics and raw log +// IMultiAssetHolderDepositedIterator is returned from FilterDeposited and is used to iterate over the raw logs and unpacked data for Deposited events raised by the IMultiAssetHolder contract. +type IMultiAssetHolderDepositedIterator struct { + Event *IMultiAssetHolderDeposited // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -417,7 +417,7 @@ type ImultiAssetHolderDepositedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *ImultiAssetHolderDepositedIterator) Next() bool { +func (it *IMultiAssetHolderDepositedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -426,7 +426,7 @@ func (it *ImultiAssetHolderDepositedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ImultiAssetHolderDeposited) + it.Event = new(IMultiAssetHolderDeposited) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -441,7 +441,7 @@ func (it *ImultiAssetHolderDepositedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(ImultiAssetHolderDeposited) + it.Event = new(IMultiAssetHolderDeposited) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -457,19 +457,19 @@ func (it *ImultiAssetHolderDepositedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *ImultiAssetHolderDepositedIterator) Error() error { +func (it *IMultiAssetHolderDepositedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *ImultiAssetHolderDepositedIterator) Close() error { +func (it *IMultiAssetHolderDepositedIterator) Close() error { it.sub.Unsubscribe() return nil } -// ImultiAssetHolderDeposited represents a Deposited event raised by the ImultiAssetHolder contract. -type ImultiAssetHolderDeposited struct { +// IMultiAssetHolderDeposited represents a Deposited event raised by the IMultiAssetHolder contract. +type IMultiAssetHolderDeposited struct { Destination [32]byte Asset common.Address DestinationHoldings *big.Int @@ -479,31 +479,31 @@ type ImultiAssetHolderDeposited struct { // FilterDeposited is a free log retrieval operation binding the contract event 0x87d4c0b5e30d6808bc8a94ba1c4d839b29d664151551a31753387ee9ef48429b. // // Solidity: event Deposited(bytes32 indexed destination, address asset, uint256 destinationHoldings) -func (_ImultiAssetHolder *ImultiAssetHolderFilterer) FilterDeposited(opts *bind.FilterOpts, destination [][32]byte) (*ImultiAssetHolderDepositedIterator, error) { +func (_IMultiAssetHolder *IMultiAssetHolderFilterer) FilterDeposited(opts *bind.FilterOpts, destination [][32]byte) (*IMultiAssetHolderDepositedIterator, error) { var destinationRule []interface{} for _, destinationItem := range destination { destinationRule = append(destinationRule, destinationItem) } - logs, sub, err := _ImultiAssetHolder.contract.FilterLogs(opts, "Deposited", destinationRule) + logs, sub, err := _IMultiAssetHolder.contract.FilterLogs(opts, "Deposited", destinationRule) if err != nil { return nil, err } - return &ImultiAssetHolderDepositedIterator{contract: _ImultiAssetHolder.contract, event: "Deposited", logs: logs, sub: sub}, nil + return &IMultiAssetHolderDepositedIterator{contract: _IMultiAssetHolder.contract, event: "Deposited", logs: logs, sub: sub}, nil } // WatchDeposited is a free log subscription operation binding the contract event 0x87d4c0b5e30d6808bc8a94ba1c4d839b29d664151551a31753387ee9ef48429b. // // Solidity: event Deposited(bytes32 indexed destination, address asset, uint256 destinationHoldings) -func (_ImultiAssetHolder *ImultiAssetHolderFilterer) WatchDeposited(opts *bind.WatchOpts, sink chan<- *ImultiAssetHolderDeposited, destination [][32]byte) (event.Subscription, error) { +func (_IMultiAssetHolder *IMultiAssetHolderFilterer) WatchDeposited(opts *bind.WatchOpts, sink chan<- *IMultiAssetHolderDeposited, destination [][32]byte) (event.Subscription, error) { var destinationRule []interface{} for _, destinationItem := range destination { destinationRule = append(destinationRule, destinationItem) } - logs, sub, err := _ImultiAssetHolder.contract.WatchLogs(opts, "Deposited", destinationRule) + logs, sub, err := _IMultiAssetHolder.contract.WatchLogs(opts, "Deposited", destinationRule) if err != nil { return nil, err } @@ -513,8 +513,8 @@ func (_ImultiAssetHolder *ImultiAssetHolderFilterer) WatchDeposited(opts *bind.W select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(ImultiAssetHolderDeposited) - if err := _ImultiAssetHolder.contract.UnpackLog(event, "Deposited", log); err != nil { + event := new(IMultiAssetHolderDeposited) + if err := _IMultiAssetHolder.contract.UnpackLog(event, "Deposited", log); err != nil { return err } event.Raw = log @@ -538,18 +538,18 @@ func (_ImultiAssetHolder *ImultiAssetHolderFilterer) WatchDeposited(opts *bind.W // ParseDeposited is a log parse operation binding the contract event 0x87d4c0b5e30d6808bc8a94ba1c4d839b29d664151551a31753387ee9ef48429b. // // Solidity: event Deposited(bytes32 indexed destination, address asset, uint256 destinationHoldings) -func (_ImultiAssetHolder *ImultiAssetHolderFilterer) ParseDeposited(log types.Log) (*ImultiAssetHolderDeposited, error) { - event := new(ImultiAssetHolderDeposited) - if err := _ImultiAssetHolder.contract.UnpackLog(event, "Deposited", log); err != nil { +func (_IMultiAssetHolder *IMultiAssetHolderFilterer) ParseDeposited(log types.Log) (*IMultiAssetHolderDeposited, error) { + event := new(IMultiAssetHolderDeposited) + if err := _IMultiAssetHolder.contract.UnpackLog(event, "Deposited", log); err != nil { return nil, err } event.Raw = log return event, nil } -// ImultiAssetHolderReclaimedIterator is returned from FilterReclaimed and is used to iterate over the raw logs and unpacked data for Reclaimed events raised by the ImultiAssetHolder contract. -type ImultiAssetHolderReclaimedIterator struct { - Event *ImultiAssetHolderReclaimed // Event containing the contract specifics and raw log +// IMultiAssetHolderReclaimedIterator is returned from FilterReclaimed and is used to iterate over the raw logs and unpacked data for Reclaimed events raised by the IMultiAssetHolder contract. +type IMultiAssetHolderReclaimedIterator struct { + Event *IMultiAssetHolderReclaimed // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -563,7 +563,7 @@ type ImultiAssetHolderReclaimedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *ImultiAssetHolderReclaimedIterator) Next() bool { +func (it *IMultiAssetHolderReclaimedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -572,7 +572,7 @@ func (it *ImultiAssetHolderReclaimedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ImultiAssetHolderReclaimed) + it.Event = new(IMultiAssetHolderReclaimed) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -587,7 +587,7 @@ func (it *ImultiAssetHolderReclaimedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(ImultiAssetHolderReclaimed) + it.Event = new(IMultiAssetHolderReclaimed) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -603,19 +603,19 @@ func (it *ImultiAssetHolderReclaimedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *ImultiAssetHolderReclaimedIterator) Error() error { +func (it *IMultiAssetHolderReclaimedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *ImultiAssetHolderReclaimedIterator) Close() error { +func (it *IMultiAssetHolderReclaimedIterator) Close() error { it.sub.Unsubscribe() return nil } -// ImultiAssetHolderReclaimed represents a Reclaimed event raised by the ImultiAssetHolder contract. -type ImultiAssetHolderReclaimed struct { +// IMultiAssetHolderReclaimed represents a Reclaimed event raised by the IMultiAssetHolder contract. +type IMultiAssetHolderReclaimed struct { ChannelId [32]byte AssetIndex *big.Int Raw types.Log // Blockchain specific contextual infos @@ -624,31 +624,31 @@ type ImultiAssetHolderReclaimed struct { // FilterReclaimed is a free log retrieval operation binding the contract event 0x4d3754632451ebba9812a9305e7bca17b67a17186a5cff93d2e9ae1b01e3d27b. // // Solidity: event Reclaimed(bytes32 indexed channelId, uint256 assetIndex) -func (_ImultiAssetHolder *ImultiAssetHolderFilterer) FilterReclaimed(opts *bind.FilterOpts, channelId [][32]byte) (*ImultiAssetHolderReclaimedIterator, error) { +func (_IMultiAssetHolder *IMultiAssetHolderFilterer) FilterReclaimed(opts *bind.FilterOpts, channelId [][32]byte) (*IMultiAssetHolderReclaimedIterator, error) { var channelIdRule []interface{} for _, channelIdItem := range channelId { channelIdRule = append(channelIdRule, channelIdItem) } - logs, sub, err := _ImultiAssetHolder.contract.FilterLogs(opts, "Reclaimed", channelIdRule) + logs, sub, err := _IMultiAssetHolder.contract.FilterLogs(opts, "Reclaimed", channelIdRule) if err != nil { return nil, err } - return &ImultiAssetHolderReclaimedIterator{contract: _ImultiAssetHolder.contract, event: "Reclaimed", logs: logs, sub: sub}, nil + return &IMultiAssetHolderReclaimedIterator{contract: _IMultiAssetHolder.contract, event: "Reclaimed", logs: logs, sub: sub}, nil } // WatchReclaimed is a free log subscription operation binding the contract event 0x4d3754632451ebba9812a9305e7bca17b67a17186a5cff93d2e9ae1b01e3d27b. // // Solidity: event Reclaimed(bytes32 indexed channelId, uint256 assetIndex) -func (_ImultiAssetHolder *ImultiAssetHolderFilterer) WatchReclaimed(opts *bind.WatchOpts, sink chan<- *ImultiAssetHolderReclaimed, channelId [][32]byte) (event.Subscription, error) { +func (_IMultiAssetHolder *IMultiAssetHolderFilterer) WatchReclaimed(opts *bind.WatchOpts, sink chan<- *IMultiAssetHolderReclaimed, channelId [][32]byte) (event.Subscription, error) { var channelIdRule []interface{} for _, channelIdItem := range channelId { channelIdRule = append(channelIdRule, channelIdItem) } - logs, sub, err := _ImultiAssetHolder.contract.WatchLogs(opts, "Reclaimed", channelIdRule) + logs, sub, err := _IMultiAssetHolder.contract.WatchLogs(opts, "Reclaimed", channelIdRule) if err != nil { return nil, err } @@ -658,8 +658,8 @@ func (_ImultiAssetHolder *ImultiAssetHolderFilterer) WatchReclaimed(opts *bind.W select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(ImultiAssetHolderReclaimed) - if err := _ImultiAssetHolder.contract.UnpackLog(event, "Reclaimed", log); err != nil { + event := new(IMultiAssetHolderReclaimed) + if err := _IMultiAssetHolder.contract.UnpackLog(event, "Reclaimed", log); err != nil { return err } event.Raw = log @@ -683,9 +683,9 @@ func (_ImultiAssetHolder *ImultiAssetHolderFilterer) WatchReclaimed(opts *bind.W // ParseReclaimed is a log parse operation binding the contract event 0x4d3754632451ebba9812a9305e7bca17b67a17186a5cff93d2e9ae1b01e3d27b. // // Solidity: event Reclaimed(bytes32 indexed channelId, uint256 assetIndex) -func (_ImultiAssetHolder *ImultiAssetHolderFilterer) ParseReclaimed(log types.Log) (*ImultiAssetHolderReclaimed, error) { - event := new(ImultiAssetHolderReclaimed) - if err := _ImultiAssetHolder.contract.UnpackLog(event, "Reclaimed", log); err != nil { +func (_IMultiAssetHolder *IMultiAssetHolderFilterer) ParseReclaimed(log types.Log) (*IMultiAssetHolderReclaimed, error) { + event := new(IMultiAssetHolderReclaimed) + if err := _IMultiAssetHolder.contract.UnpackLog(event, "Reclaimed", log); err != nil { return nil, err } event.Raw = log