diff --git a/BPSucker.go b/BPSucker.go deleted file mode 100644 index 1e5c186..0000000 --- a/BPSucker.go +++ /dev/null @@ -1,1465 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package main - -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 -) - -// BPClaim is an auto generated low-level Go binding around an user-defined struct. -type BPClaim struct { - Token common.Address - Leaf BPLeaf - Proof [32][32]byte -} - -// BPInboxTreeRoot is an auto generated low-level Go binding around an user-defined struct. -type BPInboxTreeRoot struct { - Nonce uint64 - Root [32]byte -} - -// BPLeaf is an auto generated low-level Go binding around an user-defined struct. -type BPLeaf struct { - Index *big.Int - Beneficiary common.Address - ProjectTokenAmount *big.Int - TerminalTokenAmount *big.Int -} - -// BPMessageRoot is an auto generated low-level Go binding around an user-defined struct. -type BPMessageRoot struct { - Token common.Address - Amount *big.Int - RemoteRoot BPInboxTreeRoot -} - -// BPTokenMapping is an auto generated low-level Go binding around an user-defined struct. -type BPTokenMapping struct { - LocalToken common.Address - MinGas uint32 - RemoteToken common.Address - MinBridgeAmount *big.Int -} - -// MerkleLibTree is an auto generated low-level Go binding around an user-defined struct. -type MerkleLibTree struct { - Branch [32][32]byte - Count *big.Int -} - -// BPSuckerMetaData contains all meta data concerning the BPSucker contract. -var BPSuckerMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"ADD_TO_BALANCE_MODE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumBPAddToBalanceMode\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"DEPLOYER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"DIRECTORY\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIJBDirectory\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PEER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PERMISSIONS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIJBPermissions\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PROJECT_ID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"TOKENS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIJBTokens\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"addOutstandingAmountToBalance\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"amountToAddToBalance\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"claim\",\"inputs\":[{\"name\":\"claimData\",\"type\":\"tuple\",\"internalType\":\"structBPClaim\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"leaf\",\"type\":\"tuple\",\"internalType\":\"structBPLeaf\",\"components\":[{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"beneficiary\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"projectTokenAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"terminalTokenAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"proof\",\"type\":\"bytes32[32]\",\"internalType\":\"bytes32[32]\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"claim\",\"inputs\":[{\"name\":\"claims\",\"type\":\"tuple[]\",\"internalType\":\"structBPClaim[]\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"leaf\",\"type\":\"tuple\",\"internalType\":\"structBPLeaf\",\"components\":[{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"beneficiary\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"projectTokenAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"terminalTokenAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"proof\",\"type\":\"bytes32[32]\",\"internalType\":\"bytes32[32]\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"fromRemote\",\"inputs\":[{\"name\":\"root\",\"type\":\"tuple\",\"internalType\":\"structBPMessageRoot\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"remoteRoot\",\"type\":\"tuple\",\"internalType\":\"structBPInboxTreeRoot\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}]}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"inbox\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"nonce\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isMapped\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"mapToken\",\"inputs\":[{\"name\":\"map\",\"type\":\"tuple\",\"internalType\":\"structBPTokenMapping\",\"components\":[{\"name\":\"localToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"minGas\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"remoteToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"minBridgeAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"mapTokens\",\"inputs\":[{\"name\":\"maps\",\"type\":\"tuple[]\",\"internalType\":\"structBPTokenMapping[]\",\"components\":[{\"name\":\"localToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"minGas\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"remoteToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"minBridgeAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"outbox\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"nonce\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"balance\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"tree\",\"type\":\"tuple\",\"internalType\":\"structMerkleLib.Tree\",\"components\":[{\"name\":\"branch\",\"type\":\"bytes32[32]\",\"internalType\":\"bytes32[32]\"},{\"name\":\"count\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"peerChainID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"prepare\",\"inputs\":[{\"name\":\"projectTokenAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"beneficiary\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"minTokensReclaimed\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"remoteTokenFor\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"minGas\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"minBridgeAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"toRemote\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"event\",\"name\":\"Claimed\",\"inputs\":[{\"name\":\"beneficiary\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"projectTokenAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"terminalTokenAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"index\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"autoAddedToBalance\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"InsertToOutboxTree\",\"inputs\":[{\"name\":\"beneficiary\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"terminalToken\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"hashed\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"index\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"root\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"projectTokenAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"terminalTokenAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"NewInboxTreeRoot\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"root\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RootToRemote\",\"inputs\":[{\"name\":\"root\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"terminalToken\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"index\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"nonce\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AddressEmptyCode\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"AddressInsufficientBalance\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"BELOW_MIN_GAS\",\"inputs\":[{\"name\":\"minGas\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"suppliedGas\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"BENEFICIARY_NOT_ALLOWED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ERC20_TOKEN_REQUIRED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FailedInnerCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"INSUFFICIENT_BALANCE\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"INVALID_NATIVE_REMOTE_ADDRESS\",\"inputs\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"INVALID_PROOF\",\"inputs\":[{\"name\":\"expectedRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"proofRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"LEAF_ALREADY_EXECUTED\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"MANUAL_NOT_ALLOWED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"MerkleLib__insert_treeIsFull\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NOT_PEER\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NO_TERMINAL_FOR\",\"inputs\":[{\"name\":\"projectId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"QUEUE_INSUFFECIENT_SIZE\",\"inputs\":[{\"name\":\"minSize\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"currentSize\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"SafeERC20FailedOperation\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"TOKEN_NOT_MAPPED\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"UNAUTHORIZED\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UNEXPECTED_MSG_VALUE\",\"inputs\":[]}]", -} - -// BPSuckerABI is the input ABI used to generate the binding from. -// Deprecated: Use BPSuckerMetaData.ABI instead. -var BPSuckerABI = BPSuckerMetaData.ABI - -// BPSucker is an auto generated Go binding around an Ethereum contract. -type BPSucker struct { - BPSuckerCaller // Read-only binding to the contract - BPSuckerTransactor // Write-only binding to the contract - BPSuckerFilterer // Log filterer for contract events -} - -// BPSuckerCaller is an auto generated read-only Go binding around an Ethereum contract. -type BPSuckerCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// BPSuckerTransactor is an auto generated write-only Go binding around an Ethereum contract. -type BPSuckerTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// BPSuckerFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type BPSuckerFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// BPSuckerSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type BPSuckerSession struct { - Contract *BPSucker // 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 -} - -// BPSuckerCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type BPSuckerCallerSession struct { - Contract *BPSuckerCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// BPSuckerTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type BPSuckerTransactorSession struct { - Contract *BPSuckerTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// BPSuckerRaw is an auto generated low-level Go binding around an Ethereum contract. -type BPSuckerRaw struct { - Contract *BPSucker // Generic contract binding to access the raw methods on -} - -// BPSuckerCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type BPSuckerCallerRaw struct { - Contract *BPSuckerCaller // Generic read-only contract binding to access the raw methods on -} - -// BPSuckerTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type BPSuckerTransactorRaw struct { - Contract *BPSuckerTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewBPSucker creates a new instance of BPSucker, bound to a specific deployed contract. -func NewBPSucker(address common.Address, backend bind.ContractBackend) (*BPSucker, error) { - contract, err := bindBPSucker(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &BPSucker{BPSuckerCaller: BPSuckerCaller{contract: contract}, BPSuckerTransactor: BPSuckerTransactor{contract: contract}, BPSuckerFilterer: BPSuckerFilterer{contract: contract}}, nil -} - -// NewBPSuckerCaller creates a new read-only instance of BPSucker, bound to a specific deployed contract. -func NewBPSuckerCaller(address common.Address, caller bind.ContractCaller) (*BPSuckerCaller, error) { - contract, err := bindBPSucker(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &BPSuckerCaller{contract: contract}, nil -} - -// NewBPSuckerTransactor creates a new write-only instance of BPSucker, bound to a specific deployed contract. -func NewBPSuckerTransactor(address common.Address, transactor bind.ContractTransactor) (*BPSuckerTransactor, error) { - contract, err := bindBPSucker(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &BPSuckerTransactor{contract: contract}, nil -} - -// NewBPSuckerFilterer creates a new log filterer instance of BPSucker, bound to a specific deployed contract. -func NewBPSuckerFilterer(address common.Address, filterer bind.ContractFilterer) (*BPSuckerFilterer, error) { - contract, err := bindBPSucker(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &BPSuckerFilterer{contract: contract}, nil -} - -// bindBPSucker binds a generic wrapper to an already deployed contract. -func bindBPSucker(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := BPSuckerMetaData.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 (_BPSucker *BPSuckerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _BPSucker.Contract.BPSuckerCaller.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 (_BPSucker *BPSuckerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _BPSucker.Contract.BPSuckerTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_BPSucker *BPSuckerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _BPSucker.Contract.BPSuckerTransactor.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 (_BPSucker *BPSuckerCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _BPSucker.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 (_BPSucker *BPSuckerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _BPSucker.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_BPSucker *BPSuckerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _BPSucker.Contract.contract.Transact(opts, method, params...) -} - -// ADDTOBALANCEMODE is a free data retrieval call binding the contract method 0xc6525f2c. -// -// Solidity: function ADD_TO_BALANCE_MODE() view returns(uint8) -func (_BPSucker *BPSuckerCaller) ADDTOBALANCEMODE(opts *bind.CallOpts) (uint8, error) { - var out []interface{} - err := _BPSucker.contract.Call(opts, &out, "ADD_TO_BALANCE_MODE") - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -// ADDTOBALANCEMODE is a free data retrieval call binding the contract method 0xc6525f2c. -// -// Solidity: function ADD_TO_BALANCE_MODE() view returns(uint8) -func (_BPSucker *BPSuckerSession) ADDTOBALANCEMODE() (uint8, error) { - return _BPSucker.Contract.ADDTOBALANCEMODE(&_BPSucker.CallOpts) -} - -// ADDTOBALANCEMODE is a free data retrieval call binding the contract method 0xc6525f2c. -// -// Solidity: function ADD_TO_BALANCE_MODE() view returns(uint8) -func (_BPSucker *BPSuckerCallerSession) ADDTOBALANCEMODE() (uint8, error) { - return _BPSucker.Contract.ADDTOBALANCEMODE(&_BPSucker.CallOpts) -} - -// DEPLOYER is a free data retrieval call binding the contract method 0xc1b8411a. -// -// Solidity: function DEPLOYER() view returns(address) -func (_BPSucker *BPSuckerCaller) DEPLOYER(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _BPSucker.contract.Call(opts, &out, "DEPLOYER") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// DEPLOYER is a free data retrieval call binding the contract method 0xc1b8411a. -// -// Solidity: function DEPLOYER() view returns(address) -func (_BPSucker *BPSuckerSession) DEPLOYER() (common.Address, error) { - return _BPSucker.Contract.DEPLOYER(&_BPSucker.CallOpts) -} - -// DEPLOYER is a free data retrieval call binding the contract method 0xc1b8411a. -// -// Solidity: function DEPLOYER() view returns(address) -func (_BPSucker *BPSuckerCallerSession) DEPLOYER() (common.Address, error) { - return _BPSucker.Contract.DEPLOYER(&_BPSucker.CallOpts) -} - -// DIRECTORY is a free data retrieval call binding the contract method 0x88bc2ef3. -// -// Solidity: function DIRECTORY() view returns(address) -func (_BPSucker *BPSuckerCaller) DIRECTORY(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _BPSucker.contract.Call(opts, &out, "DIRECTORY") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// DIRECTORY is a free data retrieval call binding the contract method 0x88bc2ef3. -// -// Solidity: function DIRECTORY() view returns(address) -func (_BPSucker *BPSuckerSession) DIRECTORY() (common.Address, error) { - return _BPSucker.Contract.DIRECTORY(&_BPSucker.CallOpts) -} - -// DIRECTORY is a free data retrieval call binding the contract method 0x88bc2ef3. -// -// Solidity: function DIRECTORY() view returns(address) -func (_BPSucker *BPSuckerCallerSession) DIRECTORY() (common.Address, error) { - return _BPSucker.Contract.DIRECTORY(&_BPSucker.CallOpts) -} - -// PEER is a free data retrieval call binding the contract method 0xad42938b. -// -// Solidity: function PEER() view returns(address) -func (_BPSucker *BPSuckerCaller) PEER(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _BPSucker.contract.Call(opts, &out, "PEER") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// PEER is a free data retrieval call binding the contract method 0xad42938b. -// -// Solidity: function PEER() view returns(address) -func (_BPSucker *BPSuckerSession) PEER() (common.Address, error) { - return _BPSucker.Contract.PEER(&_BPSucker.CallOpts) -} - -// PEER is a free data retrieval call binding the contract method 0xad42938b. -// -// Solidity: function PEER() view returns(address) -func (_BPSucker *BPSuckerCallerSession) PEER() (common.Address, error) { - return _BPSucker.Contract.PEER(&_BPSucker.CallOpts) -} - -// PERMISSIONS is a free data retrieval call binding the contract method 0xf434c914. -// -// Solidity: function PERMISSIONS() view returns(address) -func (_BPSucker *BPSuckerCaller) PERMISSIONS(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _BPSucker.contract.Call(opts, &out, "PERMISSIONS") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// PERMISSIONS is a free data retrieval call binding the contract method 0xf434c914. -// -// Solidity: function PERMISSIONS() view returns(address) -func (_BPSucker *BPSuckerSession) PERMISSIONS() (common.Address, error) { - return _BPSucker.Contract.PERMISSIONS(&_BPSucker.CallOpts) -} - -// PERMISSIONS is a free data retrieval call binding the contract method 0xf434c914. -// -// Solidity: function PERMISSIONS() view returns(address) -func (_BPSucker *BPSuckerCallerSession) PERMISSIONS() (common.Address, error) { - return _BPSucker.Contract.PERMISSIONS(&_BPSucker.CallOpts) -} - -// PROJECTID is a free data retrieval call binding the contract method 0x56539f39. -// -// Solidity: function PROJECT_ID() view returns(uint256) -func (_BPSucker *BPSuckerCaller) PROJECTID(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _BPSucker.contract.Call(opts, &out, "PROJECT_ID") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// PROJECTID is a free data retrieval call binding the contract method 0x56539f39. -// -// Solidity: function PROJECT_ID() view returns(uint256) -func (_BPSucker *BPSuckerSession) PROJECTID() (*big.Int, error) { - return _BPSucker.Contract.PROJECTID(&_BPSucker.CallOpts) -} - -// PROJECTID is a free data retrieval call binding the contract method 0x56539f39. -// -// Solidity: function PROJECT_ID() view returns(uint256) -func (_BPSucker *BPSuckerCallerSession) PROJECTID() (*big.Int, error) { - return _BPSucker.Contract.PROJECTID(&_BPSucker.CallOpts) -} - -// TOKENS is a free data retrieval call binding the contract method 0x1d831d5c. -// -// Solidity: function TOKENS() view returns(address) -func (_BPSucker *BPSuckerCaller) TOKENS(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _BPSucker.contract.Call(opts, &out, "TOKENS") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// TOKENS is a free data retrieval call binding the contract method 0x1d831d5c. -// -// Solidity: function TOKENS() view returns(address) -func (_BPSucker *BPSuckerSession) TOKENS() (common.Address, error) { - return _BPSucker.Contract.TOKENS(&_BPSucker.CallOpts) -} - -// TOKENS is a free data retrieval call binding the contract method 0x1d831d5c. -// -// Solidity: function TOKENS() view returns(address) -func (_BPSucker *BPSuckerCallerSession) TOKENS() (common.Address, error) { - return _BPSucker.Contract.TOKENS(&_BPSucker.CallOpts) -} - -// AmountToAddToBalance is a free data retrieval call binding the contract method 0xe7f82c75. -// -// Solidity: function amountToAddToBalance(address token) view returns(uint256 amount) -func (_BPSucker *BPSuckerCaller) AmountToAddToBalance(opts *bind.CallOpts, token common.Address) (*big.Int, error) { - var out []interface{} - err := _BPSucker.contract.Call(opts, &out, "amountToAddToBalance", token) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// AmountToAddToBalance is a free data retrieval call binding the contract method 0xe7f82c75. -// -// Solidity: function amountToAddToBalance(address token) view returns(uint256 amount) -func (_BPSucker *BPSuckerSession) AmountToAddToBalance(token common.Address) (*big.Int, error) { - return _BPSucker.Contract.AmountToAddToBalance(&_BPSucker.CallOpts, token) -} - -// AmountToAddToBalance is a free data retrieval call binding the contract method 0xe7f82c75. -// -// Solidity: function amountToAddToBalance(address token) view returns(uint256 amount) -func (_BPSucker *BPSuckerCallerSession) AmountToAddToBalance(token common.Address) (*big.Int, error) { - return _BPSucker.Contract.AmountToAddToBalance(&_BPSucker.CallOpts, token) -} - -// Inbox is a free data retrieval call binding the contract method 0xed0e26b9. -// -// Solidity: function inbox(address token) view returns(uint64 nonce, bytes32 root) -func (_BPSucker *BPSuckerCaller) Inbox(opts *bind.CallOpts, token common.Address) (struct { - Nonce uint64 - Root [32]byte -}, error) { - var out []interface{} - err := _BPSucker.contract.Call(opts, &out, "inbox", token) - - outstruct := new(struct { - Nonce uint64 - Root [32]byte - }) - if err != nil { - return *outstruct, err - } - - outstruct.Nonce = *abi.ConvertType(out[0], new(uint64)).(*uint64) - outstruct.Root = *abi.ConvertType(out[1], new([32]byte)).(*[32]byte) - - return *outstruct, err - -} - -// Inbox is a free data retrieval call binding the contract method 0xed0e26b9. -// -// Solidity: function inbox(address token) view returns(uint64 nonce, bytes32 root) -func (_BPSucker *BPSuckerSession) Inbox(token common.Address) (struct { - Nonce uint64 - Root [32]byte -}, error) { - return _BPSucker.Contract.Inbox(&_BPSucker.CallOpts, token) -} - -// Inbox is a free data retrieval call binding the contract method 0xed0e26b9. -// -// Solidity: function inbox(address token) view returns(uint64 nonce, bytes32 root) -func (_BPSucker *BPSuckerCallerSession) Inbox(token common.Address) (struct { - Nonce uint64 - Root [32]byte -}, error) { - return _BPSucker.Contract.Inbox(&_BPSucker.CallOpts, token) -} - -// IsMapped is a free data retrieval call binding the contract method 0xbf557aee. -// -// Solidity: function isMapped(address token) view returns(bool) -func (_BPSucker *BPSuckerCaller) IsMapped(opts *bind.CallOpts, token common.Address) (bool, error) { - var out []interface{} - err := _BPSucker.contract.Call(opts, &out, "isMapped", token) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsMapped is a free data retrieval call binding the contract method 0xbf557aee. -// -// Solidity: function isMapped(address token) view returns(bool) -func (_BPSucker *BPSuckerSession) IsMapped(token common.Address) (bool, error) { - return _BPSucker.Contract.IsMapped(&_BPSucker.CallOpts, token) -} - -// IsMapped is a free data retrieval call binding the contract method 0xbf557aee. -// -// Solidity: function isMapped(address token) view returns(bool) -func (_BPSucker *BPSuckerCallerSession) IsMapped(token common.Address) (bool, error) { - return _BPSucker.Contract.IsMapped(&_BPSucker.CallOpts, token) -} - -// Outbox is a free data retrieval call binding the contract method 0x6dfa7268. -// -// Solidity: function outbox(address token) view returns(uint64 nonce, uint256 balance, (bytes32[32],uint256) tree) -func (_BPSucker *BPSuckerCaller) Outbox(opts *bind.CallOpts, token common.Address) (struct { - Nonce uint64 - Balance *big.Int - Tree MerkleLibTree -}, error) { - var out []interface{} - err := _BPSucker.contract.Call(opts, &out, "outbox", token) - - outstruct := new(struct { - Nonce uint64 - Balance *big.Int - Tree MerkleLibTree - }) - if err != nil { - return *outstruct, err - } - - outstruct.Nonce = *abi.ConvertType(out[0], new(uint64)).(*uint64) - outstruct.Balance = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) - outstruct.Tree = *abi.ConvertType(out[2], new(MerkleLibTree)).(*MerkleLibTree) - - return *outstruct, err - -} - -// Outbox is a free data retrieval call binding the contract method 0x6dfa7268. -// -// Solidity: function outbox(address token) view returns(uint64 nonce, uint256 balance, (bytes32[32],uint256) tree) -func (_BPSucker *BPSuckerSession) Outbox(token common.Address) (struct { - Nonce uint64 - Balance *big.Int - Tree MerkleLibTree -}, error) { - return _BPSucker.Contract.Outbox(&_BPSucker.CallOpts, token) -} - -// Outbox is a free data retrieval call binding the contract method 0x6dfa7268. -// -// Solidity: function outbox(address token) view returns(uint64 nonce, uint256 balance, (bytes32[32],uint256) tree) -func (_BPSucker *BPSuckerCallerSession) Outbox(token common.Address) (struct { - Nonce uint64 - Balance *big.Int - Tree MerkleLibTree -}, error) { - return _BPSucker.Contract.Outbox(&_BPSucker.CallOpts, token) -} - -// PeerChainID is a free data retrieval call binding the contract method 0x61c86417. -// -// Solidity: function peerChainID() view returns(uint256) -func (_BPSucker *BPSuckerCaller) PeerChainID(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _BPSucker.contract.Call(opts, &out, "peerChainID") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// PeerChainID is a free data retrieval call binding the contract method 0x61c86417. -// -// Solidity: function peerChainID() view returns(uint256) -func (_BPSucker *BPSuckerSession) PeerChainID() (*big.Int, error) { - return _BPSucker.Contract.PeerChainID(&_BPSucker.CallOpts) -} - -// PeerChainID is a free data retrieval call binding the contract method 0x61c86417. -// -// Solidity: function peerChainID() view returns(uint256) -func (_BPSucker *BPSuckerCallerSession) PeerChainID() (*big.Int, error) { - return _BPSucker.Contract.PeerChainID(&_BPSucker.CallOpts) -} - -// RemoteTokenFor is a free data retrieval call binding the contract method 0x7de6fba2. -// -// Solidity: function remoteTokenFor(address token) view returns(uint32 minGas, address addr, uint256 minBridgeAmount) -func (_BPSucker *BPSuckerCaller) RemoteTokenFor(opts *bind.CallOpts, token common.Address) (struct { - MinGas uint32 - Addr common.Address - MinBridgeAmount *big.Int -}, error) { - var out []interface{} - err := _BPSucker.contract.Call(opts, &out, "remoteTokenFor", token) - - outstruct := new(struct { - MinGas uint32 - Addr common.Address - MinBridgeAmount *big.Int - }) - if err != nil { - return *outstruct, err - } - - outstruct.MinGas = *abi.ConvertType(out[0], new(uint32)).(*uint32) - outstruct.Addr = *abi.ConvertType(out[1], new(common.Address)).(*common.Address) - outstruct.MinBridgeAmount = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) - - return *outstruct, err - -} - -// RemoteTokenFor is a free data retrieval call binding the contract method 0x7de6fba2. -// -// Solidity: function remoteTokenFor(address token) view returns(uint32 minGas, address addr, uint256 minBridgeAmount) -func (_BPSucker *BPSuckerSession) RemoteTokenFor(token common.Address) (struct { - MinGas uint32 - Addr common.Address - MinBridgeAmount *big.Int -}, error) { - return _BPSucker.Contract.RemoteTokenFor(&_BPSucker.CallOpts, token) -} - -// RemoteTokenFor is a free data retrieval call binding the contract method 0x7de6fba2. -// -// Solidity: function remoteTokenFor(address token) view returns(uint32 minGas, address addr, uint256 minBridgeAmount) -func (_BPSucker *BPSuckerCallerSession) RemoteTokenFor(token common.Address) (struct { - MinGas uint32 - Addr common.Address - MinBridgeAmount *big.Int -}, error) { - return _BPSucker.Contract.RemoteTokenFor(&_BPSucker.CallOpts, token) -} - -// AddOutstandingAmountToBalance is a paid mutator transaction binding the contract method 0x69ce2233. -// -// Solidity: function addOutstandingAmountToBalance(address token) returns() -func (_BPSucker *BPSuckerTransactor) AddOutstandingAmountToBalance(opts *bind.TransactOpts, token common.Address) (*types.Transaction, error) { - return _BPSucker.contract.Transact(opts, "addOutstandingAmountToBalance", token) -} - -// AddOutstandingAmountToBalance is a paid mutator transaction binding the contract method 0x69ce2233. -// -// Solidity: function addOutstandingAmountToBalance(address token) returns() -func (_BPSucker *BPSuckerSession) AddOutstandingAmountToBalance(token common.Address) (*types.Transaction, error) { - return _BPSucker.Contract.AddOutstandingAmountToBalance(&_BPSucker.TransactOpts, token) -} - -// AddOutstandingAmountToBalance is a paid mutator transaction binding the contract method 0x69ce2233. -// -// Solidity: function addOutstandingAmountToBalance(address token) returns() -func (_BPSucker *BPSuckerTransactorSession) AddOutstandingAmountToBalance(token common.Address) (*types.Transaction, error) { - return _BPSucker.Contract.AddOutstandingAmountToBalance(&_BPSucker.TransactOpts, token) -} - -// Claim is a paid mutator transaction binding the contract method 0xb59ef50f. -// -// Solidity: function claim((address,(uint256,address,uint256,uint256),bytes32[32]) claimData) returns() -func (_BPSucker *BPSuckerTransactor) Claim(opts *bind.TransactOpts, claimData BPClaim) (*types.Transaction, error) { - return _BPSucker.contract.Transact(opts, "claim", claimData) -} - -// Claim is a paid mutator transaction binding the contract method 0xb59ef50f. -// -// Solidity: function claim((address,(uint256,address,uint256,uint256),bytes32[32]) claimData) returns() -func (_BPSucker *BPSuckerSession) Claim(claimData BPClaim) (*types.Transaction, error) { - return _BPSucker.Contract.Claim(&_BPSucker.TransactOpts, claimData) -} - -// Claim is a paid mutator transaction binding the contract method 0xb59ef50f. -// -// Solidity: function claim((address,(uint256,address,uint256,uint256),bytes32[32]) claimData) returns() -func (_BPSucker *BPSuckerTransactorSession) Claim(claimData BPClaim) (*types.Transaction, error) { - return _BPSucker.Contract.Claim(&_BPSucker.TransactOpts, claimData) -} - -// Claim0 is a paid mutator transaction binding the contract method 0xc1854129. -// -// Solidity: function claim((address,(uint256,address,uint256,uint256),bytes32[32])[] claims) returns() -func (_BPSucker *BPSuckerTransactor) Claim0(opts *bind.TransactOpts, claims []BPClaim) (*types.Transaction, error) { - return _BPSucker.contract.Transact(opts, "claim0", claims) -} - -// Claim0 is a paid mutator transaction binding the contract method 0xc1854129. -// -// Solidity: function claim((address,(uint256,address,uint256,uint256),bytes32[32])[] claims) returns() -func (_BPSucker *BPSuckerSession) Claim0(claims []BPClaim) (*types.Transaction, error) { - return _BPSucker.Contract.Claim0(&_BPSucker.TransactOpts, claims) -} - -// Claim0 is a paid mutator transaction binding the contract method 0xc1854129. -// -// Solidity: function claim((address,(uint256,address,uint256,uint256),bytes32[32])[] claims) returns() -func (_BPSucker *BPSuckerTransactorSession) Claim0(claims []BPClaim) (*types.Transaction, error) { - return _BPSucker.Contract.Claim0(&_BPSucker.TransactOpts, claims) -} - -// FromRemote is a paid mutator transaction binding the contract method 0x69d31fdd. -// -// Solidity: function fromRemote((address,uint256,(uint64,bytes32)) root) payable returns() -func (_BPSucker *BPSuckerTransactor) FromRemote(opts *bind.TransactOpts, root BPMessageRoot) (*types.Transaction, error) { - return _BPSucker.contract.Transact(opts, "fromRemote", root) -} - -// FromRemote is a paid mutator transaction binding the contract method 0x69d31fdd. -// -// Solidity: function fromRemote((address,uint256,(uint64,bytes32)) root) payable returns() -func (_BPSucker *BPSuckerSession) FromRemote(root BPMessageRoot) (*types.Transaction, error) { - return _BPSucker.Contract.FromRemote(&_BPSucker.TransactOpts, root) -} - -// FromRemote is a paid mutator transaction binding the contract method 0x69d31fdd. -// -// Solidity: function fromRemote((address,uint256,(uint64,bytes32)) root) payable returns() -func (_BPSucker *BPSuckerTransactorSession) FromRemote(root BPMessageRoot) (*types.Transaction, error) { - return _BPSucker.Contract.FromRemote(&_BPSucker.TransactOpts, root) -} - -// MapToken is a paid mutator transaction binding the contract method 0x38eb2044. -// -// Solidity: function mapToken((address,uint32,address,uint256) map) returns() -func (_BPSucker *BPSuckerTransactor) MapToken(opts *bind.TransactOpts, arg0 BPTokenMapping) (*types.Transaction, error) { - return _BPSucker.contract.Transact(opts, "mapToken", arg0) -} - -// MapToken is a paid mutator transaction binding the contract method 0x38eb2044. -// -// Solidity: function mapToken((address,uint32,address,uint256) map) returns() -func (_BPSucker *BPSuckerSession) MapToken(arg0 BPTokenMapping) (*types.Transaction, error) { - return _BPSucker.Contract.MapToken(&_BPSucker.TransactOpts, arg0) -} - -// MapToken is a paid mutator transaction binding the contract method 0x38eb2044. -// -// Solidity: function mapToken((address,uint32,address,uint256) map) returns() -func (_BPSucker *BPSuckerTransactorSession) MapToken(arg0 BPTokenMapping) (*types.Transaction, error) { - return _BPSucker.Contract.MapToken(&_BPSucker.TransactOpts, arg0) -} - -// MapTokens is a paid mutator transaction binding the contract method 0x2241dc52. -// -// Solidity: function mapTokens((address,uint32,address,uint256)[] maps) returns() -func (_BPSucker *BPSuckerTransactor) MapTokens(opts *bind.TransactOpts, maps []BPTokenMapping) (*types.Transaction, error) { - return _BPSucker.contract.Transact(opts, "mapTokens", maps) -} - -// MapTokens is a paid mutator transaction binding the contract method 0x2241dc52. -// -// Solidity: function mapTokens((address,uint32,address,uint256)[] maps) returns() -func (_BPSucker *BPSuckerSession) MapTokens(maps []BPTokenMapping) (*types.Transaction, error) { - return _BPSucker.Contract.MapTokens(&_BPSucker.TransactOpts, maps) -} - -// MapTokens is a paid mutator transaction binding the contract method 0x2241dc52. -// -// Solidity: function mapTokens((address,uint32,address,uint256)[] maps) returns() -func (_BPSucker *BPSuckerTransactorSession) MapTokens(maps []BPTokenMapping) (*types.Transaction, error) { - return _BPSucker.Contract.MapTokens(&_BPSucker.TransactOpts, maps) -} - -// Prepare is a paid mutator transaction binding the contract method 0x551ebbf0. -// -// Solidity: function prepare(uint256 projectTokenAmount, address beneficiary, uint256 minTokensReclaimed, address token) returns() -func (_BPSucker *BPSuckerTransactor) Prepare(opts *bind.TransactOpts, projectTokenAmount *big.Int, beneficiary common.Address, minTokensReclaimed *big.Int, token common.Address) (*types.Transaction, error) { - return _BPSucker.contract.Transact(opts, "prepare", projectTokenAmount, beneficiary, minTokensReclaimed, token) -} - -// Prepare is a paid mutator transaction binding the contract method 0x551ebbf0. -// -// Solidity: function prepare(uint256 projectTokenAmount, address beneficiary, uint256 minTokensReclaimed, address token) returns() -func (_BPSucker *BPSuckerSession) Prepare(projectTokenAmount *big.Int, beneficiary common.Address, minTokensReclaimed *big.Int, token common.Address) (*types.Transaction, error) { - return _BPSucker.Contract.Prepare(&_BPSucker.TransactOpts, projectTokenAmount, beneficiary, minTokensReclaimed, token) -} - -// Prepare is a paid mutator transaction binding the contract method 0x551ebbf0. -// -// Solidity: function prepare(uint256 projectTokenAmount, address beneficiary, uint256 minTokensReclaimed, address token) returns() -func (_BPSucker *BPSuckerTransactorSession) Prepare(projectTokenAmount *big.Int, beneficiary common.Address, minTokensReclaimed *big.Int, token common.Address) (*types.Transaction, error) { - return _BPSucker.Contract.Prepare(&_BPSucker.TransactOpts, projectTokenAmount, beneficiary, minTokensReclaimed, token) -} - -// ToRemote is a paid mutator transaction binding the contract method 0xb71c1179. -// -// Solidity: function toRemote(address token) payable returns() -func (_BPSucker *BPSuckerTransactor) ToRemote(opts *bind.TransactOpts, token common.Address) (*types.Transaction, error) { - return _BPSucker.contract.Transact(opts, "toRemote", token) -} - -// ToRemote is a paid mutator transaction binding the contract method 0xb71c1179. -// -// Solidity: function toRemote(address token) payable returns() -func (_BPSucker *BPSuckerSession) ToRemote(token common.Address) (*types.Transaction, error) { - return _BPSucker.Contract.ToRemote(&_BPSucker.TransactOpts, token) -} - -// ToRemote is a paid mutator transaction binding the contract method 0xb71c1179. -// -// Solidity: function toRemote(address token) payable returns() -func (_BPSucker *BPSuckerTransactorSession) ToRemote(token common.Address) (*types.Transaction, error) { - return _BPSucker.Contract.ToRemote(&_BPSucker.TransactOpts, token) -} - -// Receive is a paid mutator transaction binding the contract receive function. -// -// Solidity: receive() payable returns() -func (_BPSucker *BPSuckerTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { - return _BPSucker.contract.RawTransact(opts, nil) // calldata is disallowed for receive function -} - -// Receive is a paid mutator transaction binding the contract receive function. -// -// Solidity: receive() payable returns() -func (_BPSucker *BPSuckerSession) Receive() (*types.Transaction, error) { - return _BPSucker.Contract.Receive(&_BPSucker.TransactOpts) -} - -// Receive is a paid mutator transaction binding the contract receive function. -// -// Solidity: receive() payable returns() -func (_BPSucker *BPSuckerTransactorSession) Receive() (*types.Transaction, error) { - return _BPSucker.Contract.Receive(&_BPSucker.TransactOpts) -} - -// BPSuckerClaimedIterator is returned from FilterClaimed and is used to iterate over the raw logs and unpacked data for Claimed events raised by the BPSucker contract. -type BPSuckerClaimedIterator struct { - Event *BPSuckerClaimed // 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 *BPSuckerClaimedIterator) 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(BPSuckerClaimed) - 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(BPSuckerClaimed) - 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 *BPSuckerClaimedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *BPSuckerClaimedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// BPSuckerClaimed represents a Claimed event raised by the BPSucker contract. -type BPSuckerClaimed struct { - Beneficiary common.Address - Token common.Address - ProjectTokenAmount *big.Int - TerminalTokenAmount *big.Int - Index *big.Int - AutoAddedToBalance bool - Raw types.Log // Blockchain specific contextual infos -} - -// FilterClaimed is a free log retrieval operation binding the contract event 0x487194902d206a126abe9f23a4e2b78d1600ed8034b1423290a13edd6ebc7d14. -// -// Solidity: event Claimed(address beneficiary, address token, uint256 projectTokenAmount, uint256 terminalTokenAmount, uint256 index, bool autoAddedToBalance) -func (_BPSucker *BPSuckerFilterer) FilterClaimed(opts *bind.FilterOpts) (*BPSuckerClaimedIterator, error) { - - logs, sub, err := _BPSucker.contract.FilterLogs(opts, "Claimed") - if err != nil { - return nil, err - } - return &BPSuckerClaimedIterator{contract: _BPSucker.contract, event: "Claimed", logs: logs, sub: sub}, nil -} - -// WatchClaimed is a free log subscription operation binding the contract event 0x487194902d206a126abe9f23a4e2b78d1600ed8034b1423290a13edd6ebc7d14. -// -// Solidity: event Claimed(address beneficiary, address token, uint256 projectTokenAmount, uint256 terminalTokenAmount, uint256 index, bool autoAddedToBalance) -func (_BPSucker *BPSuckerFilterer) WatchClaimed(opts *bind.WatchOpts, sink chan<- *BPSuckerClaimed) (event.Subscription, error) { - - logs, sub, err := _BPSucker.contract.WatchLogs(opts, "Claimed") - 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(BPSuckerClaimed) - if err := _BPSucker.contract.UnpackLog(event, "Claimed", 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 -} - -// ParseClaimed is a log parse operation binding the contract event 0x487194902d206a126abe9f23a4e2b78d1600ed8034b1423290a13edd6ebc7d14. -// -// Solidity: event Claimed(address beneficiary, address token, uint256 projectTokenAmount, uint256 terminalTokenAmount, uint256 index, bool autoAddedToBalance) -func (_BPSucker *BPSuckerFilterer) ParseClaimed(log types.Log) (*BPSuckerClaimed, error) { - event := new(BPSuckerClaimed) - if err := _BPSucker.contract.UnpackLog(event, "Claimed", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// BPSuckerInsertToOutboxTreeIterator is returned from FilterInsertToOutboxTree and is used to iterate over the raw logs and unpacked data for InsertToOutboxTree events raised by the BPSucker contract. -type BPSuckerInsertToOutboxTreeIterator struct { - Event *BPSuckerInsertToOutboxTree // 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 *BPSuckerInsertToOutboxTreeIterator) 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(BPSuckerInsertToOutboxTree) - 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(BPSuckerInsertToOutboxTree) - 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 *BPSuckerInsertToOutboxTreeIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *BPSuckerInsertToOutboxTreeIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// BPSuckerInsertToOutboxTree represents a InsertToOutboxTree event raised by the BPSucker contract. -type BPSuckerInsertToOutboxTree struct { - Beneficiary common.Address - TerminalToken common.Address - Hashed [32]byte - Index *big.Int - Root [32]byte - ProjectTokenAmount *big.Int - TerminalTokenAmount *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterInsertToOutboxTree is a free log retrieval operation binding the contract event 0x7b58dbb78e7edc690b0688a53dea0c443d630c4a5db66c3c47d4ff2044c97728. -// -// Solidity: event InsertToOutboxTree(address indexed beneficiary, address indexed terminalToken, bytes32 hashed, uint256 index, bytes32 root, uint256 projectTokenAmount, uint256 terminalTokenAmount) -func (_BPSucker *BPSuckerFilterer) FilterInsertToOutboxTree(opts *bind.FilterOpts, beneficiary []common.Address, terminalToken []common.Address) (*BPSuckerInsertToOutboxTreeIterator, error) { - - var beneficiaryRule []interface{} - for _, beneficiaryItem := range beneficiary { - beneficiaryRule = append(beneficiaryRule, beneficiaryItem) - } - var terminalTokenRule []interface{} - for _, terminalTokenItem := range terminalToken { - terminalTokenRule = append(terminalTokenRule, terminalTokenItem) - } - - logs, sub, err := _BPSucker.contract.FilterLogs(opts, "InsertToOutboxTree", beneficiaryRule, terminalTokenRule) - if err != nil { - return nil, err - } - return &BPSuckerInsertToOutboxTreeIterator{contract: _BPSucker.contract, event: "InsertToOutboxTree", logs: logs, sub: sub}, nil -} - -// WatchInsertToOutboxTree is a free log subscription operation binding the contract event 0x7b58dbb78e7edc690b0688a53dea0c443d630c4a5db66c3c47d4ff2044c97728. -// -// Solidity: event InsertToOutboxTree(address indexed beneficiary, address indexed terminalToken, bytes32 hashed, uint256 index, bytes32 root, uint256 projectTokenAmount, uint256 terminalTokenAmount) -func (_BPSucker *BPSuckerFilterer) WatchInsertToOutboxTree(opts *bind.WatchOpts, sink chan<- *BPSuckerInsertToOutboxTree, beneficiary []common.Address, terminalToken []common.Address) (event.Subscription, error) { - - var beneficiaryRule []interface{} - for _, beneficiaryItem := range beneficiary { - beneficiaryRule = append(beneficiaryRule, beneficiaryItem) - } - var terminalTokenRule []interface{} - for _, terminalTokenItem := range terminalToken { - terminalTokenRule = append(terminalTokenRule, terminalTokenItem) - } - - logs, sub, err := _BPSucker.contract.WatchLogs(opts, "InsertToOutboxTree", beneficiaryRule, terminalTokenRule) - 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(BPSuckerInsertToOutboxTree) - if err := _BPSucker.contract.UnpackLog(event, "InsertToOutboxTree", 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 -} - -// ParseInsertToOutboxTree is a log parse operation binding the contract event 0x7b58dbb78e7edc690b0688a53dea0c443d630c4a5db66c3c47d4ff2044c97728. -// -// Solidity: event InsertToOutboxTree(address indexed beneficiary, address indexed terminalToken, bytes32 hashed, uint256 index, bytes32 root, uint256 projectTokenAmount, uint256 terminalTokenAmount) -func (_BPSucker *BPSuckerFilterer) ParseInsertToOutboxTree(log types.Log) (*BPSuckerInsertToOutboxTree, error) { - event := new(BPSuckerInsertToOutboxTree) - if err := _BPSucker.contract.UnpackLog(event, "InsertToOutboxTree", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// BPSuckerNewInboxTreeRootIterator is returned from FilterNewInboxTreeRoot and is used to iterate over the raw logs and unpacked data for NewInboxTreeRoot events raised by the BPSucker contract. -type BPSuckerNewInboxTreeRootIterator struct { - Event *BPSuckerNewInboxTreeRoot // 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 *BPSuckerNewInboxTreeRootIterator) 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(BPSuckerNewInboxTreeRoot) - 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(BPSuckerNewInboxTreeRoot) - 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 *BPSuckerNewInboxTreeRootIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *BPSuckerNewInboxTreeRootIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// BPSuckerNewInboxTreeRoot represents a NewInboxTreeRoot event raised by the BPSucker contract. -type BPSuckerNewInboxTreeRoot struct { - Token common.Address - Nonce uint64 - Root [32]byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterNewInboxTreeRoot is a free log retrieval operation binding the contract event 0x551b6b99b4c48e3265d2885ab0d93779be2402293261e074f7bf74b2c8f45b6f. -// -// Solidity: event NewInboxTreeRoot(address indexed token, uint64 nonce, bytes32 root) -func (_BPSucker *BPSuckerFilterer) FilterNewInboxTreeRoot(opts *bind.FilterOpts, token []common.Address) (*BPSuckerNewInboxTreeRootIterator, error) { - - var tokenRule []interface{} - for _, tokenItem := range token { - tokenRule = append(tokenRule, tokenItem) - } - - logs, sub, err := _BPSucker.contract.FilterLogs(opts, "NewInboxTreeRoot", tokenRule) - if err != nil { - return nil, err - } - return &BPSuckerNewInboxTreeRootIterator{contract: _BPSucker.contract, event: "NewInboxTreeRoot", logs: logs, sub: sub}, nil -} - -// WatchNewInboxTreeRoot is a free log subscription operation binding the contract event 0x551b6b99b4c48e3265d2885ab0d93779be2402293261e074f7bf74b2c8f45b6f. -// -// Solidity: event NewInboxTreeRoot(address indexed token, uint64 nonce, bytes32 root) -func (_BPSucker *BPSuckerFilterer) WatchNewInboxTreeRoot(opts *bind.WatchOpts, sink chan<- *BPSuckerNewInboxTreeRoot, token []common.Address) (event.Subscription, error) { - - var tokenRule []interface{} - for _, tokenItem := range token { - tokenRule = append(tokenRule, tokenItem) - } - - logs, sub, err := _BPSucker.contract.WatchLogs(opts, "NewInboxTreeRoot", tokenRule) - 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(BPSuckerNewInboxTreeRoot) - if err := _BPSucker.contract.UnpackLog(event, "NewInboxTreeRoot", 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 -} - -// ParseNewInboxTreeRoot is a log parse operation binding the contract event 0x551b6b99b4c48e3265d2885ab0d93779be2402293261e074f7bf74b2c8f45b6f. -// -// Solidity: event NewInboxTreeRoot(address indexed token, uint64 nonce, bytes32 root) -func (_BPSucker *BPSuckerFilterer) ParseNewInboxTreeRoot(log types.Log) (*BPSuckerNewInboxTreeRoot, error) { - event := new(BPSuckerNewInboxTreeRoot) - if err := _BPSucker.contract.UnpackLog(event, "NewInboxTreeRoot", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// BPSuckerRootToRemoteIterator is returned from FilterRootToRemote and is used to iterate over the raw logs and unpacked data for RootToRemote events raised by the BPSucker contract. -type BPSuckerRootToRemoteIterator struct { - Event *BPSuckerRootToRemote // 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 *BPSuckerRootToRemoteIterator) 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(BPSuckerRootToRemote) - 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(BPSuckerRootToRemote) - 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 *BPSuckerRootToRemoteIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *BPSuckerRootToRemoteIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// BPSuckerRootToRemote represents a RootToRemote event raised by the BPSucker contract. -type BPSuckerRootToRemote struct { - Root [32]byte - TerminalToken common.Address - Index *big.Int - Nonce uint64 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterRootToRemote is a free log retrieval operation binding the contract event 0x3e069c1f498cba23d7d2b74b84311469e8da6e527cade62061d642c61b64e0de. -// -// Solidity: event RootToRemote(bytes32 indexed root, address indexed terminalToken, uint256 index, uint64 nonce) -func (_BPSucker *BPSuckerFilterer) FilterRootToRemote(opts *bind.FilterOpts, root [][32]byte, terminalToken []common.Address) (*BPSuckerRootToRemoteIterator, error) { - - var rootRule []interface{} - for _, rootItem := range root { - rootRule = append(rootRule, rootItem) - } - var terminalTokenRule []interface{} - for _, terminalTokenItem := range terminalToken { - terminalTokenRule = append(terminalTokenRule, terminalTokenItem) - } - - logs, sub, err := _BPSucker.contract.FilterLogs(opts, "RootToRemote", rootRule, terminalTokenRule) - if err != nil { - return nil, err - } - return &BPSuckerRootToRemoteIterator{contract: _BPSucker.contract, event: "RootToRemote", logs: logs, sub: sub}, nil -} - -// WatchRootToRemote is a free log subscription operation binding the contract event 0x3e069c1f498cba23d7d2b74b84311469e8da6e527cade62061d642c61b64e0de. -// -// Solidity: event RootToRemote(bytes32 indexed root, address indexed terminalToken, uint256 index, uint64 nonce) -func (_BPSucker *BPSuckerFilterer) WatchRootToRemote(opts *bind.WatchOpts, sink chan<- *BPSuckerRootToRemote, root [][32]byte, terminalToken []common.Address) (event.Subscription, error) { - - var rootRule []interface{} - for _, rootItem := range root { - rootRule = append(rootRule, rootItem) - } - var terminalTokenRule []interface{} - for _, terminalTokenItem := range terminalToken { - terminalTokenRule = append(terminalTokenRule, terminalTokenItem) - } - - logs, sub, err := _BPSucker.contract.WatchLogs(opts, "RootToRemote", rootRule, terminalTokenRule) - 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(BPSuckerRootToRemote) - if err := _BPSucker.contract.UnpackLog(event, "RootToRemote", 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 -} - -// ParseRootToRemote is a log parse operation binding the contract event 0x3e069c1f498cba23d7d2b74b84311469e8da6e527cade62061d642c61b64e0de. -// -// Solidity: event RootToRemote(bytes32 indexed root, address indexed terminalToken, uint256 index, uint64 nonce) -func (_BPSucker *BPSuckerFilterer) ParseRootToRemote(log types.Log) (*BPSuckerRootToRemote, error) { - event := new(BPSuckerRootToRemote) - if err := _BPSucker.contract.UnpackLog(event, "RootToRemote", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} diff --git a/JBSucker.go b/JBSucker.go new file mode 100644 index 0000000..55f336c --- /dev/null +++ b/JBSucker.go @@ -0,0 +1,2108 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package main + +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 +) + +// JBClaim is an auto generated low-level Go binding around an user-defined struct. +type JBClaim struct { + Token common.Address + Leaf JBLeaf + Proof [32][32]byte +} + +// JBInboxTreeRoot is an auto generated low-level Go binding around an user-defined struct. +type JBInboxTreeRoot struct { + Nonce uint64 + Root [32]byte +} + +// JBLeaf is an auto generated low-level Go binding around an user-defined struct. +type JBLeaf struct { + Index *big.Int + Beneficiary common.Address + ProjectTokenCount *big.Int + TerminalTokenAmount *big.Int +} + +// JBMessageRoot is an auto generated low-level Go binding around an user-defined struct. +type JBMessageRoot struct { + Token common.Address + Amount *big.Int + RemoteRoot JBInboxTreeRoot +} + +// JBOutboxTree is an auto generated low-level Go binding around an user-defined struct. +type JBOutboxTree struct { + Nonce uint64 + Balance *big.Int + Tree MerkleLibTree + NumberOfClaimsSent *big.Int +} + +// JBRemoteToken is an auto generated low-level Go binding around an user-defined struct. +type JBRemoteToken struct { + Enabled bool + EmergencyHatch bool + MinGas uint32 + Addr common.Address + MinBridgeAmount *big.Int +} + +// JBTokenMapping is an auto generated low-level Go binding around an user-defined struct. +type JBTokenMapping struct { + LocalToken common.Address + MinGas uint32 + RemoteToken common.Address + MinBridgeAmount *big.Int +} + +// MerkleLibTree is an auto generated low-level Go binding around an user-defined struct. +type MerkleLibTree struct { + Branch [32][32]byte + Count *big.Int +} + +// JBSuckerMetaData contains all meta data concerning the JBSucker contract. +var JBSuckerMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"ADD_TO_BALANCE_MODE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumJBAddToBalanceMode\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"DEPLOYER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"DIRECTORY\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIJBDirectory\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MESSENGER_BASE_GAS_LIMIT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MESSENGER_ERC20_MIN_GAS_LIMIT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PERMISSIONS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIJBPermissions\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"TOKENS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIJBTokens\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"addOutstandingAmountToBalance\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"amountToAddToBalanceOf\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"claim\",\"inputs\":[{\"name\":\"claimData\",\"type\":\"tuple\",\"internalType\":\"structJBClaim\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"leaf\",\"type\":\"tuple\",\"internalType\":\"structJBLeaf\",\"components\":[{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"beneficiary\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"projectTokenCount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"terminalTokenAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"proof\",\"type\":\"bytes32[32]\",\"internalType\":\"bytes32[32]\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"claim\",\"inputs\":[{\"name\":\"claims\",\"type\":\"tuple[]\",\"internalType\":\"structJBClaim[]\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"leaf\",\"type\":\"tuple\",\"internalType\":\"structJBLeaf\",\"components\":[{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"beneficiary\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"projectTokenCount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"terminalTokenAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"proof\",\"type\":\"bytes32[32]\",\"internalType\":\"bytes32[32]\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"enableEmergencyHatchFor\",\"inputs\":[{\"name\":\"tokens\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"exitThroughEmergencyHatch\",\"inputs\":[{\"name\":\"claimData\",\"type\":\"tuple\",\"internalType\":\"structJBClaim\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"leaf\",\"type\":\"tuple\",\"internalType\":\"structJBLeaf\",\"components\":[{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"beneficiary\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"projectTokenCount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"terminalTokenAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"proof\",\"type\":\"bytes32[32]\",\"internalType\":\"bytes32[32]\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"fromRemote\",\"inputs\":[{\"name\":\"root\",\"type\":\"tuple\",\"internalType\":\"structJBMessageRoot\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"remoteRoot\",\"type\":\"tuple\",\"internalType\":\"structJBInboxTreeRoot\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}]}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"inboxOf\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structJBInboxTreeRoot\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"__projectId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isMapped\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isTrustedForwarder\",\"inputs\":[{\"name\":\"forwarder\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"mapToken\",\"inputs\":[{\"name\":\"map\",\"type\":\"tuple\",\"internalType\":\"structJBTokenMapping\",\"components\":[{\"name\":\"localToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"minGas\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"remoteToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"minBridgeAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"mapTokens\",\"inputs\":[{\"name\":\"maps\",\"type\":\"tuple[]\",\"internalType\":\"structJBTokenMapping[]\",\"components\":[{\"name\":\"localToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"minGas\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"remoteToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"minBridgeAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"outboxOf\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structJBOutboxTree\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"balance\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"tree\",\"type\":\"tuple\",\"internalType\":\"structMerkleLib.Tree\",\"components\":[{\"name\":\"branch\",\"type\":\"bytes32[32]\",\"internalType\":\"bytes32[32]\"},{\"name\":\"count\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"numberOfClaimsSent\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"peer\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"peerChainId\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"prepare\",\"inputs\":[{\"name\":\"projectTokenCount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"beneficiary\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"minTokensReclaimed\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"projectId\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"remoteTokenFor\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structJBRemoteToken\",\"components\":[{\"name\":\"enabled\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"emergencyHatch\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"minGas\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"minBridgeAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setDeprecation\",\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint40\",\"internalType\":\"uint40\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"state\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumJBSuckerState\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"supportsInterface\",\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"toRemote\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"trustedForwarder\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"Claimed\",\"inputs\":[{\"name\":\"beneficiary\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"projectTokenCount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"terminalTokenAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"index\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"autoAddedToBalance\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"},{\"name\":\"caller\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DeprecationTimeUpdated\",\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint40\",\"indexed\":false,\"internalType\":\"uint40\"},{\"name\":\"caller\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"EmergencyHatchOpened\",\"inputs\":[{\"name\":\"tokens\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"},{\"name\":\"caller\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"InsertToOutboxTree\",\"inputs\":[{\"name\":\"beneficiary\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"hashed\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"index\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"root\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"projectTokenCount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"terminalTokenAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"caller\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"NewInboxTreeRoot\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"root\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"caller\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RootToRemote\",\"inputs\":[{\"name\":\"root\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"token\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"index\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"nonce\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"caller\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"JBPermissioned_Unauthorized\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"projectId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"permissionId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"JBSucker_BelowMinGas\",\"inputs\":[{\"name\":\"minGas\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"minGasLimit\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"JBSucker_Deprecated\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"JBSucker_DeprecationTimestampTooSoon\",\"inputs\":[{\"name\":\"givenTime\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"minimumTime\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"JBSucker_ExpectedMsgValue\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"JBSucker_InsufficientBalance\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"balance\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"JBSucker_InsufficientMsgValue\",\"inputs\":[{\"name\":\"received\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expected\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"JBSucker_InvalidNativeRemoteAddress\",\"inputs\":[{\"name\":\"remoteToken\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"JBSucker_InvalidProof\",\"inputs\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"inboxRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"JBSucker_LeafAlreadyExecuted\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"JBSucker_ManualNotAllowed\",\"inputs\":[{\"name\":\"mode\",\"type\":\"uint8\",\"internalType\":\"enumJBAddToBalanceMode\"}]},{\"type\":\"error\",\"name\":\"JBSucker_NoTerminalForToken\",\"inputs\":[{\"name\":\"projectId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"JBSucker_NotPeer\",\"inputs\":[{\"name\":\"caller\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"JBSucker_QueueInsufficientSize\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"minimumAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"JBSucker_TokenAlreadyMapped\",\"inputs\":[{\"name\":\"localToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"mappedTo\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"JBSucker_TokenHasInvalidEmergencyHatchState\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"JBSucker_TokenNotMapped\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"JBSucker_UnexpectedMsgValue\",\"inputs\":[{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"JBSucker_ZeroBeneficiary\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"JBSucker_ZeroERC20Token\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"MerkleLib__insert_treeIsFull\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SafeERC20FailedOperation\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}]}]", +} + +// JBSuckerABI is the input ABI used to generate the binding from. +// Deprecated: Use JBSuckerMetaData.ABI instead. +var JBSuckerABI = JBSuckerMetaData.ABI + +// JBSucker is an auto generated Go binding around an Ethereum contract. +type JBSucker struct { + JBSuckerCaller // Read-only binding to the contract + JBSuckerTransactor // Write-only binding to the contract + JBSuckerFilterer // Log filterer for contract events +} + +// JBSuckerCaller is an auto generated read-only Go binding around an Ethereum contract. +type JBSuckerCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// JBSuckerTransactor is an auto generated write-only Go binding around an Ethereum contract. +type JBSuckerTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// JBSuckerFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type JBSuckerFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// JBSuckerSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type JBSuckerSession struct { + Contract *JBSucker // 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 +} + +// JBSuckerCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type JBSuckerCallerSession struct { + Contract *JBSuckerCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// JBSuckerTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type JBSuckerTransactorSession struct { + Contract *JBSuckerTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// JBSuckerRaw is an auto generated low-level Go binding around an Ethereum contract. +type JBSuckerRaw struct { + Contract *JBSucker // Generic contract binding to access the raw methods on +} + +// JBSuckerCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type JBSuckerCallerRaw struct { + Contract *JBSuckerCaller // Generic read-only contract binding to access the raw methods on +} + +// JBSuckerTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type JBSuckerTransactorRaw struct { + Contract *JBSuckerTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewJBSucker creates a new instance of JBSucker, bound to a specific deployed contract. +func NewJBSucker(address common.Address, backend bind.ContractBackend) (*JBSucker, error) { + contract, err := bindJBSucker(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &JBSucker{JBSuckerCaller: JBSuckerCaller{contract: contract}, JBSuckerTransactor: JBSuckerTransactor{contract: contract}, JBSuckerFilterer: JBSuckerFilterer{contract: contract}}, nil +} + +// NewJBSuckerCaller creates a new read-only instance of JBSucker, bound to a specific deployed contract. +func NewJBSuckerCaller(address common.Address, caller bind.ContractCaller) (*JBSuckerCaller, error) { + contract, err := bindJBSucker(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &JBSuckerCaller{contract: contract}, nil +} + +// NewJBSuckerTransactor creates a new write-only instance of JBSucker, bound to a specific deployed contract. +func NewJBSuckerTransactor(address common.Address, transactor bind.ContractTransactor) (*JBSuckerTransactor, error) { + contract, err := bindJBSucker(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &JBSuckerTransactor{contract: contract}, nil +} + +// NewJBSuckerFilterer creates a new log filterer instance of JBSucker, bound to a specific deployed contract. +func NewJBSuckerFilterer(address common.Address, filterer bind.ContractFilterer) (*JBSuckerFilterer, error) { + contract, err := bindJBSucker(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &JBSuckerFilterer{contract: contract}, nil +} + +// bindJBSucker binds a generic wrapper to an already deployed contract. +func bindJBSucker(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := JBSuckerMetaData.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 (_JBSucker *JBSuckerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _JBSucker.Contract.JBSuckerCaller.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 (_JBSucker *JBSuckerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _JBSucker.Contract.JBSuckerTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_JBSucker *JBSuckerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _JBSucker.Contract.JBSuckerTransactor.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 (_JBSucker *JBSuckerCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _JBSucker.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 (_JBSucker *JBSuckerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _JBSucker.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_JBSucker *JBSuckerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _JBSucker.Contract.contract.Transact(opts, method, params...) +} + +// ADDTOBALANCEMODE is a free data retrieval call binding the contract method 0xc6525f2c. +// +// Solidity: function ADD_TO_BALANCE_MODE() view returns(uint8) +func (_JBSucker *JBSuckerCaller) ADDTOBALANCEMODE(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _JBSucker.contract.Call(opts, &out, "ADD_TO_BALANCE_MODE") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// ADDTOBALANCEMODE is a free data retrieval call binding the contract method 0xc6525f2c. +// +// Solidity: function ADD_TO_BALANCE_MODE() view returns(uint8) +func (_JBSucker *JBSuckerSession) ADDTOBALANCEMODE() (uint8, error) { + return _JBSucker.Contract.ADDTOBALANCEMODE(&_JBSucker.CallOpts) +} + +// ADDTOBALANCEMODE is a free data retrieval call binding the contract method 0xc6525f2c. +// +// Solidity: function ADD_TO_BALANCE_MODE() view returns(uint8) +func (_JBSucker *JBSuckerCallerSession) ADDTOBALANCEMODE() (uint8, error) { + return _JBSucker.Contract.ADDTOBALANCEMODE(&_JBSucker.CallOpts) +} + +// DEPLOYER is a free data retrieval call binding the contract method 0xc1b8411a. +// +// Solidity: function DEPLOYER() view returns(address) +func (_JBSucker *JBSuckerCaller) DEPLOYER(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _JBSucker.contract.Call(opts, &out, "DEPLOYER") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// DEPLOYER is a free data retrieval call binding the contract method 0xc1b8411a. +// +// Solidity: function DEPLOYER() view returns(address) +func (_JBSucker *JBSuckerSession) DEPLOYER() (common.Address, error) { + return _JBSucker.Contract.DEPLOYER(&_JBSucker.CallOpts) +} + +// DEPLOYER is a free data retrieval call binding the contract method 0xc1b8411a. +// +// Solidity: function DEPLOYER() view returns(address) +func (_JBSucker *JBSuckerCallerSession) DEPLOYER() (common.Address, error) { + return _JBSucker.Contract.DEPLOYER(&_JBSucker.CallOpts) +} + +// DIRECTORY is a free data retrieval call binding the contract method 0x88bc2ef3. +// +// Solidity: function DIRECTORY() view returns(address) +func (_JBSucker *JBSuckerCaller) DIRECTORY(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _JBSucker.contract.Call(opts, &out, "DIRECTORY") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// DIRECTORY is a free data retrieval call binding the contract method 0x88bc2ef3. +// +// Solidity: function DIRECTORY() view returns(address) +func (_JBSucker *JBSuckerSession) DIRECTORY() (common.Address, error) { + return _JBSucker.Contract.DIRECTORY(&_JBSucker.CallOpts) +} + +// DIRECTORY is a free data retrieval call binding the contract method 0x88bc2ef3. +// +// Solidity: function DIRECTORY() view returns(address) +func (_JBSucker *JBSuckerCallerSession) DIRECTORY() (common.Address, error) { + return _JBSucker.Contract.DIRECTORY(&_JBSucker.CallOpts) +} + +// MESSENGERBASEGASLIMIT is a free data retrieval call binding the contract method 0x92ee1ea7. +// +// Solidity: function MESSENGER_BASE_GAS_LIMIT() view returns(uint32) +func (_JBSucker *JBSuckerCaller) MESSENGERBASEGASLIMIT(opts *bind.CallOpts) (uint32, error) { + var out []interface{} + err := _JBSucker.contract.Call(opts, &out, "MESSENGER_BASE_GAS_LIMIT") + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +// MESSENGERBASEGASLIMIT is a free data retrieval call binding the contract method 0x92ee1ea7. +// +// Solidity: function MESSENGER_BASE_GAS_LIMIT() view returns(uint32) +func (_JBSucker *JBSuckerSession) MESSENGERBASEGASLIMIT() (uint32, error) { + return _JBSucker.Contract.MESSENGERBASEGASLIMIT(&_JBSucker.CallOpts) +} + +// MESSENGERBASEGASLIMIT is a free data retrieval call binding the contract method 0x92ee1ea7. +// +// Solidity: function MESSENGER_BASE_GAS_LIMIT() view returns(uint32) +func (_JBSucker *JBSuckerCallerSession) MESSENGERBASEGASLIMIT() (uint32, error) { + return _JBSucker.Contract.MESSENGERBASEGASLIMIT(&_JBSucker.CallOpts) +} + +// MESSENGERERC20MINGASLIMIT is a free data retrieval call binding the contract method 0x3a5de07d. +// +// Solidity: function MESSENGER_ERC20_MIN_GAS_LIMIT() view returns(uint32) +func (_JBSucker *JBSuckerCaller) MESSENGERERC20MINGASLIMIT(opts *bind.CallOpts) (uint32, error) { + var out []interface{} + err := _JBSucker.contract.Call(opts, &out, "MESSENGER_ERC20_MIN_GAS_LIMIT") + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +// MESSENGERERC20MINGASLIMIT is a free data retrieval call binding the contract method 0x3a5de07d. +// +// Solidity: function MESSENGER_ERC20_MIN_GAS_LIMIT() view returns(uint32) +func (_JBSucker *JBSuckerSession) MESSENGERERC20MINGASLIMIT() (uint32, error) { + return _JBSucker.Contract.MESSENGERERC20MINGASLIMIT(&_JBSucker.CallOpts) +} + +// MESSENGERERC20MINGASLIMIT is a free data retrieval call binding the contract method 0x3a5de07d. +// +// Solidity: function MESSENGER_ERC20_MIN_GAS_LIMIT() view returns(uint32) +func (_JBSucker *JBSuckerCallerSession) MESSENGERERC20MINGASLIMIT() (uint32, error) { + return _JBSucker.Contract.MESSENGERERC20MINGASLIMIT(&_JBSucker.CallOpts) +} + +// PERMISSIONS is a free data retrieval call binding the contract method 0xf434c914. +// +// Solidity: function PERMISSIONS() view returns(address) +func (_JBSucker *JBSuckerCaller) PERMISSIONS(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _JBSucker.contract.Call(opts, &out, "PERMISSIONS") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// PERMISSIONS is a free data retrieval call binding the contract method 0xf434c914. +// +// Solidity: function PERMISSIONS() view returns(address) +func (_JBSucker *JBSuckerSession) PERMISSIONS() (common.Address, error) { + return _JBSucker.Contract.PERMISSIONS(&_JBSucker.CallOpts) +} + +// PERMISSIONS is a free data retrieval call binding the contract method 0xf434c914. +// +// Solidity: function PERMISSIONS() view returns(address) +func (_JBSucker *JBSuckerCallerSession) PERMISSIONS() (common.Address, error) { + return _JBSucker.Contract.PERMISSIONS(&_JBSucker.CallOpts) +} + +// TOKENS is a free data retrieval call binding the contract method 0x1d831d5c. +// +// Solidity: function TOKENS() view returns(address) +func (_JBSucker *JBSuckerCaller) TOKENS(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _JBSucker.contract.Call(opts, &out, "TOKENS") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// TOKENS is a free data retrieval call binding the contract method 0x1d831d5c. +// +// Solidity: function TOKENS() view returns(address) +func (_JBSucker *JBSuckerSession) TOKENS() (common.Address, error) { + return _JBSucker.Contract.TOKENS(&_JBSucker.CallOpts) +} + +// TOKENS is a free data retrieval call binding the contract method 0x1d831d5c. +// +// Solidity: function TOKENS() view returns(address) +func (_JBSucker *JBSuckerCallerSession) TOKENS() (common.Address, error) { + return _JBSucker.Contract.TOKENS(&_JBSucker.CallOpts) +} + +// AmountToAddToBalanceOf is a free data retrieval call binding the contract method 0x9e6d7d43. +// +// Solidity: function amountToAddToBalanceOf(address token) view returns(uint256) +func (_JBSucker *JBSuckerCaller) AmountToAddToBalanceOf(opts *bind.CallOpts, token common.Address) (*big.Int, error) { + var out []interface{} + err := _JBSucker.contract.Call(opts, &out, "amountToAddToBalanceOf", token) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// AmountToAddToBalanceOf is a free data retrieval call binding the contract method 0x9e6d7d43. +// +// Solidity: function amountToAddToBalanceOf(address token) view returns(uint256) +func (_JBSucker *JBSuckerSession) AmountToAddToBalanceOf(token common.Address) (*big.Int, error) { + return _JBSucker.Contract.AmountToAddToBalanceOf(&_JBSucker.CallOpts, token) +} + +// AmountToAddToBalanceOf is a free data retrieval call binding the contract method 0x9e6d7d43. +// +// Solidity: function amountToAddToBalanceOf(address token) view returns(uint256) +func (_JBSucker *JBSuckerCallerSession) AmountToAddToBalanceOf(token common.Address) (*big.Int, error) { + return _JBSucker.Contract.AmountToAddToBalanceOf(&_JBSucker.CallOpts, token) +} + +// InboxOf is a free data retrieval call binding the contract method 0x6d9e384b. +// +// Solidity: function inboxOf(address token) view returns((uint64,bytes32)) +func (_JBSucker *JBSuckerCaller) InboxOf(opts *bind.CallOpts, token common.Address) (JBInboxTreeRoot, error) { + var out []interface{} + err := _JBSucker.contract.Call(opts, &out, "inboxOf", token) + + if err != nil { + return *new(JBInboxTreeRoot), err + } + + out0 := *abi.ConvertType(out[0], new(JBInboxTreeRoot)).(*JBInboxTreeRoot) + + return out0, err + +} + +// InboxOf is a free data retrieval call binding the contract method 0x6d9e384b. +// +// Solidity: function inboxOf(address token) view returns((uint64,bytes32)) +func (_JBSucker *JBSuckerSession) InboxOf(token common.Address) (JBInboxTreeRoot, error) { + return _JBSucker.Contract.InboxOf(&_JBSucker.CallOpts, token) +} + +// InboxOf is a free data retrieval call binding the contract method 0x6d9e384b. +// +// Solidity: function inboxOf(address token) view returns((uint64,bytes32)) +func (_JBSucker *JBSuckerCallerSession) InboxOf(token common.Address) (JBInboxTreeRoot, error) { + return _JBSucker.Contract.InboxOf(&_JBSucker.CallOpts, token) +} + +// IsMapped is a free data retrieval call binding the contract method 0xbf557aee. +// +// Solidity: function isMapped(address token) view returns(bool) +func (_JBSucker *JBSuckerCaller) IsMapped(opts *bind.CallOpts, token common.Address) (bool, error) { + var out []interface{} + err := _JBSucker.contract.Call(opts, &out, "isMapped", token) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsMapped is a free data retrieval call binding the contract method 0xbf557aee. +// +// Solidity: function isMapped(address token) view returns(bool) +func (_JBSucker *JBSuckerSession) IsMapped(token common.Address) (bool, error) { + return _JBSucker.Contract.IsMapped(&_JBSucker.CallOpts, token) +} + +// IsMapped is a free data retrieval call binding the contract method 0xbf557aee. +// +// Solidity: function isMapped(address token) view returns(bool) +func (_JBSucker *JBSuckerCallerSession) IsMapped(token common.Address) (bool, error) { + return _JBSucker.Contract.IsMapped(&_JBSucker.CallOpts, token) +} + +// IsTrustedForwarder is a free data retrieval call binding the contract method 0x572b6c05. +// +// Solidity: function isTrustedForwarder(address forwarder) view returns(bool) +func (_JBSucker *JBSuckerCaller) IsTrustedForwarder(opts *bind.CallOpts, forwarder common.Address) (bool, error) { + var out []interface{} + err := _JBSucker.contract.Call(opts, &out, "isTrustedForwarder", forwarder) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsTrustedForwarder is a free data retrieval call binding the contract method 0x572b6c05. +// +// Solidity: function isTrustedForwarder(address forwarder) view returns(bool) +func (_JBSucker *JBSuckerSession) IsTrustedForwarder(forwarder common.Address) (bool, error) { + return _JBSucker.Contract.IsTrustedForwarder(&_JBSucker.CallOpts, forwarder) +} + +// IsTrustedForwarder is a free data retrieval call binding the contract method 0x572b6c05. +// +// Solidity: function isTrustedForwarder(address forwarder) view returns(bool) +func (_JBSucker *JBSuckerCallerSession) IsTrustedForwarder(forwarder common.Address) (bool, error) { + return _JBSucker.Contract.IsTrustedForwarder(&_JBSucker.CallOpts, forwarder) +} + +// OutboxOf is a free data retrieval call binding the contract method 0x802c8fa0. +// +// Solidity: function outboxOf(address token) view returns((uint64,uint256,(bytes32[32],uint256),uint256)) +func (_JBSucker *JBSuckerCaller) OutboxOf(opts *bind.CallOpts, token common.Address) (JBOutboxTree, error) { + var out []interface{} + err := _JBSucker.contract.Call(opts, &out, "outboxOf", token) + + if err != nil { + return *new(JBOutboxTree), err + } + + out0 := *abi.ConvertType(out[0], new(JBOutboxTree)).(*JBOutboxTree) + + return out0, err + +} + +// OutboxOf is a free data retrieval call binding the contract method 0x802c8fa0. +// +// Solidity: function outboxOf(address token) view returns((uint64,uint256,(bytes32[32],uint256),uint256)) +func (_JBSucker *JBSuckerSession) OutboxOf(token common.Address) (JBOutboxTree, error) { + return _JBSucker.Contract.OutboxOf(&_JBSucker.CallOpts, token) +} + +// OutboxOf is a free data retrieval call binding the contract method 0x802c8fa0. +// +// Solidity: function outboxOf(address token) view returns((uint64,uint256,(bytes32[32],uint256),uint256)) +func (_JBSucker *JBSuckerCallerSession) OutboxOf(token common.Address) (JBOutboxTree, error) { + return _JBSucker.Contract.OutboxOf(&_JBSucker.CallOpts, token) +} + +// Peer is a free data retrieval call binding the contract method 0x11cda415. +// +// Solidity: function peer() view returns(address) +func (_JBSucker *JBSuckerCaller) Peer(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _JBSucker.contract.Call(opts, &out, "peer") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Peer is a free data retrieval call binding the contract method 0x11cda415. +// +// Solidity: function peer() view returns(address) +func (_JBSucker *JBSuckerSession) Peer() (common.Address, error) { + return _JBSucker.Contract.Peer(&_JBSucker.CallOpts) +} + +// Peer is a free data retrieval call binding the contract method 0x11cda415. +// +// Solidity: function peer() view returns(address) +func (_JBSucker *JBSuckerCallerSession) Peer() (common.Address, error) { + return _JBSucker.Contract.Peer(&_JBSucker.CallOpts) +} + +// PeerChainId is a free data retrieval call binding the contract method 0xcdfceeba. +// +// Solidity: function peerChainId() view returns(uint256) +func (_JBSucker *JBSuckerCaller) PeerChainId(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _JBSucker.contract.Call(opts, &out, "peerChainId") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// PeerChainId is a free data retrieval call binding the contract method 0xcdfceeba. +// +// Solidity: function peerChainId() view returns(uint256) +func (_JBSucker *JBSuckerSession) PeerChainId() (*big.Int, error) { + return _JBSucker.Contract.PeerChainId(&_JBSucker.CallOpts) +} + +// PeerChainId is a free data retrieval call binding the contract method 0xcdfceeba. +// +// Solidity: function peerChainId() view returns(uint256) +func (_JBSucker *JBSuckerCallerSession) PeerChainId() (*big.Int, error) { + return _JBSucker.Contract.PeerChainId(&_JBSucker.CallOpts) +} + +// ProjectId is a free data retrieval call binding the contract method 0x3fafa127. +// +// Solidity: function projectId() view returns(uint256) +func (_JBSucker *JBSuckerCaller) ProjectId(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _JBSucker.contract.Call(opts, &out, "projectId") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// ProjectId is a free data retrieval call binding the contract method 0x3fafa127. +// +// Solidity: function projectId() view returns(uint256) +func (_JBSucker *JBSuckerSession) ProjectId() (*big.Int, error) { + return _JBSucker.Contract.ProjectId(&_JBSucker.CallOpts) +} + +// ProjectId is a free data retrieval call binding the contract method 0x3fafa127. +// +// Solidity: function projectId() view returns(uint256) +func (_JBSucker *JBSuckerCallerSession) ProjectId() (*big.Int, error) { + return _JBSucker.Contract.ProjectId(&_JBSucker.CallOpts) +} + +// RemoteTokenFor is a free data retrieval call binding the contract method 0x7de6fba2. +// +// Solidity: function remoteTokenFor(address token) view returns((bool,bool,uint32,address,uint256)) +func (_JBSucker *JBSuckerCaller) RemoteTokenFor(opts *bind.CallOpts, token common.Address) (JBRemoteToken, error) { + var out []interface{} + err := _JBSucker.contract.Call(opts, &out, "remoteTokenFor", token) + + if err != nil { + return *new(JBRemoteToken), err + } + + out0 := *abi.ConvertType(out[0], new(JBRemoteToken)).(*JBRemoteToken) + + return out0, err + +} + +// RemoteTokenFor is a free data retrieval call binding the contract method 0x7de6fba2. +// +// Solidity: function remoteTokenFor(address token) view returns((bool,bool,uint32,address,uint256)) +func (_JBSucker *JBSuckerSession) RemoteTokenFor(token common.Address) (JBRemoteToken, error) { + return _JBSucker.Contract.RemoteTokenFor(&_JBSucker.CallOpts, token) +} + +// RemoteTokenFor is a free data retrieval call binding the contract method 0x7de6fba2. +// +// Solidity: function remoteTokenFor(address token) view returns((bool,bool,uint32,address,uint256)) +func (_JBSucker *JBSuckerCallerSession) RemoteTokenFor(token common.Address) (JBRemoteToken, error) { + return _JBSucker.Contract.RemoteTokenFor(&_JBSucker.CallOpts, token) +} + +// State is a free data retrieval call binding the contract method 0xc19d93fb. +// +// Solidity: function state() view returns(uint8) +func (_JBSucker *JBSuckerCaller) State(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _JBSucker.contract.Call(opts, &out, "state") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// State is a free data retrieval call binding the contract method 0xc19d93fb. +// +// Solidity: function state() view returns(uint8) +func (_JBSucker *JBSuckerSession) State() (uint8, error) { + return _JBSucker.Contract.State(&_JBSucker.CallOpts) +} + +// State is a free data retrieval call binding the contract method 0xc19d93fb. +// +// Solidity: function state() view returns(uint8) +func (_JBSucker *JBSuckerCallerSession) State() (uint8, error) { + return _JBSucker.Contract.State(&_JBSucker.CallOpts) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_JBSucker *JBSuckerCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { + var out []interface{} + err := _JBSucker.contract.Call(opts, &out, "supportsInterface", interfaceId) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_JBSucker *JBSuckerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _JBSucker.Contract.SupportsInterface(&_JBSucker.CallOpts, interfaceId) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_JBSucker *JBSuckerCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _JBSucker.Contract.SupportsInterface(&_JBSucker.CallOpts, interfaceId) +} + +// TrustedForwarder is a free data retrieval call binding the contract method 0x7da0a877. +// +// Solidity: function trustedForwarder() view returns(address) +func (_JBSucker *JBSuckerCaller) TrustedForwarder(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _JBSucker.contract.Call(opts, &out, "trustedForwarder") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// TrustedForwarder is a free data retrieval call binding the contract method 0x7da0a877. +// +// Solidity: function trustedForwarder() view returns(address) +func (_JBSucker *JBSuckerSession) TrustedForwarder() (common.Address, error) { + return _JBSucker.Contract.TrustedForwarder(&_JBSucker.CallOpts) +} + +// TrustedForwarder is a free data retrieval call binding the contract method 0x7da0a877. +// +// Solidity: function trustedForwarder() view returns(address) +func (_JBSucker *JBSuckerCallerSession) TrustedForwarder() (common.Address, error) { + return _JBSucker.Contract.TrustedForwarder(&_JBSucker.CallOpts) +} + +// AddOutstandingAmountToBalance is a paid mutator transaction binding the contract method 0x69ce2233. +// +// Solidity: function addOutstandingAmountToBalance(address token) returns() +func (_JBSucker *JBSuckerTransactor) AddOutstandingAmountToBalance(opts *bind.TransactOpts, token common.Address) (*types.Transaction, error) { + return _JBSucker.contract.Transact(opts, "addOutstandingAmountToBalance", token) +} + +// AddOutstandingAmountToBalance is a paid mutator transaction binding the contract method 0x69ce2233. +// +// Solidity: function addOutstandingAmountToBalance(address token) returns() +func (_JBSucker *JBSuckerSession) AddOutstandingAmountToBalance(token common.Address) (*types.Transaction, error) { + return _JBSucker.Contract.AddOutstandingAmountToBalance(&_JBSucker.TransactOpts, token) +} + +// AddOutstandingAmountToBalance is a paid mutator transaction binding the contract method 0x69ce2233. +// +// Solidity: function addOutstandingAmountToBalance(address token) returns() +func (_JBSucker *JBSuckerTransactorSession) AddOutstandingAmountToBalance(token common.Address) (*types.Transaction, error) { + return _JBSucker.Contract.AddOutstandingAmountToBalance(&_JBSucker.TransactOpts, token) +} + +// Claim is a paid mutator transaction binding the contract method 0xb59ef50f. +// +// Solidity: function claim((address,(uint256,address,uint256,uint256),bytes32[32]) claimData) returns() +func (_JBSucker *JBSuckerTransactor) Claim(opts *bind.TransactOpts, claimData JBClaim) (*types.Transaction, error) { + return _JBSucker.contract.Transact(opts, "claim", claimData) +} + +// Claim is a paid mutator transaction binding the contract method 0xb59ef50f. +// +// Solidity: function claim((address,(uint256,address,uint256,uint256),bytes32[32]) claimData) returns() +func (_JBSucker *JBSuckerSession) Claim(claimData JBClaim) (*types.Transaction, error) { + return _JBSucker.Contract.Claim(&_JBSucker.TransactOpts, claimData) +} + +// Claim is a paid mutator transaction binding the contract method 0xb59ef50f. +// +// Solidity: function claim((address,(uint256,address,uint256,uint256),bytes32[32]) claimData) returns() +func (_JBSucker *JBSuckerTransactorSession) Claim(claimData JBClaim) (*types.Transaction, error) { + return _JBSucker.Contract.Claim(&_JBSucker.TransactOpts, claimData) +} + +// Claim0 is a paid mutator transaction binding the contract method 0xc1854129. +// +// Solidity: function claim((address,(uint256,address,uint256,uint256),bytes32[32])[] claims) returns() +func (_JBSucker *JBSuckerTransactor) Claim0(opts *bind.TransactOpts, claims []JBClaim) (*types.Transaction, error) { + return _JBSucker.contract.Transact(opts, "claim0", claims) +} + +// Claim0 is a paid mutator transaction binding the contract method 0xc1854129. +// +// Solidity: function claim((address,(uint256,address,uint256,uint256),bytes32[32])[] claims) returns() +func (_JBSucker *JBSuckerSession) Claim0(claims []JBClaim) (*types.Transaction, error) { + return _JBSucker.Contract.Claim0(&_JBSucker.TransactOpts, claims) +} + +// Claim0 is a paid mutator transaction binding the contract method 0xc1854129. +// +// Solidity: function claim((address,(uint256,address,uint256,uint256),bytes32[32])[] claims) returns() +func (_JBSucker *JBSuckerTransactorSession) Claim0(claims []JBClaim) (*types.Transaction, error) { + return _JBSucker.Contract.Claim0(&_JBSucker.TransactOpts, claims) +} + +// EnableEmergencyHatchFor is a paid mutator transaction binding the contract method 0x75451559. +// +// Solidity: function enableEmergencyHatchFor(address[] tokens) returns() +func (_JBSucker *JBSuckerTransactor) EnableEmergencyHatchFor(opts *bind.TransactOpts, tokens []common.Address) (*types.Transaction, error) { + return _JBSucker.contract.Transact(opts, "enableEmergencyHatchFor", tokens) +} + +// EnableEmergencyHatchFor is a paid mutator transaction binding the contract method 0x75451559. +// +// Solidity: function enableEmergencyHatchFor(address[] tokens) returns() +func (_JBSucker *JBSuckerSession) EnableEmergencyHatchFor(tokens []common.Address) (*types.Transaction, error) { + return _JBSucker.Contract.EnableEmergencyHatchFor(&_JBSucker.TransactOpts, tokens) +} + +// EnableEmergencyHatchFor is a paid mutator transaction binding the contract method 0x75451559. +// +// Solidity: function enableEmergencyHatchFor(address[] tokens) returns() +func (_JBSucker *JBSuckerTransactorSession) EnableEmergencyHatchFor(tokens []common.Address) (*types.Transaction, error) { + return _JBSucker.Contract.EnableEmergencyHatchFor(&_JBSucker.TransactOpts, tokens) +} + +// ExitThroughEmergencyHatch is a paid mutator transaction binding the contract method 0x0f648214. +// +// Solidity: function exitThroughEmergencyHatch((address,(uint256,address,uint256,uint256),bytes32[32]) claimData) returns() +func (_JBSucker *JBSuckerTransactor) ExitThroughEmergencyHatch(opts *bind.TransactOpts, claimData JBClaim) (*types.Transaction, error) { + return _JBSucker.contract.Transact(opts, "exitThroughEmergencyHatch", claimData) +} + +// ExitThroughEmergencyHatch is a paid mutator transaction binding the contract method 0x0f648214. +// +// Solidity: function exitThroughEmergencyHatch((address,(uint256,address,uint256,uint256),bytes32[32]) claimData) returns() +func (_JBSucker *JBSuckerSession) ExitThroughEmergencyHatch(claimData JBClaim) (*types.Transaction, error) { + return _JBSucker.Contract.ExitThroughEmergencyHatch(&_JBSucker.TransactOpts, claimData) +} + +// ExitThroughEmergencyHatch is a paid mutator transaction binding the contract method 0x0f648214. +// +// Solidity: function exitThroughEmergencyHatch((address,(uint256,address,uint256,uint256),bytes32[32]) claimData) returns() +func (_JBSucker *JBSuckerTransactorSession) ExitThroughEmergencyHatch(claimData JBClaim) (*types.Transaction, error) { + return _JBSucker.Contract.ExitThroughEmergencyHatch(&_JBSucker.TransactOpts, claimData) +} + +// FromRemote is a paid mutator transaction binding the contract method 0x69d31fdd. +// +// Solidity: function fromRemote((address,uint256,(uint64,bytes32)) root) payable returns() +func (_JBSucker *JBSuckerTransactor) FromRemote(opts *bind.TransactOpts, root JBMessageRoot) (*types.Transaction, error) { + return _JBSucker.contract.Transact(opts, "fromRemote", root) +} + +// FromRemote is a paid mutator transaction binding the contract method 0x69d31fdd. +// +// Solidity: function fromRemote((address,uint256,(uint64,bytes32)) root) payable returns() +func (_JBSucker *JBSuckerSession) FromRemote(root JBMessageRoot) (*types.Transaction, error) { + return _JBSucker.Contract.FromRemote(&_JBSucker.TransactOpts, root) +} + +// FromRemote is a paid mutator transaction binding the contract method 0x69d31fdd. +// +// Solidity: function fromRemote((address,uint256,(uint64,bytes32)) root) payable returns() +func (_JBSucker *JBSuckerTransactorSession) FromRemote(root JBMessageRoot) (*types.Transaction, error) { + return _JBSucker.Contract.FromRemote(&_JBSucker.TransactOpts, root) +} + +// Initialize is a paid mutator transaction binding the contract method 0xfe4b84df. +// +// Solidity: function initialize(uint256 __projectId) returns() +func (_JBSucker *JBSuckerTransactor) Initialize(opts *bind.TransactOpts, __projectId *big.Int) (*types.Transaction, error) { + return _JBSucker.contract.Transact(opts, "initialize", __projectId) +} + +// Initialize is a paid mutator transaction binding the contract method 0xfe4b84df. +// +// Solidity: function initialize(uint256 __projectId) returns() +func (_JBSucker *JBSuckerSession) Initialize(__projectId *big.Int) (*types.Transaction, error) { + return _JBSucker.Contract.Initialize(&_JBSucker.TransactOpts, __projectId) +} + +// Initialize is a paid mutator transaction binding the contract method 0xfe4b84df. +// +// Solidity: function initialize(uint256 __projectId) returns() +func (_JBSucker *JBSuckerTransactorSession) Initialize(__projectId *big.Int) (*types.Transaction, error) { + return _JBSucker.Contract.Initialize(&_JBSucker.TransactOpts, __projectId) +} + +// MapToken is a paid mutator transaction binding the contract method 0x38eb2044. +// +// Solidity: function mapToken((address,uint32,address,uint256) map) payable returns() +func (_JBSucker *JBSuckerTransactor) MapToken(opts *bind.TransactOpts, arg0 JBTokenMapping) (*types.Transaction, error) { + return _JBSucker.contract.Transact(opts, "mapToken", arg0) +} + +// MapToken is a paid mutator transaction binding the contract method 0x38eb2044. +// +// Solidity: function mapToken((address,uint32,address,uint256) map) payable returns() +func (_JBSucker *JBSuckerSession) MapToken(arg0 JBTokenMapping) (*types.Transaction, error) { + return _JBSucker.Contract.MapToken(&_JBSucker.TransactOpts, arg0) +} + +// MapToken is a paid mutator transaction binding the contract method 0x38eb2044. +// +// Solidity: function mapToken((address,uint32,address,uint256) map) payable returns() +func (_JBSucker *JBSuckerTransactorSession) MapToken(arg0 JBTokenMapping) (*types.Transaction, error) { + return _JBSucker.Contract.MapToken(&_JBSucker.TransactOpts, arg0) +} + +// MapTokens is a paid mutator transaction binding the contract method 0x2241dc52. +// +// Solidity: function mapTokens((address,uint32,address,uint256)[] maps) payable returns() +func (_JBSucker *JBSuckerTransactor) MapTokens(opts *bind.TransactOpts, maps []JBTokenMapping) (*types.Transaction, error) { + return _JBSucker.contract.Transact(opts, "mapTokens", maps) +} + +// MapTokens is a paid mutator transaction binding the contract method 0x2241dc52. +// +// Solidity: function mapTokens((address,uint32,address,uint256)[] maps) payable returns() +func (_JBSucker *JBSuckerSession) MapTokens(maps []JBTokenMapping) (*types.Transaction, error) { + return _JBSucker.Contract.MapTokens(&_JBSucker.TransactOpts, maps) +} + +// MapTokens is a paid mutator transaction binding the contract method 0x2241dc52. +// +// Solidity: function mapTokens((address,uint32,address,uint256)[] maps) payable returns() +func (_JBSucker *JBSuckerTransactorSession) MapTokens(maps []JBTokenMapping) (*types.Transaction, error) { + return _JBSucker.Contract.MapTokens(&_JBSucker.TransactOpts, maps) +} + +// Prepare is a paid mutator transaction binding the contract method 0x551ebbf0. +// +// Solidity: function prepare(uint256 projectTokenCount, address beneficiary, uint256 minTokensReclaimed, address token) returns() +func (_JBSucker *JBSuckerTransactor) Prepare(opts *bind.TransactOpts, projectTokenCount *big.Int, beneficiary common.Address, minTokensReclaimed *big.Int, token common.Address) (*types.Transaction, error) { + return _JBSucker.contract.Transact(opts, "prepare", projectTokenCount, beneficiary, minTokensReclaimed, token) +} + +// Prepare is a paid mutator transaction binding the contract method 0x551ebbf0. +// +// Solidity: function prepare(uint256 projectTokenCount, address beneficiary, uint256 minTokensReclaimed, address token) returns() +func (_JBSucker *JBSuckerSession) Prepare(projectTokenCount *big.Int, beneficiary common.Address, minTokensReclaimed *big.Int, token common.Address) (*types.Transaction, error) { + return _JBSucker.Contract.Prepare(&_JBSucker.TransactOpts, projectTokenCount, beneficiary, minTokensReclaimed, token) +} + +// Prepare is a paid mutator transaction binding the contract method 0x551ebbf0. +// +// Solidity: function prepare(uint256 projectTokenCount, address beneficiary, uint256 minTokensReclaimed, address token) returns() +func (_JBSucker *JBSuckerTransactorSession) Prepare(projectTokenCount *big.Int, beneficiary common.Address, minTokensReclaimed *big.Int, token common.Address) (*types.Transaction, error) { + return _JBSucker.Contract.Prepare(&_JBSucker.TransactOpts, projectTokenCount, beneficiary, minTokensReclaimed, token) +} + +// SetDeprecation is a paid mutator transaction binding the contract method 0x6284386a. +// +// Solidity: function setDeprecation(uint40 timestamp) returns() +func (_JBSucker *JBSuckerTransactor) SetDeprecation(opts *bind.TransactOpts, timestamp *big.Int) (*types.Transaction, error) { + return _JBSucker.contract.Transact(opts, "setDeprecation", timestamp) +} + +// SetDeprecation is a paid mutator transaction binding the contract method 0x6284386a. +// +// Solidity: function setDeprecation(uint40 timestamp) returns() +func (_JBSucker *JBSuckerSession) SetDeprecation(timestamp *big.Int) (*types.Transaction, error) { + return _JBSucker.Contract.SetDeprecation(&_JBSucker.TransactOpts, timestamp) +} + +// SetDeprecation is a paid mutator transaction binding the contract method 0x6284386a. +// +// Solidity: function setDeprecation(uint40 timestamp) returns() +func (_JBSucker *JBSuckerTransactorSession) SetDeprecation(timestamp *big.Int) (*types.Transaction, error) { + return _JBSucker.Contract.SetDeprecation(&_JBSucker.TransactOpts, timestamp) +} + +// ToRemote is a paid mutator transaction binding the contract method 0xb71c1179. +// +// Solidity: function toRemote(address token) payable returns() +func (_JBSucker *JBSuckerTransactor) ToRemote(opts *bind.TransactOpts, token common.Address) (*types.Transaction, error) { + return _JBSucker.contract.Transact(opts, "toRemote", token) +} + +// ToRemote is a paid mutator transaction binding the contract method 0xb71c1179. +// +// Solidity: function toRemote(address token) payable returns() +func (_JBSucker *JBSuckerSession) ToRemote(token common.Address) (*types.Transaction, error) { + return _JBSucker.Contract.ToRemote(&_JBSucker.TransactOpts, token) +} + +// ToRemote is a paid mutator transaction binding the contract method 0xb71c1179. +// +// Solidity: function toRemote(address token) payable returns() +func (_JBSucker *JBSuckerTransactorSession) ToRemote(token common.Address) (*types.Transaction, error) { + return _JBSucker.Contract.ToRemote(&_JBSucker.TransactOpts, token) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_JBSucker *JBSuckerTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _JBSucker.contract.RawTransact(opts, nil) // calldata is disallowed for receive function +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_JBSucker *JBSuckerSession) Receive() (*types.Transaction, error) { + return _JBSucker.Contract.Receive(&_JBSucker.TransactOpts) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_JBSucker *JBSuckerTransactorSession) Receive() (*types.Transaction, error) { + return _JBSucker.Contract.Receive(&_JBSucker.TransactOpts) +} + +// JBSuckerClaimedIterator is returned from FilterClaimed and is used to iterate over the raw logs and unpacked data for Claimed events raised by the JBSucker contract. +type JBSuckerClaimedIterator struct { + Event *JBSuckerClaimed // 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 *JBSuckerClaimedIterator) 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(JBSuckerClaimed) + 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(JBSuckerClaimed) + 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 *JBSuckerClaimedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *JBSuckerClaimedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// JBSuckerClaimed represents a Claimed event raised by the JBSucker contract. +type JBSuckerClaimed struct { + Beneficiary common.Address + Token common.Address + ProjectTokenCount *big.Int + TerminalTokenAmount *big.Int + Index *big.Int + AutoAddedToBalance bool + Caller common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterClaimed is a free log retrieval operation binding the contract event 0xaaca6f6829d340365b5e6599e0d513cbb4602b94f58ccf16ac77d8d3ae7139ef. +// +// Solidity: event Claimed(address beneficiary, address token, uint256 projectTokenCount, uint256 terminalTokenAmount, uint256 index, bool autoAddedToBalance, address caller) +func (_JBSucker *JBSuckerFilterer) FilterClaimed(opts *bind.FilterOpts) (*JBSuckerClaimedIterator, error) { + + logs, sub, err := _JBSucker.contract.FilterLogs(opts, "Claimed") + if err != nil { + return nil, err + } + return &JBSuckerClaimedIterator{contract: _JBSucker.contract, event: "Claimed", logs: logs, sub: sub}, nil +} + +// WatchClaimed is a free log subscription operation binding the contract event 0xaaca6f6829d340365b5e6599e0d513cbb4602b94f58ccf16ac77d8d3ae7139ef. +// +// Solidity: event Claimed(address beneficiary, address token, uint256 projectTokenCount, uint256 terminalTokenAmount, uint256 index, bool autoAddedToBalance, address caller) +func (_JBSucker *JBSuckerFilterer) WatchClaimed(opts *bind.WatchOpts, sink chan<- *JBSuckerClaimed) (event.Subscription, error) { + + logs, sub, err := _JBSucker.contract.WatchLogs(opts, "Claimed") + 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(JBSuckerClaimed) + if err := _JBSucker.contract.UnpackLog(event, "Claimed", 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 +} + +// ParseClaimed is a log parse operation binding the contract event 0xaaca6f6829d340365b5e6599e0d513cbb4602b94f58ccf16ac77d8d3ae7139ef. +// +// Solidity: event Claimed(address beneficiary, address token, uint256 projectTokenCount, uint256 terminalTokenAmount, uint256 index, bool autoAddedToBalance, address caller) +func (_JBSucker *JBSuckerFilterer) ParseClaimed(log types.Log) (*JBSuckerClaimed, error) { + event := new(JBSuckerClaimed) + if err := _JBSucker.contract.UnpackLog(event, "Claimed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// JBSuckerDeprecationTimeUpdatedIterator is returned from FilterDeprecationTimeUpdated and is used to iterate over the raw logs and unpacked data for DeprecationTimeUpdated events raised by the JBSucker contract. +type JBSuckerDeprecationTimeUpdatedIterator struct { + Event *JBSuckerDeprecationTimeUpdated // 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 *JBSuckerDeprecationTimeUpdatedIterator) 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(JBSuckerDeprecationTimeUpdated) + 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(JBSuckerDeprecationTimeUpdated) + 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 *JBSuckerDeprecationTimeUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *JBSuckerDeprecationTimeUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// JBSuckerDeprecationTimeUpdated represents a DeprecationTimeUpdated event raised by the JBSucker contract. +type JBSuckerDeprecationTimeUpdated struct { + Timestamp *big.Int + Caller common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDeprecationTimeUpdated is a free log retrieval operation binding the contract event 0x455efa76af2a8686dc0dd3041bda89ece5ba4691277d525e2161003bbca8b245. +// +// Solidity: event DeprecationTimeUpdated(uint40 timestamp, address caller) +func (_JBSucker *JBSuckerFilterer) FilterDeprecationTimeUpdated(opts *bind.FilterOpts) (*JBSuckerDeprecationTimeUpdatedIterator, error) { + + logs, sub, err := _JBSucker.contract.FilterLogs(opts, "DeprecationTimeUpdated") + if err != nil { + return nil, err + } + return &JBSuckerDeprecationTimeUpdatedIterator{contract: _JBSucker.contract, event: "DeprecationTimeUpdated", logs: logs, sub: sub}, nil +} + +// WatchDeprecationTimeUpdated is a free log subscription operation binding the contract event 0x455efa76af2a8686dc0dd3041bda89ece5ba4691277d525e2161003bbca8b245. +// +// Solidity: event DeprecationTimeUpdated(uint40 timestamp, address caller) +func (_JBSucker *JBSuckerFilterer) WatchDeprecationTimeUpdated(opts *bind.WatchOpts, sink chan<- *JBSuckerDeprecationTimeUpdated) (event.Subscription, error) { + + logs, sub, err := _JBSucker.contract.WatchLogs(opts, "DeprecationTimeUpdated") + 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(JBSuckerDeprecationTimeUpdated) + if err := _JBSucker.contract.UnpackLog(event, "DeprecationTimeUpdated", 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 +} + +// ParseDeprecationTimeUpdated is a log parse operation binding the contract event 0x455efa76af2a8686dc0dd3041bda89ece5ba4691277d525e2161003bbca8b245. +// +// Solidity: event DeprecationTimeUpdated(uint40 timestamp, address caller) +func (_JBSucker *JBSuckerFilterer) ParseDeprecationTimeUpdated(log types.Log) (*JBSuckerDeprecationTimeUpdated, error) { + event := new(JBSuckerDeprecationTimeUpdated) + if err := _JBSucker.contract.UnpackLog(event, "DeprecationTimeUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// JBSuckerEmergencyHatchOpenedIterator is returned from FilterEmergencyHatchOpened and is used to iterate over the raw logs and unpacked data for EmergencyHatchOpened events raised by the JBSucker contract. +type JBSuckerEmergencyHatchOpenedIterator struct { + Event *JBSuckerEmergencyHatchOpened // 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 *JBSuckerEmergencyHatchOpenedIterator) 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(JBSuckerEmergencyHatchOpened) + 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(JBSuckerEmergencyHatchOpened) + 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 *JBSuckerEmergencyHatchOpenedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *JBSuckerEmergencyHatchOpenedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// JBSuckerEmergencyHatchOpened represents a EmergencyHatchOpened event raised by the JBSucker contract. +type JBSuckerEmergencyHatchOpened struct { + Tokens []common.Address + Caller common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterEmergencyHatchOpened is a free log retrieval operation binding the contract event 0x8021bce60b20a9afb57085869a3552e0ee5b272b868df894fb30c5e90e74c072. +// +// Solidity: event EmergencyHatchOpened(address[] tokens, address caller) +func (_JBSucker *JBSuckerFilterer) FilterEmergencyHatchOpened(opts *bind.FilterOpts) (*JBSuckerEmergencyHatchOpenedIterator, error) { + + logs, sub, err := _JBSucker.contract.FilterLogs(opts, "EmergencyHatchOpened") + if err != nil { + return nil, err + } + return &JBSuckerEmergencyHatchOpenedIterator{contract: _JBSucker.contract, event: "EmergencyHatchOpened", logs: logs, sub: sub}, nil +} + +// WatchEmergencyHatchOpened is a free log subscription operation binding the contract event 0x8021bce60b20a9afb57085869a3552e0ee5b272b868df894fb30c5e90e74c072. +// +// Solidity: event EmergencyHatchOpened(address[] tokens, address caller) +func (_JBSucker *JBSuckerFilterer) WatchEmergencyHatchOpened(opts *bind.WatchOpts, sink chan<- *JBSuckerEmergencyHatchOpened) (event.Subscription, error) { + + logs, sub, err := _JBSucker.contract.WatchLogs(opts, "EmergencyHatchOpened") + 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(JBSuckerEmergencyHatchOpened) + if err := _JBSucker.contract.UnpackLog(event, "EmergencyHatchOpened", 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 +} + +// ParseEmergencyHatchOpened is a log parse operation binding the contract event 0x8021bce60b20a9afb57085869a3552e0ee5b272b868df894fb30c5e90e74c072. +// +// Solidity: event EmergencyHatchOpened(address[] tokens, address caller) +func (_JBSucker *JBSuckerFilterer) ParseEmergencyHatchOpened(log types.Log) (*JBSuckerEmergencyHatchOpened, error) { + event := new(JBSuckerEmergencyHatchOpened) + if err := _JBSucker.contract.UnpackLog(event, "EmergencyHatchOpened", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// JBSuckerInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the JBSucker contract. +type JBSuckerInitializedIterator struct { + Event *JBSuckerInitialized // 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 *JBSuckerInitializedIterator) 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(JBSuckerInitialized) + 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(JBSuckerInitialized) + 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 *JBSuckerInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *JBSuckerInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// JBSuckerInitialized represents a Initialized event raised by the JBSucker contract. +type JBSuckerInitialized struct { + Version uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_JBSucker *JBSuckerFilterer) FilterInitialized(opts *bind.FilterOpts) (*JBSuckerInitializedIterator, error) { + + logs, sub, err := _JBSucker.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &JBSuckerInitializedIterator{contract: _JBSucker.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_JBSucker *JBSuckerFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *JBSuckerInitialized) (event.Subscription, error) { + + logs, sub, err := _JBSucker.contract.WatchLogs(opts, "Initialized") + 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(JBSuckerInitialized) + if err := _JBSucker.contract.UnpackLog(event, "Initialized", 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 +} + +// ParseInitialized is a log parse operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_JBSucker *JBSuckerFilterer) ParseInitialized(log types.Log) (*JBSuckerInitialized, error) { + event := new(JBSuckerInitialized) + if err := _JBSucker.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// JBSuckerInsertToOutboxTreeIterator is returned from FilterInsertToOutboxTree and is used to iterate over the raw logs and unpacked data for InsertToOutboxTree events raised by the JBSucker contract. +type JBSuckerInsertToOutboxTreeIterator struct { + Event *JBSuckerInsertToOutboxTree // 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 *JBSuckerInsertToOutboxTreeIterator) 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(JBSuckerInsertToOutboxTree) + 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(JBSuckerInsertToOutboxTree) + 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 *JBSuckerInsertToOutboxTreeIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *JBSuckerInsertToOutboxTreeIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// JBSuckerInsertToOutboxTree represents a InsertToOutboxTree event raised by the JBSucker contract. +type JBSuckerInsertToOutboxTree struct { + Beneficiary common.Address + Token common.Address + Hashed [32]byte + Index *big.Int + Root [32]byte + ProjectTokenCount *big.Int + TerminalTokenAmount *big.Int + Caller common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInsertToOutboxTree is a free log retrieval operation binding the contract event 0x584a41ff082fad99bb6e50c5767c347c762057fe5726539f0a8de49d84549c23. +// +// Solidity: event InsertToOutboxTree(address indexed beneficiary, address indexed token, bytes32 hashed, uint256 index, bytes32 root, uint256 projectTokenCount, uint256 terminalTokenAmount, address caller) +func (_JBSucker *JBSuckerFilterer) FilterInsertToOutboxTree(opts *bind.FilterOpts, beneficiary []common.Address, token []common.Address) (*JBSuckerInsertToOutboxTreeIterator, error) { + + var beneficiaryRule []interface{} + for _, beneficiaryItem := range beneficiary { + beneficiaryRule = append(beneficiaryRule, beneficiaryItem) + } + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _JBSucker.contract.FilterLogs(opts, "InsertToOutboxTree", beneficiaryRule, tokenRule) + if err != nil { + return nil, err + } + return &JBSuckerInsertToOutboxTreeIterator{contract: _JBSucker.contract, event: "InsertToOutboxTree", logs: logs, sub: sub}, nil +} + +// WatchInsertToOutboxTree is a free log subscription operation binding the contract event 0x584a41ff082fad99bb6e50c5767c347c762057fe5726539f0a8de49d84549c23. +// +// Solidity: event InsertToOutboxTree(address indexed beneficiary, address indexed token, bytes32 hashed, uint256 index, bytes32 root, uint256 projectTokenCount, uint256 terminalTokenAmount, address caller) +func (_JBSucker *JBSuckerFilterer) WatchInsertToOutboxTree(opts *bind.WatchOpts, sink chan<- *JBSuckerInsertToOutboxTree, beneficiary []common.Address, token []common.Address) (event.Subscription, error) { + + var beneficiaryRule []interface{} + for _, beneficiaryItem := range beneficiary { + beneficiaryRule = append(beneficiaryRule, beneficiaryItem) + } + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _JBSucker.contract.WatchLogs(opts, "InsertToOutboxTree", beneficiaryRule, tokenRule) + 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(JBSuckerInsertToOutboxTree) + if err := _JBSucker.contract.UnpackLog(event, "InsertToOutboxTree", 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 +} + +// ParseInsertToOutboxTree is a log parse operation binding the contract event 0x584a41ff082fad99bb6e50c5767c347c762057fe5726539f0a8de49d84549c23. +// +// Solidity: event InsertToOutboxTree(address indexed beneficiary, address indexed token, bytes32 hashed, uint256 index, bytes32 root, uint256 projectTokenCount, uint256 terminalTokenAmount, address caller) +func (_JBSucker *JBSuckerFilterer) ParseInsertToOutboxTree(log types.Log) (*JBSuckerInsertToOutboxTree, error) { + event := new(JBSuckerInsertToOutboxTree) + if err := _JBSucker.contract.UnpackLog(event, "InsertToOutboxTree", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// JBSuckerNewInboxTreeRootIterator is returned from FilterNewInboxTreeRoot and is used to iterate over the raw logs and unpacked data for NewInboxTreeRoot events raised by the JBSucker contract. +type JBSuckerNewInboxTreeRootIterator struct { + Event *JBSuckerNewInboxTreeRoot // 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 *JBSuckerNewInboxTreeRootIterator) 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(JBSuckerNewInboxTreeRoot) + 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(JBSuckerNewInboxTreeRoot) + 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 *JBSuckerNewInboxTreeRootIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *JBSuckerNewInboxTreeRootIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// JBSuckerNewInboxTreeRoot represents a NewInboxTreeRoot event raised by the JBSucker contract. +type JBSuckerNewInboxTreeRoot struct { + Token common.Address + Nonce uint64 + Root [32]byte + Caller common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterNewInboxTreeRoot is a free log retrieval operation binding the contract event 0xc69d3412489554fb7820c4c2784cb644b6c79bfc117444b93977d3d33a9b8eac. +// +// Solidity: event NewInboxTreeRoot(address indexed token, uint64 nonce, bytes32 root, address caller) +func (_JBSucker *JBSuckerFilterer) FilterNewInboxTreeRoot(opts *bind.FilterOpts, token []common.Address) (*JBSuckerNewInboxTreeRootIterator, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _JBSucker.contract.FilterLogs(opts, "NewInboxTreeRoot", tokenRule) + if err != nil { + return nil, err + } + return &JBSuckerNewInboxTreeRootIterator{contract: _JBSucker.contract, event: "NewInboxTreeRoot", logs: logs, sub: sub}, nil +} + +// WatchNewInboxTreeRoot is a free log subscription operation binding the contract event 0xc69d3412489554fb7820c4c2784cb644b6c79bfc117444b93977d3d33a9b8eac. +// +// Solidity: event NewInboxTreeRoot(address indexed token, uint64 nonce, bytes32 root, address caller) +func (_JBSucker *JBSuckerFilterer) WatchNewInboxTreeRoot(opts *bind.WatchOpts, sink chan<- *JBSuckerNewInboxTreeRoot, token []common.Address) (event.Subscription, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _JBSucker.contract.WatchLogs(opts, "NewInboxTreeRoot", tokenRule) + 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(JBSuckerNewInboxTreeRoot) + if err := _JBSucker.contract.UnpackLog(event, "NewInboxTreeRoot", 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 +} + +// ParseNewInboxTreeRoot is a log parse operation binding the contract event 0xc69d3412489554fb7820c4c2784cb644b6c79bfc117444b93977d3d33a9b8eac. +// +// Solidity: event NewInboxTreeRoot(address indexed token, uint64 nonce, bytes32 root, address caller) +func (_JBSucker *JBSuckerFilterer) ParseNewInboxTreeRoot(log types.Log) (*JBSuckerNewInboxTreeRoot, error) { + event := new(JBSuckerNewInboxTreeRoot) + if err := _JBSucker.contract.UnpackLog(event, "NewInboxTreeRoot", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// JBSuckerRootToRemoteIterator is returned from FilterRootToRemote and is used to iterate over the raw logs and unpacked data for RootToRemote events raised by the JBSucker contract. +type JBSuckerRootToRemoteIterator struct { + Event *JBSuckerRootToRemote // 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 *JBSuckerRootToRemoteIterator) 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(JBSuckerRootToRemote) + 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(JBSuckerRootToRemote) + 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 *JBSuckerRootToRemoteIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *JBSuckerRootToRemoteIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// JBSuckerRootToRemote represents a RootToRemote event raised by the JBSucker contract. +type JBSuckerRootToRemote struct { + Root [32]byte + Token common.Address + Index *big.Int + Nonce uint64 + Caller common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRootToRemote is a free log retrieval operation binding the contract event 0x47c5615513b0f669da2dd7e3362a34610ca2695d0a0e2da2160cee952eab203c. +// +// Solidity: event RootToRemote(bytes32 indexed root, address indexed token, uint256 index, uint64 nonce, address caller) +func (_JBSucker *JBSuckerFilterer) FilterRootToRemote(opts *bind.FilterOpts, root [][32]byte, token []common.Address) (*JBSuckerRootToRemoteIterator, error) { + + var rootRule []interface{} + for _, rootItem := range root { + rootRule = append(rootRule, rootItem) + } + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _JBSucker.contract.FilterLogs(opts, "RootToRemote", rootRule, tokenRule) + if err != nil { + return nil, err + } + return &JBSuckerRootToRemoteIterator{contract: _JBSucker.contract, event: "RootToRemote", logs: logs, sub: sub}, nil +} + +// WatchRootToRemote is a free log subscription operation binding the contract event 0x47c5615513b0f669da2dd7e3362a34610ca2695d0a0e2da2160cee952eab203c. +// +// Solidity: event RootToRemote(bytes32 indexed root, address indexed token, uint256 index, uint64 nonce, address caller) +func (_JBSucker *JBSuckerFilterer) WatchRootToRemote(opts *bind.WatchOpts, sink chan<- *JBSuckerRootToRemote, root [][32]byte, token []common.Address) (event.Subscription, error) { + + var rootRule []interface{} + for _, rootItem := range root { + rootRule = append(rootRule, rootItem) + } + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _JBSucker.contract.WatchLogs(opts, "RootToRemote", rootRule, tokenRule) + 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(JBSuckerRootToRemote) + if err := _JBSucker.contract.UnpackLog(event, "RootToRemote", 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 +} + +// ParseRootToRemote is a log parse operation binding the contract event 0x47c5615513b0f669da2dd7e3362a34610ca2695d0a0e2da2160cee952eab203c. +// +// Solidity: event RootToRemote(bytes32 indexed root, address indexed token, uint256 index, uint64 nonce, address caller) +func (_JBSucker *JBSuckerFilterer) ParseRootToRemote(log types.Log) (*JBSuckerRootToRemote, error) { + event := new(JBSuckerRootToRemote) + if err := _JBSucker.contract.UnpackLog(event, "RootToRemote", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/main.go b/main.go index f356999..318a09e 100644 --- a/main.go +++ b/main.go @@ -132,9 +132,9 @@ func claims(w http.ResponseWriter, req *http.Request) { return } - localSucker, err := NewBPSucker(toClaim.Sucker, client) + localSucker, err := NewJBSucker(toClaim.Sucker, client) if err != nil { - errStr := fmt.Sprintf("Failed to instantiate a BPSucker for %s: %v", logDescription, err) + errStr := fmt.Sprintf("Failed to instantiate a JBSucker for %s: %v", logDescription, err) log.Println(errStr) http.Error(w, errStr, http.StatusInternalServerError) return @@ -142,7 +142,7 @@ func claims(w http.ResponseWriter, req *http.Request) { // callOpts with our context callOpts := &bind.CallOpts{Context: ctx} - localInboxTree, err := localSucker.Inbox(callOpts, toClaim.Token) + localInboxTree, err := localSucker.InboxOf(callOpts, toClaim.Token) if err != nil { errStr := fmt.Sprintf("Failed to get inbox tree root for %s: %v", logDescription, err) log.Println(errStr) @@ -185,7 +185,7 @@ func claims(w http.ResponseWriter, req *http.Request) { // Get the currently available BPClaims for a beneficiary from the database. // If the database is out of date for the given inbox tree, update it. -func dbClaims(ctx context.Context, beneficiary common.Address, inboxTree InboxTree) ([]BPClaim, error) { +func dbClaims(ctx context.Context, beneficiary common.Address, inboxTree InboxTree) ([]JBClaim, error) { logDescription := fmt.Sprintf("inbox %s of sucker %s on chain %s", inboxTree.TokenAddress, inboxTree.SuckerAddress, inboxTree.ChainId) @@ -228,7 +228,7 @@ func dbClaims(ctx context.Context, beneficiary common.Address, inboxTree InboxTr } // Build the tree and claims from the database leaves - claims := make([]BPClaim, 0) + claims := make([]JBClaim, 0) leaves := make([][]byte, 0) // TODO: Check whether the leaf has already been claimed. @@ -273,12 +273,12 @@ func dbClaims(ctx context.Context, beneficiary common.Address, inboxTree InboxTr return nil, fmt.Errorf("failed to parse terminalTokenAmount %s for %s: %v", terminalTokenAmount, logDescription, err) } - claims = append(claims, BPClaim{ + claims = append(claims, JBClaim{ Token: inboxTree.TokenAddress, - Leaf: BPLeaf{ + Leaf: JBLeaf{ Index: idx, Beneficiary: beneficiary, - ProjectTokenAmount: pt, + ProjectTokenCount: pt, TerminalTokenAmount: tt, }, }) @@ -347,7 +347,7 @@ func updateLeaves(ctx context.Context, inboxTree InboxTree) error { } // Instantiate the local sucker - localSucker, err := NewBPSucker(inboxTree.SuckerAddress, client) + localSucker, err := NewJBSucker(inboxTree.SuckerAddress, client) if err != nil { return fmt.Errorf("failed to instantiate the sucker contract for %s: %v", logDescription, err) } @@ -356,11 +356,11 @@ func updateLeaves(ctx context.Context, inboxTree InboxTree) error { // We need to read the InsertToOutboxTree events from the peer sucker. // First, get the peer sucker's chain ID and address. callOpts := &bind.CallOpts{Context: ctx} - peerSuckerChainId, err := localSucker.PeerChainID(callOpts) + peerSuckerChainId, err := localSucker.PeerChainId(callOpts) if err != nil { return fmt.Errorf("failed to get peer chain ID for %s: %v", logDescription, err) } - peerSuckerAddr, err := localSucker.PEER(callOpts) + peerSuckerAddr, err := localSucker.Peer(callOpts) if err != nil { return fmt.Errorf("failed to get peer address for %s: %v", logDescription, err) } @@ -370,7 +370,7 @@ func updateLeaves(ctx context.Context, inboxTree InboxTree) error { } // Instantiate the peer sucker - peerSucker, err := NewBPSucker(peerSuckerAddr, peerClient) + peerSucker, err := NewJBSucker(peerSuckerAddr, peerClient) if err != nil { return fmt.Errorf("failed to instantiate the peer sucker at %s on chain %d for %s: %v", peerSuckerAddr, peerSuckerChainId, logDescription, err) } @@ -379,7 +379,7 @@ func updateLeaves(ctx context.Context, inboxTree InboxTree) error { logDescription += fmt.Sprintf(" with peer sucker %s on chain %d", peerSuckerAddr, peerSuckerChainId) // Make sure the peers match - peerAddressOfPeerSucker, err := peerSucker.PEER(callOpts) + peerAddressOfPeerSucker, err := peerSucker.Peer(callOpts) if err != nil { return fmt.Errorf("failed to get peer address of peer sucker: %v", err) } @@ -409,7 +409,7 @@ func updateLeaves(ctx context.Context, inboxTree InboxTree) error { for outboxIterator.Next() { // TODO: Remove this once we know it's working log.Printf("Leaf index: %s; project token amount: %s; terminal token amount: %s", - outboxIterator.Event.Index.String(), outboxIterator.Event.ProjectTokenAmount.String(), outboxIterator.Event.TerminalTokenAmount.String()) + outboxIterator.Event.Index.String(), outboxIterator.Event.ProjectTokenCount.String(), outboxIterator.Event.TerminalTokenAmount.String()) // Keep skipping until we pass the latest hash if !seenLatestDbLeaf { @@ -427,7 +427,7 @@ func updateLeaves(ctx context.Context, inboxTree InboxTree) error { TokenAddress: inboxTree.TokenAddress.String(), Index: outboxIterator.Event.Index.String(), Beneficiary: outboxIterator.Event.Beneficiary.String(), - ProjectTokenAmount: outboxIterator.Event.ProjectTokenAmount.String(), + ProjectTokenAmount: outboxIterator.Event.ProjectTokenCount.String(), TerminalTokenAmount: outboxIterator.Event.TerminalTokenAmount.String(), LeafHash: hex.EncodeToString(outboxIterator.Event.Hashed[:]), IsClaimed: false, @@ -513,7 +513,7 @@ func updateClaims(ctx context.Context, inboxTree InboxTree) error { // Get the sucker and an iterator for Claimed events. client := clients[inboxTree.ChainId.String()] - sucker, err := NewBPSucker(inboxTree.SuckerAddress, client) + sucker, err := NewJBSucker(inboxTree.SuckerAddress, client) if err != nil { return fmt.Errorf("failed to instantiate local sucker contract for %s: %v", logDescription, err) }