From 74b1dfd694f8f8c8c319ae153816ac6710f23e81 Mon Sep 17 00:00:00 2001 From: Sale Djenic Date: Thu, 23 May 2024 14:38:39 +0200 Subject: [PATCH] fix_: hop contracts' addresses updated --- contracts/contracts.go | 52 - .../hop/{l1Bridge.abi => L1_ERC20_Bridge.abi} | 0 contracts/hop/L1_ETH_Bridge.abi | 1 + contracts/hop/L1_HOP_Bridge.abi | 1 + contracts/hop/L1_HopCCTPImplementation.abi | 1 + .../{l2AmmWrapper.abi => L2_AmmWrapper.abi} | 0 contracts/hop/L2_ArbitrumBridge.abi | 1 + contracts/hop/L2_HopCCTPImplementation.abi | 1 + contracts/hop/L2_OptimismBridge.abi | 1 + contracts/hop/address.go | 417 +- .../l1CctpImplementation.go | 552 +++ .../l1Erc20Bridge/l1Erc20Bridge.go | 3571 ++++++++++++++++ .../l1EthBridge/l1EthBridge.go} | 1310 +++--- .../l1Contracts/l1HopBridge/l1HopBridge.go | 3644 +++++++++++++++++ .../l2Contracts/l2AmmWrapper/l2AmmWrapper.go | 399 ++ .../l2ArbitrumBridge/l2ArbitrumBridge.go | 3340 +++++++++++++++ .../l2CctpImplementation.go | 643 +++ .../l2OptimismBridge/l2OptimismBridge.go | 3392 +++++++++++++++ contracts/hop/l2SaddleSwap.abi | 1 - contracts/hop/swap/l2SaddleSwap.go | 2209 ---------- contracts/hop/wrapper/l2AmmWrapper.go | 390 -- services/wallet/bridge/bridge.go | 4 +- services/wallet/bridge/cbridge.go | 37 +- services/wallet/bridge/erc1155_transfer.go | 8 +- services/wallet/bridge/erc721_transfer.go | 8 +- services/wallet/bridge/hop.go | 478 ++- services/wallet/bridge/swap_paraswap.go | 10 +- services/wallet/bridge/transfer.go | 8 +- services/wallet/router/router.go | 11 +- services/wallet/router/router_v2.go | 23 +- 30 files changed, 16892 insertions(+), 3621 deletions(-) rename contracts/hop/{l1Bridge.abi => L1_ERC20_Bridge.abi} (100%) create mode 100644 contracts/hop/L1_ETH_Bridge.abi create mode 100644 contracts/hop/L1_HOP_Bridge.abi create mode 100644 contracts/hop/L1_HopCCTPImplementation.abi rename contracts/hop/{l2AmmWrapper.abi => L2_AmmWrapper.abi} (100%) create mode 100644 contracts/hop/L2_ArbitrumBridge.abi create mode 100644 contracts/hop/L2_HopCCTPImplementation.abi create mode 100644 contracts/hop/L2_OptimismBridge.abi create mode 100644 contracts/hop/l1Contracts/l1CctpImplementation/l1CctpImplementation.go create mode 100644 contracts/hop/l1Contracts/l1Erc20Bridge/l1Erc20Bridge.go rename contracts/hop/{bridge/l1Bridge.go => l1Contracts/l1EthBridge/l1EthBridge.go} (51%) create mode 100644 contracts/hop/l1Contracts/l1HopBridge/l1HopBridge.go create mode 100644 contracts/hop/l2Contracts/l2AmmWrapper/l2AmmWrapper.go create mode 100644 contracts/hop/l2Contracts/l2ArbitrumBridge/l2ArbitrumBridge.go create mode 100644 contracts/hop/l2Contracts/l2CctpImplementation/l2CctpImplementation.go create mode 100644 contracts/hop/l2Contracts/l2OptimismBridge/l2OptimismBridge.go delete mode 100644 contracts/hop/l2SaddleSwap.abi delete mode 100644 contracts/hop/swap/l2SaddleSwap.go delete mode 100644 contracts/hop/wrapper/l2AmmWrapper.go diff --git a/contracts/contracts.go b/contracts/contracts.go index 5045f219b..92ae36133 100644 --- a/contracts/contracts.go +++ b/contracts/contracts.go @@ -7,10 +7,6 @@ import ( "github.com/status-im/status-go/contracts/balancechecker" "github.com/status-im/status-go/contracts/directory" "github.com/status-im/status-go/contracts/ethscan" - "github.com/status-im/status-go/contracts/hop" - hopBridge "github.com/status-im/status-go/contracts/hop/bridge" - hopSwap "github.com/status-im/status-go/contracts/hop/swap" - hopWrapper "github.com/status-im/status-go/contracts/hop/wrapper" "github.com/status-im/status-go/contracts/ierc20" "github.com/status-im/status-go/contracts/registrar" "github.com/status-im/status-go/contracts/resolver" @@ -204,51 +200,3 @@ func (c *ContractMaker) NewBalanceChecker(chainID uint64) (*balancechecker.Balan backend, ) } - -func (c *ContractMaker) NewHopL2SaddlSwap(chainID uint64, symbol string) (*hopSwap.HopSwap, error) { - contractAddr, err := hop.L2SaddleSwapContractAddress(chainID, symbol) - if err != nil { - return nil, err - } - - backend, err := c.RPCClient.EthClient(chainID) - if err != nil { - return nil, err - } - return hopSwap.NewHopSwap( - contractAddr, - backend, - ) -} - -func (c *ContractMaker) NewHopL1Bridge(chainID uint64, symbol string) (*hopBridge.HopBridge, error) { - contractAddr, err := hop.L1BridgeContractAddress(chainID, symbol) - if err != nil { - return nil, err - } - - backend, err := c.RPCClient.EthClient(chainID) - if err != nil { - return nil, err - } - return hopBridge.NewHopBridge( - contractAddr, - backend, - ) -} - -func (c *ContractMaker) NewHopL2AmmWrapper(chainID uint64, symbol string) (*hopWrapper.HopWrapper, error) { - contractAddr, err := hop.L2AmmWrapperContractAddress(chainID, symbol) - if err != nil { - return nil, err - } - - backend, err := c.RPCClient.EthClient(chainID) - if err != nil { - return nil, err - } - return hopWrapper.NewHopWrapper( - contractAddr, - backend, - ) -} diff --git a/contracts/hop/l1Bridge.abi b/contracts/hop/L1_ERC20_Bridge.abi similarity index 100% rename from contracts/hop/l1Bridge.abi rename to contracts/hop/L1_ERC20_Bridge.abi diff --git a/contracts/hop/L1_ETH_Bridge.abi b/contracts/hop/L1_ETH_Bridge.abi new file mode 100644 index 000000000..350c12bdd --- /dev/null +++ b/contracts/hop/L1_ETH_Bridge.abi @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"address[]","name":"bonders","type":"address[]"},{"internalType":"address","name":"_governance","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newBonder","type":"address"}],"name":"BonderAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousBonder","type":"address"}],"name":"BonderRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"transferRootId","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"originalAmount","type":"uint256"}],"name":"ChallengeResolved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"bonder","type":"address"},{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"totalBondsSettled","type":"uint256"}],"name":"MultipleWithdrawalsSettled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Stake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"transferRootId","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"originalAmount","type":"uint256"}],"name":"TransferBondChallenged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"root","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TransferRootBonded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"originChainId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"TransferRootConfirmed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"TransferRootSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"deadline","type":"uint256"},{"indexed":true,"internalType":"address","name":"relayer","type":"address"},{"indexed":false,"internalType":"uint256","name":"relayerFee","type":"uint256"}],"name":"TransferSentToL2","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Unstake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"bonder","type":"address"},{"indexed":true,"internalType":"bytes32","name":"transferId","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"}],"name":"WithdrawalBondSettled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"transferId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawalBonded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"transferId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"transferNonce","type":"bytes32"}],"name":"Withdrew","type":"event"},{"inputs":[],"name":"CHALLENGE_AMOUNT_DIVISOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TIME_SLOT_SIZE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"addBonder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"bondTransferRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"transferNonce","type":"bytes32"},{"internalType":"uint256","name":"bonderFee","type":"uint256"}],"name":"bondWithdrawal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"chainBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"challengePeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"challengeResolutionPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"originalAmount","type":"uint256"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"}],"name":"challengeTransferBond","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"originChainId","type":"uint256"},{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"uint256","name":"totalAmount","type":"uint256"},{"internalType":"uint256","name":"rootCommittedAt","type":"uint256"}],"name":"confirmTransferRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"crossDomainMessengerWrappers","outputs":[{"internalType":"contract IMessengerWrapper","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"getBondForTransferAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"},{"internalType":"bytes32","name":"transferId","type":"bytes32"}],"name":"getBondedWithdrawalAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"chainId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"getChallengeAmountForTransferAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"getCredit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"getDebitAndAdditionalDebit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"maybeBonder","type":"address"}],"name":"getIsBonder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"getRawDebit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"time","type":"uint256"}],"name":"getTimeSlot","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"transferNonce","type":"bytes32"},{"internalType":"uint256","name":"bonderFee","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"getTransferId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"getTransferRoot","outputs":[{"components":[{"internalType":"uint256","name":"total","type":"uint256"},{"internalType":"uint256","name":"amountWithdrawn","type":"uint256"},{"internalType":"uint256","name":"createdAt","type":"uint256"}],"internalType":"struct Bridge.TransferRoot","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"getTransferRootId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"isChainIdPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"transferId","type":"bytes32"}],"name":"isTransferIdSpent","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minTransferRootBondDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"removeBonder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"originalAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueTransferRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"originalAmount","type":"uint256"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"}],"name":"resolveChallenge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"address","name":"relayer","type":"address"},{"internalType":"uint256","name":"relayerFee","type":"uint256"}],"name":"sendToL2","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"bool","name":"isPaused","type":"bool"}],"name":"setChainIdDepositsPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_challengePeriod","type":"uint256"}],"name":"setChallengePeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_challengeResolutionPeriod","type":"uint256"}],"name":"setChallengeResolutionPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"contract IMessengerWrapper","name":"_crossDomainMessengerWrapper","type":"address"}],"name":"setCrossDomainMessengerWrapper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newGovernance","type":"address"}],"name":"setGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minTransferRootBondDelay","type":"uint256"}],"name":"setMinTransferRootBondDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"},{"internalType":"bytes32","name":"transferId","type":"bytes32"},{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"transferRootTotalAmount","type":"uint256"},{"internalType":"uint256","name":"transferIdTreeIndex","type":"uint256"},{"internalType":"bytes32[]","name":"siblings","type":"bytes32[]"},{"internalType":"uint256","name":"totalLeaves","type":"uint256"}],"name":"settleBondedWithdrawal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"},{"internalType":"bytes32[]","name":"transferIds","type":"bytes32[]"},{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"settleBondedWithdrawals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"timeSlotToAmountBonded","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"transferBonds","outputs":[{"internalType":"address","name":"bonder","type":"address"},{"internalType":"uint256","name":"createdAt","type":"uint256"},{"internalType":"uint256","name":"totalAmount","type":"uint256"},{"internalType":"uint256","name":"challengeStartTime","type":"uint256"},{"internalType":"address","name":"challenger","type":"address"},{"internalType":"bool","name":"challengeResolved","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"transferRootCommittedAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"transferNonce","type":"bytes32"},{"internalType":"uint256","name":"bonderFee","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"transferRootTotalAmount","type":"uint256"},{"internalType":"uint256","name":"transferIdTreeIndex","type":"uint256"},{"internalType":"bytes32[]","name":"siblings","type":"bytes32[]"},{"internalType":"uint256","name":"totalLeaves","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/contracts/hop/L1_HOP_Bridge.abi b/contracts/hop/L1_HOP_Bridge.abi new file mode 100644 index 000000000..034386c52 --- /dev/null +++ b/contracts/hop/L1_HOP_Bridge.abi @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"contract IERC20","name":"_l1CanonicalToken","type":"address"},{"internalType":"address[]","name":"bonders","type":"address[]"},{"internalType":"address","name":"_governance","type":"address"},{"internalType":"address","name":"_migrator","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newBonder","type":"address"}],"name":"BonderAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousBonder","type":"address"}],"name":"BonderRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"transferRootId","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"originalAmount","type":"uint256"}],"name":"ChallengeResolved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"bonder","type":"address"},{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"totalBondsSettled","type":"uint256"}],"name":"MultipleWithdrawalsSettled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Stake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"transferRootId","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"originalAmount","type":"uint256"}],"name":"TransferBondChallenged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"root","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TransferRootBonded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"originChainId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"TransferRootConfirmed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"TransferRootSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"deadline","type":"uint256"},{"indexed":true,"internalType":"address","name":"relayer","type":"address"},{"indexed":false,"internalType":"uint256","name":"relayerFee","type":"uint256"}],"name":"TransferSentToL2","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Unstake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"bonder","type":"address"},{"indexed":true,"internalType":"bytes32","name":"transferId","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"}],"name":"WithdrawalBondSettled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"transferId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawalBonded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"transferId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"transferNonce","type":"bytes32"}],"name":"Withdrew","type":"event"},{"inputs":[],"name":"CHALLENGE_AMOUNT_DIVISOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TIME_SLOT_SIZE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"addBonder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"bondTransferRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"transferNonce","type":"bytes32"},{"internalType":"uint256","name":"bonderFee","type":"uint256"}],"name":"bondWithdrawal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"chainBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"challengePeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"challengeResolutionPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"originalAmount","type":"uint256"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"}],"name":"challengeTransferBond","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"originChainId","type":"uint256"},{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"uint256","name":"totalAmount","type":"uint256"},{"internalType":"uint256","name":"rootCommittedAt","type":"uint256"}],"name":"confirmTransferRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"crossDomainMessengerWrappers","outputs":[{"internalType":"contract IMessengerWrapper","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"getBondForTransferAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"},{"internalType":"bytes32","name":"transferId","type":"bytes32"}],"name":"getBondedWithdrawalAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"chainId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"getChallengeAmountForTransferAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"getCredit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"getDebitAndAdditionalDebit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"maybeBonder","type":"address"}],"name":"getIsBonder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"getRawDebit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"time","type":"uint256"}],"name":"getTimeSlot","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"transferNonce","type":"bytes32"},{"internalType":"uint256","name":"bonderFee","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"getTransferId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"getTransferRoot","outputs":[{"components":[{"internalType":"uint256","name":"total","type":"uint256"},{"internalType":"uint256","name":"amountWithdrawn","type":"uint256"},{"internalType":"uint256","name":"createdAt","type":"uint256"}],"internalType":"struct Bridge.TransferRoot","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"getTransferRootId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"isChainIdPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"transferId","type":"bytes32"}],"name":"isTransferIdSpent","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l1CanonicalToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"migrateTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"migrator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minTransferRootBondDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"removeBonder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"originalAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueTransferRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"originalAmount","type":"uint256"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"}],"name":"resolveChallenge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"address","name":"relayer","type":"address"},{"internalType":"uint256","name":"relayerFee","type":"uint256"}],"name":"sendToL2","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"bool","name":"isPaused","type":"bool"}],"name":"setChainIdDepositsPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_challengePeriod","type":"uint256"}],"name":"setChallengePeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_challengeResolutionPeriod","type":"uint256"}],"name":"setChallengeResolutionPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"contract IMessengerWrapper","name":"_crossDomainMessengerWrapper","type":"address"}],"name":"setCrossDomainMessengerWrapper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newGovernance","type":"address"}],"name":"setGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newMigrator","type":"address"}],"name":"setMigrator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minTransferRootBondDelay","type":"uint256"}],"name":"setMinTransferRootBondDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"},{"internalType":"bytes32","name":"transferId","type":"bytes32"},{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"transferRootTotalAmount","type":"uint256"},{"internalType":"uint256","name":"transferIdTreeIndex","type":"uint256"},{"internalType":"bytes32[]","name":"siblings","type":"bytes32[]"},{"internalType":"uint256","name":"totalLeaves","type":"uint256"}],"name":"settleBondedWithdrawal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"},{"internalType":"bytes32[]","name":"transferIds","type":"bytes32[]"},{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"settleBondedWithdrawals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"timeSlotToAmountBonded","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"transferBonds","outputs":[{"internalType":"address","name":"bonder","type":"address"},{"internalType":"uint256","name":"createdAt","type":"uint256"},{"internalType":"uint256","name":"totalAmount","type":"uint256"},{"internalType":"uint256","name":"challengeStartTime","type":"uint256"},{"internalType":"address","name":"challenger","type":"address"},{"internalType":"bool","name":"challengeResolved","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"transferRootCommittedAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"transferNonce","type":"bytes32"},{"internalType":"uint256","name":"bonderFee","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"transferRootTotalAmount","type":"uint256"},{"internalType":"uint256","name":"transferIdTreeIndex","type":"uint256"},{"internalType":"bytes32[]","name":"siblings","type":"bytes32[]"},{"internalType":"uint256","name":"totalLeaves","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/contracts/hop/L1_HopCCTPImplementation.abi b/contracts/hop/L1_HopCCTPImplementation.abi new file mode 100644 index 000000000..00670190a --- /dev/null +++ b/contracts/hop/L1_HopCCTPImplementation.abi @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"address","name":"nativeTokenAddress","type":"address"},{"internalType":"address","name":"cctpAddress","type":"address"},{"internalType":"address","name":"feeCollectorAddress","type":"address"},{"internalType":"uint256","name":"minBonderFee","type":"uint256"},{"internalType":"uint256[]","name":"chainIds","type":"uint256[]"},{"internalType":"uint32[]","name":"domains","type":"uint32[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"cctpNonce","type":"uint64"},{"indexed":true,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bonderFee","type":"uint256"}],"name":"CCTPTransferSent","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"activeChainIds","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cctp","outputs":[{"internalType":"contract ICCTP","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"destinationDomains","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeCollectorAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minBonderFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nativeToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"bonderFee","type":"uint256"}],"name":"send","outputs":[],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/contracts/hop/l2AmmWrapper.abi b/contracts/hop/L2_AmmWrapper.abi similarity index 100% rename from contracts/hop/l2AmmWrapper.abi rename to contracts/hop/L2_AmmWrapper.abi diff --git a/contracts/hop/L2_ArbitrumBridge.abi b/contracts/hop/L2_ArbitrumBridge.abi new file mode 100644 index 000000000..98983adb1 --- /dev/null +++ b/contracts/hop/L2_ArbitrumBridge.abi @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"contract IArbSys","name":"_messenger","type":"address"},{"internalType":"address","name":"l1Governance","type":"address"},{"internalType":"contract HopBridgeToken","name":"hToken","type":"address"},{"internalType":"address","name":"l1BridgeAddress","type":"address"},{"internalType":"uint256[]","name":"activeChainIds","type":"uint256[]"},{"internalType":"address[]","name":"bonders","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newBonder","type":"address"}],"name":"BonderAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousBonder","type":"address"}],"name":"BonderRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"bonder","type":"address"},{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"totalBondsSettled","type":"uint256"}],"name":"MultipleWithdrawalsSettled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Stake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"deadline","type":"uint256"},{"indexed":true,"internalType":"address","name":"relayer","type":"address"},{"indexed":false,"internalType":"uint256","name":"relayerFee","type":"uint256"}],"name":"TransferFromL1Completed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"TransferRootSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"transferId","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"transferNonce","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"bonderFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"TransferSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"totalAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rootCommittedAt","type":"uint256"}],"name":"TransfersCommitted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Unstake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"bonder","type":"address"},{"indexed":true,"internalType":"bytes32","name":"transferId","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"}],"name":"WithdrawalBondSettled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"transferId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawalBonded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"transferId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"transferNonce","type":"bytes32"}],"name":"Withdrew","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"activeChainIds","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"chainIds","type":"uint256[]"}],"name":"addActiveChainIds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"addBonder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ammWrapper","outputs":[{"internalType":"contract I_L2_AmmWrapper","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"transferNonce","type":"bytes32"},{"internalType":"uint256","name":"bonderFee","type":"uint256"}],"name":"bondWithdrawal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"transferNonce","type":"bytes32"},{"internalType":"uint256","name":"bonderFee","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"bondWithdrawalAndDistribute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"destinationChainId","type":"uint256"}],"name":"commitTransfers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"address","name":"relayer","type":"address"},{"internalType":"uint256","name":"relayerFee","type":"uint256"}],"name":"distribute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"},{"internalType":"bytes32","name":"transferId","type":"bytes32"}],"name":"getBondedWithdrawalAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"chainId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"getCredit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"getDebitAndAdditionalDebit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"maybeBonder","type":"address"}],"name":"getIsBonder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNextTransferNonce","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"getRawDebit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"transferNonce","type":"bytes32"},{"internalType":"uint256","name":"bonderFee","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"getTransferId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"getTransferRoot","outputs":[{"components":[{"internalType":"uint256","name":"total","type":"uint256"},{"internalType":"uint256","name":"amountWithdrawn","type":"uint256"},{"internalType":"uint256","name":"createdAt","type":"uint256"}],"internalType":"struct Bridge.TransferRoot","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"getTransferRootId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"hToken","outputs":[{"internalType":"contract HopBridgeToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"transferId","type":"bytes32"}],"name":"isTransferIdSpent","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l1BridgeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l1BridgeCaller","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l1Governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lastCommitTimeForChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPendingTransfers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"messenger","outputs":[{"internalType":"contract IArbSys","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minBonderBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minBonderFeeAbsolute","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumForceCommitDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"pendingAmountForChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"pendingTransferIdsForChainId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"chainIds","type":"uint256[]"}],"name":"removeActiveChainIds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"removeBonder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"originalAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueTransferRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"bonderFee","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"send","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract I_L2_AmmWrapper","name":"_ammWrapper","type":"address"}],"name":"setAmmWrapper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"setHopBridgeTokenOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_l1BridgeAddress","type":"address"}],"name":"setL1BridgeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_l1BridgeCaller","type":"address"}],"name":"setL1BridgeCaller","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_l1Governance","type":"address"}],"name":"setL1Governance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPendingTransfers","type":"uint256"}],"name":"setMaxPendingTransfers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IArbSys","name":"_messenger","type":"address"}],"name":"setMessenger","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minBonderBps","type":"uint256"},{"internalType":"uint256","name":"_minBonderFeeAbsolute","type":"uint256"}],"name":"setMinimumBonderFeeRequirements","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minimumForceCommitDelay","type":"uint256"}],"name":"setMinimumForceCommitDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"setTransferRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"},{"internalType":"bytes32","name":"transferId","type":"bytes32"},{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"transferRootTotalAmount","type":"uint256"},{"internalType":"uint256","name":"transferIdTreeIndex","type":"uint256"},{"internalType":"bytes32[]","name":"siblings","type":"bytes32[]"},{"internalType":"uint256","name":"totalLeaves","type":"uint256"}],"name":"settleBondedWithdrawal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"},{"internalType":"bytes32[]","name":"transferIds","type":"bytes32[]"},{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"settleBondedWithdrawals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"transferNonceIncrementer","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"transferNonce","type":"bytes32"},{"internalType":"uint256","name":"bonderFee","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"transferRootTotalAmount","type":"uint256"},{"internalType":"uint256","name":"transferIdTreeIndex","type":"uint256"},{"internalType":"bytes32[]","name":"siblings","type":"bytes32[]"},{"internalType":"uint256","name":"totalLeaves","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/contracts/hop/L2_HopCCTPImplementation.abi b/contracts/hop/L2_HopCCTPImplementation.abi new file mode 100644 index 000000000..37cf4b3c8 --- /dev/null +++ b/contracts/hop/L2_HopCCTPImplementation.abi @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"address","name":"nativeTokenAddress","type":"address"},{"internalType":"address","name":"cctpAddress","type":"address"},{"internalType":"address","name":"feeCollectorAddress","type":"address"},{"internalType":"uint256","name":"minBonderFee","type":"uint256"},{"internalType":"uint256[]","name":"chainIds","type":"uint256[]"},{"internalType":"uint32[]","name":"domains","type":"uint32[]"},{"internalType":"address","name":"bridgedTokenAddress","type":"address"},{"internalType":"address","name":"ammAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"cctpNonce","type":"uint64"},{"indexed":true,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bonderFee","type":"uint256"}],"name":"CCTPTransferSent","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"activeChainIds","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"amm","outputs":[{"internalType":"contract IAMM","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bridgedToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cctp","outputs":[{"internalType":"contract ICCTP","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"destinationDomains","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeCollectorAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minBonderFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nativeToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"bonderFee","type":"uint256"}],"name":"send","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"bonderFee","type":"uint256"},{"components":[{"internalType":"bytes","name":"path","type":"bytes"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMinimum","type":"uint256"}],"internalType":"struct IAMM.ExactInputParams","name":"swapParams","type":"tuple"}],"name":"swapAndSend","outputs":[],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/contracts/hop/L2_OptimismBridge.abi b/contracts/hop/L2_OptimismBridge.abi new file mode 100644 index 000000000..27da71bf5 --- /dev/null +++ b/contracts/hop/L2_OptimismBridge.abi @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"contract iOVM_L2CrossDomainMessenger","name":"_messenger","type":"address"},{"internalType":"address","name":"l1Governance","type":"address"},{"internalType":"contract HopBridgeToken","name":"hToken","type":"address"},{"internalType":"address","name":"l1BridgeAddress","type":"address"},{"internalType":"uint256[]","name":"activeChainIds","type":"uint256[]"},{"internalType":"address[]","name":"bonders","type":"address[]"},{"internalType":"uint32","name":"_defaultGasLimit","type":"uint32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newBonder","type":"address"}],"name":"BonderAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousBonder","type":"address"}],"name":"BonderRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"bonder","type":"address"},{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"totalBondsSettled","type":"uint256"}],"name":"MultipleWithdrawalsSettled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Stake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"deadline","type":"uint256"},{"indexed":true,"internalType":"address","name":"relayer","type":"address"},{"indexed":false,"internalType":"uint256","name":"relayerFee","type":"uint256"}],"name":"TransferFromL1Completed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"TransferRootSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"transferId","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"transferNonce","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"bonderFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"TransferSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"totalAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rootCommittedAt","type":"uint256"}],"name":"TransfersCommitted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Unstake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"bonder","type":"address"},{"indexed":true,"internalType":"bytes32","name":"transferId","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"}],"name":"WithdrawalBondSettled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"transferId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawalBonded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"transferId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"transferNonce","type":"bytes32"}],"name":"Withdrew","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"activeChainIds","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"chainIds","type":"uint256[]"}],"name":"addActiveChainIds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"addBonder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ammWrapper","outputs":[{"internalType":"contract I_L2_AmmWrapper","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"transferNonce","type":"bytes32"},{"internalType":"uint256","name":"bonderFee","type":"uint256"}],"name":"bondWithdrawal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"transferNonce","type":"bytes32"},{"internalType":"uint256","name":"bonderFee","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"bondWithdrawalAndDistribute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"destinationChainId","type":"uint256"}],"name":"commitTransfers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"defaultGasLimit","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"address","name":"relayer","type":"address"},{"internalType":"uint256","name":"relayerFee","type":"uint256"}],"name":"distribute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"},{"internalType":"bytes32","name":"transferId","type":"bytes32"}],"name":"getBondedWithdrawalAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"chainId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"getCredit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"getDebitAndAdditionalDebit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"maybeBonder","type":"address"}],"name":"getIsBonder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNextTransferNonce","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"getRawDebit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"transferNonce","type":"bytes32"},{"internalType":"uint256","name":"bonderFee","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"getTransferId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"getTransferRoot","outputs":[{"components":[{"internalType":"uint256","name":"total","type":"uint256"},{"internalType":"uint256","name":"amountWithdrawn","type":"uint256"},{"internalType":"uint256","name":"createdAt","type":"uint256"}],"internalType":"struct Bridge.TransferRoot","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"getTransferRootId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"hToken","outputs":[{"internalType":"contract HopBridgeToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"transferId","type":"bytes32"}],"name":"isTransferIdSpent","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l1BridgeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l1BridgeCaller","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l1Governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lastCommitTimeForChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPendingTransfers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"messenger","outputs":[{"internalType":"contract iOVM_L2CrossDomainMessenger","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minBonderBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minBonderFeeAbsolute","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumForceCommitDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"pendingAmountForChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"pendingTransferIdsForChainId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"chainIds","type":"uint256[]"}],"name":"removeActiveChainIds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"removeBonder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"originalAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueTransferRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"bonderFee","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"send","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract I_L2_AmmWrapper","name":"_ammWrapper","type":"address"}],"name":"setAmmWrapper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_defaultGasLimit","type":"uint32"}],"name":"setDefaultGasLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"setHopBridgeTokenOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_l1BridgeAddress","type":"address"}],"name":"setL1BridgeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_l1BridgeCaller","type":"address"}],"name":"setL1BridgeCaller","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_l1Governance","type":"address"}],"name":"setL1Governance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPendingTransfers","type":"uint256"}],"name":"setMaxPendingTransfers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract iOVM_L2CrossDomainMessenger","name":"_messenger","type":"address"}],"name":"setMessenger","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minBonderBps","type":"uint256"},{"internalType":"uint256","name":"_minBonderFeeAbsolute","type":"uint256"}],"name":"setMinimumBonderFeeRequirements","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minimumForceCommitDelay","type":"uint256"}],"name":"setMinimumForceCommitDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"setTransferRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"},{"internalType":"bytes32","name":"transferId","type":"bytes32"},{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"transferRootTotalAmount","type":"uint256"},{"internalType":"uint256","name":"transferIdTreeIndex","type":"uint256"},{"internalType":"bytes32[]","name":"siblings","type":"bytes32[]"},{"internalType":"uint256","name":"totalLeaves","type":"uint256"}],"name":"settleBondedWithdrawal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"},{"internalType":"bytes32[]","name":"transferIds","type":"bytes32[]"},{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"settleBondedWithdrawals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"transferNonceIncrementer","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"transferNonce","type":"bytes32"},{"internalType":"uint256","name":"bonderFee","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"transferRootTotalAmount","type":"uint256"},{"internalType":"uint256","name":"transferIdTreeIndex","type":"uint256"},{"internalType":"bytes32[]","name":"siblings","type":"bytes32[]"},{"internalType":"uint256","name":"totalLeaves","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/contracts/hop/address.go b/contracts/hop/address.go index f2cb7c271..62ca49197 100644 --- a/contracts/hop/address.go +++ b/contracts/hop/address.go @@ -4,112 +4,353 @@ import ( "errors" "github.com/ethereum/go-ethereum/common" + walletCommon "github.com/status-im/status-go/services/wallet/common" ) var errorNotAvailableOnChainID = errors.New("not available for chainID") -var l2SaddleSwapContractAddresses = map[uint64]map[string]common.Address{ - 10: { - "USDC": common.HexToAddress("0x3c0FFAca566fCcfD9Cc95139FEF6CBA143795963"), - "USDT": common.HexToAddress("0xeC4B41Af04cF917b54AEb6Df58c0f8D78895b5Ef"), - "DAI": common.HexToAddress("0xF181eD90D6CfaC84B8073FdEA6D34Aa744B41810"), - "ETH": common.HexToAddress("0xaa30D6bba6285d0585722e2440Ff89E23EF68864"), - "WBTC": common.HexToAddress("0x46fc3Af3A47792cA3ED06fdF3D657145A675a8D8"), +// List taken from Hop: +// https://github.com/hop-protocol/hop/blob/ef1ca4f8fac002c81fc0dc37ba021125947c6bc2/packages/sdk/src/addresses/mainnet.ts +// https://github.com/hop-protocol/hop/blob/ef1ca4f8fac002c81fc0dc37ba021125947c6bc2/packages/sdk/src/addresses/sepolia.ts + +const ( + L1CanonicalToken = "l1CanonicalToken" + L1Bridge = "l1Bridge" + L1CanonicalBridge = "l1CanonicalBridge" + L1MessengerWrapper = "l1MessengerWrapper" + CctpL1Bridge = "cctpL1Bridge" + CctpMessageTransmitter = "cctpMessageTransmitter" + + L2CanonicalToken = "l2CanonicalToken" + L2Bridge = "l2Bridge" + L2CanonicalBridge = "l2CanonicalBridge" + L2HopBridgeToken = "l2HopBridgeToken" + L2AmmWrapper = "l2AmmWrapper" + L2SaddleSwap = "l2SaddleSwap" + L2SaddleLpToken = "l2SaddleLpToken" + CctpL2Bridge = "cctpL2Bridge" +) + +var hopBridgeContractAddresses = map[string]map[uint64]map[string]common.Address{ + "USDC": { + walletCommon.EthereumMainnet: { + L1CanonicalToken: common.HexToAddress("0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"), + CctpL1Bridge: common.HexToAddress("0x7e77461CA2a9d82d26FD5e0Da2243BF72eA45747"), + CctpMessageTransmitter: common.HexToAddress("0x0a992d191deec32afe36203ad87d7d289a738f81"), + }, + walletCommon.OptimismMainnet: { + L2CanonicalToken: common.HexToAddress("0x0b2c639c533813f4aa9d7837caf62653d097ff85"), + CctpL2Bridge: common.HexToAddress("0x469147af8Bde580232BE9DC84Bb4EC84d348De24"), + CctpMessageTransmitter: common.HexToAddress("0x4d41f22c5a0e5c74090899e5a8fb597a8842b3e8"), + }, + walletCommon.ArbitrumMainnet: { + L2CanonicalToken: common.HexToAddress("0xaf88d065e77c8cc2239327c5edb3a432268e5831"), + CctpL2Bridge: common.HexToAddress("0x6504BFcaB789c35325cA4329f1f41FaC340bf982"), + CctpMessageTransmitter: common.HexToAddress("0xC30362313FBBA5cf9163F0bb16a0e01f01A896ca"), + }, + walletCommon.EthereumSepolia: { + L1CanonicalToken: common.HexToAddress("0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238"), + CctpL1Bridge: common.HexToAddress("0x05fda2db623fa6a89a2db33550848ab2006a4427"), + }, + walletCommon.OptimismSepolia: { + L2CanonicalToken: common.HexToAddress("0x5fd84259d66Cd46123540766Be93DFE6D43130D7"), + CctpL2Bridge: common.HexToAddress("0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5"), + }, + walletCommon.ArbitrumSepolia: { + L2CanonicalToken: common.HexToAddress("0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d"), + CctpL2Bridge: common.HexToAddress("0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5"), + }, }, - 42161: { - "USDC": common.HexToAddress("0x10541b07d8Ad2647Dc6cD67abd4c03575dade261"), - "USDT": common.HexToAddress("0x18f7402B673Ba6Fb5EA4B95768aABb8aaD7ef18a"), - "DAI": common.HexToAddress("0xa5A33aB9063395A90CCbEa2D86a62EcCf27B5742"), - "ETH": common.HexToAddress("0x652d27c0F72771Ce5C76fd400edD61B406Ac6D97"), - "WBTC": common.HexToAddress("0x7191061D5d4C60f598214cC6913502184BAddf18"), + "USDC.e": { + walletCommon.EthereumMainnet: { + L1CanonicalToken: common.HexToAddress("0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"), + L1Bridge: common.HexToAddress("0x3666f603Cc164936C1b87e207F36BEBa4AC5f18a"), + CctpL1Bridge: common.HexToAddress("0x7e77461CA2a9d82d26FD5e0Da2243BF72eA45747"), + CctpMessageTransmitter: common.HexToAddress("0x0a992d191deec32afe36203ad87d7d289a738f81"), + }, + walletCommon.OptimismMainnet: { + L1CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"), + L1MessengerWrapper: common.HexToAddress("0x6587a6164B091a058aCba2e91f971454Ec172940"), + L2CanonicalBridge: common.HexToAddress("0x4200000000000000000000000000000000000010"), + L2CanonicalToken: common.HexToAddress("0x7F5c764cBc14f9669B88837ca1490cCa17c31607"), + L2Bridge: common.HexToAddress("0xa81D244A1814468C734E5b4101F7b9c0c577a8fC"), + CctpL2Bridge: common.HexToAddress("0x469147af8Bde580232BE9DC84Bb4EC84d348De24"), + CctpMessageTransmitter: common.HexToAddress("0x4d41f22c5a0e5c74090899e5a8fb597a8842b3e8"), + L2HopBridgeToken: common.HexToAddress("0x25D8039bB044dC227f741a9e381CA4cEAE2E6aE8"), + L2AmmWrapper: common.HexToAddress("0x2ad09850b0CA4c7c1B33f5AcD6cBAbCaB5d6e796"), + L2SaddleSwap: common.HexToAddress("0x3c0FFAca566fCcfD9Cc95139FEF6CBA143795963"), + L2SaddleLpToken: common.HexToAddress("0x2e17b8193566345a2Dd467183526dEdc42d2d5A8"), + }, + walletCommon.ArbitrumMainnet: { + L1CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"), + L1MessengerWrapper: common.HexToAddress("0x39Bf4A32E689B6a79360854b7c901e991085D6a3"), + L2CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"), + L2CanonicalToken: common.HexToAddress("0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8"), + L2Bridge: common.HexToAddress("0x0e0E3d2C5c292161999474247956EF542caBF8dd"), + CctpL2Bridge: common.HexToAddress("0x6504BFcaB789c35325cA4329f1f41FaC340bf982"), + CctpMessageTransmitter: common.HexToAddress("0xC30362313FBBA5cf9163F0bb16a0e01f01A896ca"), + L2HopBridgeToken: common.HexToAddress("0x0ce6c85cF43553DE10FC56cecA0aef6Ff0DD444d"), + L2AmmWrapper: common.HexToAddress("0xe22D2beDb3Eca35E6397e0C6D62857094aA26F52"), + L2SaddleSwap: common.HexToAddress("0x10541b07d8Ad2647Dc6cD67abd4c03575dade261"), + L2SaddleLpToken: common.HexToAddress("0xB67c014FA700E69681a673876eb8BAFAA36BFf71"), + }, + walletCommon.EthereumSepolia: { + L1CanonicalToken: common.HexToAddress("0x95B01328BA6f4de261C4907fB35eE3c4968e9CEF"), + CctpL1Bridge: common.HexToAddress("0x98bc5b835686e1a00e6c2168af162905899e93d6"), + }, + walletCommon.OptimismSepolia: { + L2CanonicalToken: common.HexToAddress("0xB15312eA17d95375E64317C363A0e6304330D82e"), + }, }, - 420: { - "USDC": common.HexToAddress("0xE4757dD81AFbecF61E51824AB9238df6691c3D0e"), - "ETH": common.HexToAddress("0xa50395bdEaca7062255109fedE012eFE63d6D402"), + "USDT": { + walletCommon.EthereumMainnet: { + L1CanonicalToken: common.HexToAddress("0xdAC17F958D2ee523a2206206994597C13D831ec7"), + L1Bridge: common.HexToAddress("0x3E4a3a4796d16c0Cd582C382691998f7c06420B6"), + }, + walletCommon.OptimismMainnet: { + L1CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"), + L1MessengerWrapper: common.HexToAddress("0x9fc22E269c3752620EB281ce470855886b982501"), + L2CanonicalBridge: common.HexToAddress("0x4200000000000000000000000000000000000010"), + L2CanonicalToken: common.HexToAddress("0x94b008aA00579c1307B0EF2c499aD98a8ce58e58"), + L2Bridge: common.HexToAddress("0x46ae9BaB8CEA96610807a275EBD36f8e916b5C61"), + L2HopBridgeToken: common.HexToAddress("0x2057C8ECB70Afd7Bee667d76B4CD373A325b1a20"), + L2AmmWrapper: common.HexToAddress("0x7D269D3E0d61A05a0bA976b7DBF8805bF844AF3F"), + L2SaddleSwap: common.HexToAddress("0xeC4B41Af04cF917b54AEb6Df58c0f8D78895b5Ef"), + L2SaddleLpToken: common.HexToAddress("0xF753A50fc755c6622BBCAa0f59F0522f264F006e"), + }, + walletCommon.ArbitrumMainnet: { + L1CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"), + L1MessengerWrapper: common.HexToAddress("0x967F8E2B66D624Ad544CB59a230b867Ac3dC60dc"), + L2CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"), + L2CanonicalToken: common.HexToAddress("0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"), + L2Bridge: common.HexToAddress("0x72209Fe68386b37A40d6bCA04f78356fd342491f"), + L2HopBridgeToken: common.HexToAddress("0x12e59C59D282D2C00f3166915BED6DC2F5e2B5C7"), + L2AmmWrapper: common.HexToAddress("0xCB0a4177E0A60247C0ad18Be87f8eDfF6DD30283"), + L2SaddleSwap: common.HexToAddress("0x18f7402B673Ba6Fb5EA4B95768aABb8aaD7ef18a"), + L2SaddleLpToken: common.HexToAddress("0xCe3B19D820CB8B9ae370E423B0a329c4314335fE"), + }, }, - 421613: { - "USDC": common.HexToAddress("0x83f6244Bd87662118d96D9a6D44f09dffF14b30E"), - "ETH": common.HexToAddress("0x69a71b7F6Ff088a0310b4f911b4f9eA11e2E9740"), + "MATIC": { + walletCommon.EthereumMainnet: { + L1CanonicalToken: common.HexToAddress("0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0"), + L1Bridge: common.HexToAddress("0x22B1Cbb8D98a01a3B71D034BB899775A76Eb1cc2"), + }, + }, + "DAI": { + walletCommon.EthereumMainnet: { + L1CanonicalToken: common.HexToAddress("0x6B175474E89094C44Da98b954EedeAC495271d0F"), + L1Bridge: common.HexToAddress("0x3d4Cc8A61c7528Fd86C55cfe061a78dCBA48EDd1"), + }, + walletCommon.OptimismMainnet: { + L1CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"), + L1MessengerWrapper: common.HexToAddress("0x115F423b958A2847af0F5bF314DB0f27c644c308"), + L2CanonicalBridge: common.HexToAddress("0x4200000000000000000000000000000000000010"), + L2CanonicalToken: common.HexToAddress("0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1"), + L2Bridge: common.HexToAddress("0x7191061D5d4C60f598214cC6913502184BAddf18"), + L2HopBridgeToken: common.HexToAddress("0x56900d66D74Cb14E3c86895789901C9135c95b16"), + L2AmmWrapper: common.HexToAddress("0xb3C68a491608952Cb1257FC9909a537a0173b63B"), + L2SaddleSwap: common.HexToAddress("0xF181eD90D6CfaC84B8073FdEA6D34Aa744B41810"), + L2SaddleLpToken: common.HexToAddress("0x22D63A26c730d49e5Eab461E4f5De1D8BdF89C92"), + }, + walletCommon.ArbitrumMainnet: { + L1CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"), + L1MessengerWrapper: common.HexToAddress("0x2d6fd82C7f531328BCaCA96EF985325C0894dB62"), + L2CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"), + L2CanonicalToken: common.HexToAddress("0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1"), + L2Bridge: common.HexToAddress("0x7aC115536FE3A185100B2c4DE4cb328bf3A58Ba6"), + L2HopBridgeToken: common.HexToAddress("0x46ae9BaB8CEA96610807a275EBD36f8e916b5C61"), + L2AmmWrapper: common.HexToAddress("0xe7F40BF16AB09f4a6906Ac2CAA4094aD2dA48Cc2"), + L2SaddleSwap: common.HexToAddress("0xa5A33aB9063395A90CCbEa2D86a62EcCf27B5742"), + L2SaddleLpToken: common.HexToAddress("0x68f5d998F00bB2460511021741D098c05721d8fF"), + }, + }, + "ETH": { + walletCommon.EthereumMainnet: { + L1CanonicalToken: common.HexToAddress("0x0000000000000000000000000000000000000000"), + L1Bridge: common.HexToAddress("0xb8901acB165ed027E32754E0FFe830802919727f"), + }, + walletCommon.OptimismMainnet: { + L1CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"), + L1MessengerWrapper: common.HexToAddress("0xa45DF1A388049fb8d76E72D350d24E2C3F7aEBd1"), + L2CanonicalBridge: common.HexToAddress("0x4200000000000000000000000000000000000010"), + L2CanonicalToken: common.HexToAddress("0x4200000000000000000000000000000000000006"), + L2Bridge: common.HexToAddress("0x83f6244Bd87662118d96D9a6D44f09dffF14b30E"), + L2HopBridgeToken: common.HexToAddress("0xE38faf9040c7F09958c638bBDB977083722c5156"), + L2AmmWrapper: common.HexToAddress("0x86cA30bEF97fB651b8d866D45503684b90cb3312"), + L2SaddleSwap: common.HexToAddress("0xaa30D6bba6285d0585722e2440Ff89E23EF68864"), + L2SaddleLpToken: common.HexToAddress("0x5C2048094bAaDe483D0b1DA85c3Da6200A88a849"), + }, + walletCommon.ArbitrumMainnet: { + L1CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"), + L1MessengerWrapper: common.HexToAddress("0xDD378a11475D588908001E0E99E4fD89ABda5434"), + L2CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"), + L2CanonicalToken: common.HexToAddress("0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"), + L2Bridge: common.HexToAddress("0x3749C4f034022c39ecafFaBA182555d4508caCCC"), + L2HopBridgeToken: common.HexToAddress("0xDa7c0de432a9346bB6e96aC74e3B61A36d8a77eB"), + L2AmmWrapper: common.HexToAddress("0x33ceb27b39d2Bb7D2e61F7564d3Df29344020417"), + L2SaddleSwap: common.HexToAddress("0x652d27c0F72771Ce5C76fd400edD61B406Ac6D97"), + L2SaddleLpToken: common.HexToAddress("0x59745774Ed5EfF903e615F5A2282Cae03484985a"), + }, + }, + "HOP": { + walletCommon.EthereumMainnet: { + L1CanonicalToken: common.HexToAddress("0xc5102fE9359FD9a28f877a67E36B0F050d81a3CC"), + L1Bridge: common.HexToAddress("0x914f986a44AcB623A277d6Bd17368171FCbe4273"), + }, + walletCommon.OptimismMainnet: { + L1CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"), + L1MessengerWrapper: common.HexToAddress("0x9D3A7fB18CA7F1237F977Dc5572883f8b24F5638"), + L2CanonicalBridge: common.HexToAddress("0x4200000000000000000000000000000000000010"), + L2CanonicalToken: common.HexToAddress("0xc5102fE9359FD9a28f877a67E36B0F050d81a3CC"), + L2Bridge: common.HexToAddress("0x03D7f750777eC48d39D080b020D83Eb2CB4e3547"), + L2HopBridgeToken: common.HexToAddress("0xc5102fE9359FD9a28f877a67E36B0F050d81a3CC"), + L2AmmWrapper: common.HexToAddress("0x0000000000000000000000000000000000000000"), + L2SaddleSwap: common.HexToAddress("0x0000000000000000000000000000000000000000"), + L2SaddleLpToken: common.HexToAddress("0x0000000000000000000000000000000000000000"), + }, + walletCommon.ArbitrumMainnet: { + L1CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"), + L1MessengerWrapper: common.HexToAddress("0x41BF5Fd5D1C85f00fd1F23C77740F1A7eBa6A35c"), + L2CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"), + L2CanonicalToken: common.HexToAddress("0xc5102fE9359FD9a28f877a67E36B0F050d81a3CC"), + L2Bridge: common.HexToAddress("0x25FB92E505F752F730cAD0Bd4fa17ecE4A384266"), + L2HopBridgeToken: common.HexToAddress("0xc5102fE9359FD9a28f877a67E36B0F050d81a3CC"), + L2AmmWrapper: common.HexToAddress("0x0000000000000000000000000000000000000000"), + L2SaddleSwap: common.HexToAddress("0x0000000000000000000000000000000000000000"), + L2SaddleLpToken: common.HexToAddress("0x0000000000000000000000000000000000000000"), + }, + }, + "SNX": { + walletCommon.EthereumMainnet: { + L1CanonicalToken: common.HexToAddress("0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f"), + L1Bridge: common.HexToAddress("0x893246FACF345c99e4235E5A7bbEE7404c988b96"), + }, + walletCommon.OptimismMainnet: { + L1CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"), + L1MessengerWrapper: common.HexToAddress("0xf0727B1eB1A4c9319A5c34A68bcD5E6530850D47"), + L2CanonicalBridge: common.HexToAddress("0x4200000000000000000000000000000000000010"), + L2CanonicalToken: common.HexToAddress("0x8700dAec35aF8Ff88c16BdF0418774CB3D7599B4"), + L2Bridge: common.HexToAddress("0x16284c7323c35F4960540583998C98B1CfC581a7"), + L2HopBridgeToken: common.HexToAddress("0x13B7F51BD865410c3AcC4d56083C5B56aB38D203"), + L2AmmWrapper: common.HexToAddress("0xf11EBB94EC986EA891Aec29cfF151345C83b33Ec"), + L2SaddleSwap: common.HexToAddress("0x1990BC6dfe2ef605Bfc08f5A23564dB75642Ad73"), + L2SaddleLpToken: common.HexToAddress("0xe63337211DdE2569C348D9B3A0acb5637CFa8aB3"), + }, + }, + "sUSD": { + walletCommon.EthereumMainnet: { + L1CanonicalToken: common.HexToAddress("0x57Ab1ec28D129707052df4dF418D58a2D46d5f51"), + L1Bridge: common.HexToAddress("0x36443fC70E073fe9D50425f82a3eE19feF697d62"), + }, + walletCommon.OptimismMainnet: { + L1CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"), + L1MessengerWrapper: common.HexToAddress("0x4Ef4C1208F7374d0252767E3992546d61dCf9848"), + L2CanonicalBridge: common.HexToAddress("0x4200000000000000000000000000000000000010"), + L2CanonicalToken: common.HexToAddress("0x8c6f28f2F1A3C87F0f938b96d27520d9751ec8d9"), + L2Bridge: common.HexToAddress("0x33Fe5bB8DA466dA55a8A32D6ADE2BB104E2C5201"), + L2HopBridgeToken: common.HexToAddress("0x6F03052743CD99ce1b29265E377e320CD24Eb632"), + L2AmmWrapper: common.HexToAddress("0x29Fba7d2A6C95DB162ee09C6250e912D6893DCa6"), + L2SaddleSwap: common.HexToAddress("0x8d4063E82A4Db8CdAed46932E1c71e03CA69Bede"), + L2SaddleLpToken: common.HexToAddress("0xBD08972Cef7C9a5A046C9Ef13C9c3CE13739B8d6"), + }, + }, + "rETH": { + walletCommon.EthereumMainnet: { + L1CanonicalToken: common.HexToAddress("0xae78736Cd615f374D3085123A210448E74Fc6393"), + L1Bridge: common.HexToAddress("0x87269B23e73305117D0404557bAdc459CEd0dbEc"), + }, + walletCommon.OptimismMainnet: { + L1CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"), + L1MessengerWrapper: common.HexToAddress("0xae26bbD1FA3083E1dae3AEaA2050b97c55886f5d"), + L2CanonicalBridge: common.HexToAddress("0x4200000000000000000000000000000000000010"), + L2CanonicalToken: common.HexToAddress("0x9Bcef72be871e61ED4fBbc7630889beE758eb81D"), + L2Bridge: common.HexToAddress("0xA0075E8cE43dcB9970cB7709b9526c1232cc39c2"), + L2HopBridgeToken: common.HexToAddress("0x755569159598f3702bdD7DFF6233A317C156d3Dd"), + L2AmmWrapper: common.HexToAddress("0x19B2162CA4C2C6F08C6942bFB846ce5C396aCB75"), + L2SaddleSwap: common.HexToAddress("0x9Dd8685463285aD5a94D2c128bda3c5e8a6173c8"), + L2SaddleLpToken: common.HexToAddress("0x0699BC1Ca03761110929b2B56BcCBeb691fa9ca6"), + }, + walletCommon.ArbitrumMainnet: { + L1CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"), + L1MessengerWrapper: common.HexToAddress("0x7fEb7af8d5B277e249868aCF7644e7BB4A5937f8"), + L2CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"), + L2CanonicalToken: common.HexToAddress("0xEC70Dcb4A1EFa46b8F2D97C310C9c4790ba5ffA8"), + L2Bridge: common.HexToAddress("0xc315239cFb05F1E130E7E28E603CEa4C014c57f0"), + L2HopBridgeToken: common.HexToAddress("0x588Bae9C85a605a7F14E551d144279984469423B"), + L2AmmWrapper: common.HexToAddress("0x16e08C02e4B78B0a5b3A917FF5FeaeDd349a5a95"), + L2SaddleSwap: common.HexToAddress("0x0Ded0d521AC7B0d312871D18EA4FDE79f03Ee7CA"), + L2SaddleLpToken: common.HexToAddress("0xbBA837dFFB3eCf4638D200F11B8c691eA641AdCb"), + }, + }, + "MAGIC": { + walletCommon.EthereumMainnet: { + L1CanonicalToken: common.HexToAddress("0xB0c7a3Ba49C7a6EaBa6cD4a96C55a1391070Ac9A"), + L1Bridge: common.HexToAddress("0xf074540eb83c86211F305E145eB31743E228E57d"), + }, + walletCommon.ArbitrumMainnet: { + L1CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"), + L1MessengerWrapper: common.HexToAddress("0xa0c37738582E63B383E609624423d052BFA4b316"), + L2CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"), + L2CanonicalToken: common.HexToAddress("0x539bdE0d7Dbd336b79148AA742883198BBF60342"), + L2Bridge: common.HexToAddress("0xEa5abf2C909169823d939de377Ef2Bf897A6CE98"), + L2HopBridgeToken: common.HexToAddress("0xB76e673EBC922b1E8f10303D0d513a9E710f5c4c"), + L2AmmWrapper: common.HexToAddress("0x50a3a623d00fd8b8a4F3CbC5aa53D0Bc6FA912DD"), + L2SaddleSwap: common.HexToAddress("0xFFe42d3Ba79Ee5Ee74a999CAd0c60EF1153F0b82"), + L2SaddleLpToken: common.HexToAddress("0x163A9E12787dBFa2836caa549aE02ed67F73e7C2"), + }, }, } -var l2AmmWrapperContractAddress = map[uint64]map[string]common.Address{ - 10: { - "USDC": common.HexToAddress("0x2ad09850b0CA4c7c1B33f5AcD6cBAbCaB5d6e796"), - "USDT": common.HexToAddress("0x7D269D3E0d61A05a0bA976b7DBF8805bF844AF3F"), - "DAI": common.HexToAddress("0xb3C68a491608952Cb1257FC9909a537a0173b63B"), - "ETH": common.HexToAddress("0x86cA30bEF97fB651b8d866D45503684b90cb3312"), - "WBTC": common.HexToAddress("0x2A11a98e2fCF4674F30934B5166645fE6CA35F56"), - }, - 42161: { - "USDC": common.HexToAddress("0xe22D2beDb3Eca35E6397e0C6D62857094aA26F52"), - "USDT": common.HexToAddress("0xCB0a4177E0A60247C0ad18Be87f8eDfF6DD30283"), - "DAI": common.HexToAddress("0xe7F40BF16AB09f4a6906Ac2CAA4094aD2dA48Cc2"), - "ETH": common.HexToAddress("0x33ceb27b39d2Bb7D2e61F7564d3Df29344020417"), - "WBTC": common.HexToAddress("0xC08055b634D43F2176d721E26A3428D3b7E7DdB5"), - }, - 420: { - "USDC": common.HexToAddress("0xfF21e82a4Bc305BCE591530A68628192b5b6B6FD"), - "ETH": common.HexToAddress("0xC1985d7a3429cDC85E59E2E4Fcc805b857e6Ee2E"), - }, - 421613: { - "USDC": common.HexToAddress("0x32219766597DFbb10297127238D921E7CCF5D920"), - "ETH": common.HexToAddress("0xa832293f2DCe2f092182F17dd873ae06AD5fDbaF"), - }, +func isHTokenSend() bool { + // isHTokenSend is false in Status app for now + return false } -var l1BridgeContractAddress = map[uint64]map[string]common.Address{ - 1: { - "USDC": common.HexToAddress("0x3666f603Cc164936C1b87e207F36BEBa4AC5f18a"), - "USDT": common.HexToAddress("0x3666f603Cc164936C1b87e207F36BEBa4AC5f18a"), - "DAI": common.HexToAddress("0x3d4Cc8A61c7528Fd86C55cfe061a78dCBA48EDd1"), - "ETH": common.HexToAddress("0xb8901acB165ed027E32754E0FFe830802919727f"), - "WBTC": common.HexToAddress("0xb98454270065A31D71Bf635F6F7Ee6A518dFb849"), - }, - 5: { - "USDC": common.HexToAddress("0x7D269D3E0d61A05a0bA976b7DBF8805bF844AF3F"), - "ETH": common.HexToAddress("0xC8A4FB931e8D77df8497790381CA7d228E68a41b"), - }, +func shouldUseCctpBridge(symbol string) bool { + if symbol == "USDC" { + return true + } + return symbol == "USDC.e" && isHTokenSend() } -func L2SaddleSwapContractAddress(chainID uint64, symbol string) (common.Address, error) { - tokens, exists := l2SaddleSwapContractAddresses[chainID] - if !exists { - return *new(common.Address), errorNotAvailableOnChainID - } - - addr, exists := tokens[symbol] - if !exists { - return *new(common.Address), errorNotAvailableOnChainID - } - - return addr, nil +func shouldUseAmm(symbol string) bool { + return symbol != "HOP" } -func L2AmmWrapperContractAddress(chainID uint64, symbol string) (common.Address, error) { - tokens, exists := l2AmmWrapperContractAddress[chainID] - if !exists { - return *new(common.Address), errorNotAvailableOnChainID +func GetContractAddress(chainID uint64, symbol string) (addr common.Address, contractType string, err error) { + err = errorNotAvailableOnChainID + + if chainID == walletCommon.EthereumMainnet || + chainID == walletCommon.EthereumSepolia { + if shouldUseCctpBridge(symbol) { + if addr, ok := hopBridgeContractAddresses[symbol][chainID][CctpL1Bridge]; ok { + return addr, CctpL1Bridge, nil + } + return + } + + if addr, ok := hopBridgeContractAddresses[symbol][chainID][L1Bridge]; ok { + return addr, L1Bridge, nil + } + return } - addr, exists := tokens[symbol] - if !exists { - return *new(common.Address), errorNotAvailableOnChainID + if shouldUseCctpBridge(symbol) { + if addr, ok := hopBridgeContractAddresses[symbol][chainID][CctpL2Bridge]; ok { + return addr, CctpL2Bridge, nil + } + return } - return addr, nil -} - -func L1BridgeContractAddress(chainID uint64, symbol string) (common.Address, error) { - tokens, exists := l1BridgeContractAddress[chainID] - if !exists { - return *new(common.Address), errorNotAvailableOnChainID - } - - addr, exists := tokens[symbol] - if !exists { - return *new(common.Address), errorNotAvailableOnChainID - } - - return addr, nil + if isHTokenSend() || !shouldUseAmm(symbol) { + if addr, ok := hopBridgeContractAddresses[symbol][chainID][L2Bridge]; ok { + return addr, L2Bridge, nil + } + return + } + + if addr, ok := hopBridgeContractAddresses[symbol][chainID][L2AmmWrapper]; ok { + return addr, L2AmmWrapper, nil + } + return } diff --git a/contracts/hop/l1Contracts/l1CctpImplementation/l1CctpImplementation.go b/contracts/hop/l1Contracts/l1CctpImplementation/l1CctpImplementation.go new file mode 100644 index 000000000..33ee69248 --- /dev/null +++ b/contracts/hop/l1Contracts/l1CctpImplementation/l1CctpImplementation.go @@ -0,0 +1,552 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package hopL1CctpImplementation + +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 +) + +// HopL1CctpImplementationMetaData contains all meta data concerning the HopL1CctpImplementation contract. +var HopL1CctpImplementationMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nativeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"cctpAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeCollectorAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minBonderFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"chainIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32[]\",\"name\":\"domains\",\"type\":\"uint32[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"cctpNonce\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"}],\"name\":\"CCTPTransferSent\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"activeChainIds\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"cctp\",\"outputs\":[{\"internalType\":\"contractICCTP\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"destinationDomains\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeCollectorAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minBonderFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nativeToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"}],\"name\":\"send\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// HopL1CctpImplementationABI is the input ABI used to generate the binding from. +// Deprecated: Use HopL1CctpImplementationMetaData.ABI instead. +var HopL1CctpImplementationABI = HopL1CctpImplementationMetaData.ABI + +// HopL1CctpImplementation is an auto generated Go binding around an Ethereum contract. +type HopL1CctpImplementation struct { + HopL1CctpImplementationCaller // Read-only binding to the contract + HopL1CctpImplementationTransactor // Write-only binding to the contract + HopL1CctpImplementationFilterer // Log filterer for contract events +} + +// HopL1CctpImplementationCaller is an auto generated read-only Go binding around an Ethereum contract. +type HopL1CctpImplementationCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// HopL1CctpImplementationTransactor is an auto generated write-only Go binding around an Ethereum contract. +type HopL1CctpImplementationTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// HopL1CctpImplementationFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type HopL1CctpImplementationFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// HopL1CctpImplementationSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type HopL1CctpImplementationSession struct { + Contract *HopL1CctpImplementation // 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 +} + +// HopL1CctpImplementationCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type HopL1CctpImplementationCallerSession struct { + Contract *HopL1CctpImplementationCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// HopL1CctpImplementationTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type HopL1CctpImplementationTransactorSession struct { + Contract *HopL1CctpImplementationTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// HopL1CctpImplementationRaw is an auto generated low-level Go binding around an Ethereum contract. +type HopL1CctpImplementationRaw struct { + Contract *HopL1CctpImplementation // Generic contract binding to access the raw methods on +} + +// HopL1CctpImplementationCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type HopL1CctpImplementationCallerRaw struct { + Contract *HopL1CctpImplementationCaller // Generic read-only contract binding to access the raw methods on +} + +// HopL1CctpImplementationTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type HopL1CctpImplementationTransactorRaw struct { + Contract *HopL1CctpImplementationTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewHopL1CctpImplementation creates a new instance of HopL1CctpImplementation, bound to a specific deployed contract. +func NewHopL1CctpImplementation(address common.Address, backend bind.ContractBackend) (*HopL1CctpImplementation, error) { + contract, err := bindHopL1CctpImplementation(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &HopL1CctpImplementation{HopL1CctpImplementationCaller: HopL1CctpImplementationCaller{contract: contract}, HopL1CctpImplementationTransactor: HopL1CctpImplementationTransactor{contract: contract}, HopL1CctpImplementationFilterer: HopL1CctpImplementationFilterer{contract: contract}}, nil +} + +// NewHopL1CctpImplementationCaller creates a new read-only instance of HopL1CctpImplementation, bound to a specific deployed contract. +func NewHopL1CctpImplementationCaller(address common.Address, caller bind.ContractCaller) (*HopL1CctpImplementationCaller, error) { + contract, err := bindHopL1CctpImplementation(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &HopL1CctpImplementationCaller{contract: contract}, nil +} + +// NewHopL1CctpImplementationTransactor creates a new write-only instance of HopL1CctpImplementation, bound to a specific deployed contract. +func NewHopL1CctpImplementationTransactor(address common.Address, transactor bind.ContractTransactor) (*HopL1CctpImplementationTransactor, error) { + contract, err := bindHopL1CctpImplementation(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &HopL1CctpImplementationTransactor{contract: contract}, nil +} + +// NewHopL1CctpImplementationFilterer creates a new log filterer instance of HopL1CctpImplementation, bound to a specific deployed contract. +func NewHopL1CctpImplementationFilterer(address common.Address, filterer bind.ContractFilterer) (*HopL1CctpImplementationFilterer, error) { + contract, err := bindHopL1CctpImplementation(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &HopL1CctpImplementationFilterer{contract: contract}, nil +} + +// bindHopL1CctpImplementation binds a generic wrapper to an already deployed contract. +func bindHopL1CctpImplementation(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := HopL1CctpImplementationMetaData.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 (_HopL1CctpImplementation *HopL1CctpImplementationRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _HopL1CctpImplementation.Contract.HopL1CctpImplementationCaller.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 (_HopL1CctpImplementation *HopL1CctpImplementationRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _HopL1CctpImplementation.Contract.HopL1CctpImplementationTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_HopL1CctpImplementation *HopL1CctpImplementationRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _HopL1CctpImplementation.Contract.HopL1CctpImplementationTransactor.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 (_HopL1CctpImplementation *HopL1CctpImplementationCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _HopL1CctpImplementation.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 (_HopL1CctpImplementation *HopL1CctpImplementationTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _HopL1CctpImplementation.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_HopL1CctpImplementation *HopL1CctpImplementationTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _HopL1CctpImplementation.Contract.contract.Transact(opts, method, params...) +} + +// ActiveChainIds is a free data retrieval call binding the contract method 0xc97d172e. +// +// Solidity: function activeChainIds(uint256 ) view returns(bool) +func (_HopL1CctpImplementation *HopL1CctpImplementationCaller) ActiveChainIds(opts *bind.CallOpts, arg0 *big.Int) (bool, error) { + var out []interface{} + err := _HopL1CctpImplementation.contract.Call(opts, &out, "activeChainIds", arg0) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// ActiveChainIds is a free data retrieval call binding the contract method 0xc97d172e. +// +// Solidity: function activeChainIds(uint256 ) view returns(bool) +func (_HopL1CctpImplementation *HopL1CctpImplementationSession) ActiveChainIds(arg0 *big.Int) (bool, error) { + return _HopL1CctpImplementation.Contract.ActiveChainIds(&_HopL1CctpImplementation.CallOpts, arg0) +} + +// ActiveChainIds is a free data retrieval call binding the contract method 0xc97d172e. +// +// Solidity: function activeChainIds(uint256 ) view returns(bool) +func (_HopL1CctpImplementation *HopL1CctpImplementationCallerSession) ActiveChainIds(arg0 *big.Int) (bool, error) { + return _HopL1CctpImplementation.Contract.ActiveChainIds(&_HopL1CctpImplementation.CallOpts, arg0) +} + +// Cctp is a free data retrieval call binding the contract method 0xe3329e32. +// +// Solidity: function cctp() view returns(address) +func (_HopL1CctpImplementation *HopL1CctpImplementationCaller) Cctp(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL1CctpImplementation.contract.Call(opts, &out, "cctp") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Cctp is a free data retrieval call binding the contract method 0xe3329e32. +// +// Solidity: function cctp() view returns(address) +func (_HopL1CctpImplementation *HopL1CctpImplementationSession) Cctp() (common.Address, error) { + return _HopL1CctpImplementation.Contract.Cctp(&_HopL1CctpImplementation.CallOpts) +} + +// Cctp is a free data retrieval call binding the contract method 0xe3329e32. +// +// Solidity: function cctp() view returns(address) +func (_HopL1CctpImplementation *HopL1CctpImplementationCallerSession) Cctp() (common.Address, error) { + return _HopL1CctpImplementation.Contract.Cctp(&_HopL1CctpImplementation.CallOpts) +} + +// DestinationDomains is a free data retrieval call binding the contract method 0x89aad5dc. +// +// Solidity: function destinationDomains(uint256 ) view returns(uint32) +func (_HopL1CctpImplementation *HopL1CctpImplementationCaller) DestinationDomains(opts *bind.CallOpts, arg0 *big.Int) (uint32, error) { + var out []interface{} + err := _HopL1CctpImplementation.contract.Call(opts, &out, "destinationDomains", arg0) + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +// DestinationDomains is a free data retrieval call binding the contract method 0x89aad5dc. +// +// Solidity: function destinationDomains(uint256 ) view returns(uint32) +func (_HopL1CctpImplementation *HopL1CctpImplementationSession) DestinationDomains(arg0 *big.Int) (uint32, error) { + return _HopL1CctpImplementation.Contract.DestinationDomains(&_HopL1CctpImplementation.CallOpts, arg0) +} + +// DestinationDomains is a free data retrieval call binding the contract method 0x89aad5dc. +// +// Solidity: function destinationDomains(uint256 ) view returns(uint32) +func (_HopL1CctpImplementation *HopL1CctpImplementationCallerSession) DestinationDomains(arg0 *big.Int) (uint32, error) { + return _HopL1CctpImplementation.Contract.DestinationDomains(&_HopL1CctpImplementation.CallOpts, arg0) +} + +// FeeCollectorAddress is a free data retrieval call binding the contract method 0xf108e225. +// +// Solidity: function feeCollectorAddress() view returns(address) +func (_HopL1CctpImplementation *HopL1CctpImplementationCaller) FeeCollectorAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL1CctpImplementation.contract.Call(opts, &out, "feeCollectorAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// FeeCollectorAddress is a free data retrieval call binding the contract method 0xf108e225. +// +// Solidity: function feeCollectorAddress() view returns(address) +func (_HopL1CctpImplementation *HopL1CctpImplementationSession) FeeCollectorAddress() (common.Address, error) { + return _HopL1CctpImplementation.Contract.FeeCollectorAddress(&_HopL1CctpImplementation.CallOpts) +} + +// FeeCollectorAddress is a free data retrieval call binding the contract method 0xf108e225. +// +// Solidity: function feeCollectorAddress() view returns(address) +func (_HopL1CctpImplementation *HopL1CctpImplementationCallerSession) FeeCollectorAddress() (common.Address, error) { + return _HopL1CctpImplementation.Contract.FeeCollectorAddress(&_HopL1CctpImplementation.CallOpts) +} + +// MinBonderFee is a free data retrieval call binding the contract method 0x50fc2401. +// +// Solidity: function minBonderFee() view returns(uint256) +func (_HopL1CctpImplementation *HopL1CctpImplementationCaller) MinBonderFee(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _HopL1CctpImplementation.contract.Call(opts, &out, "minBonderFee") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MinBonderFee is a free data retrieval call binding the contract method 0x50fc2401. +// +// Solidity: function minBonderFee() view returns(uint256) +func (_HopL1CctpImplementation *HopL1CctpImplementationSession) MinBonderFee() (*big.Int, error) { + return _HopL1CctpImplementation.Contract.MinBonderFee(&_HopL1CctpImplementation.CallOpts) +} + +// MinBonderFee is a free data retrieval call binding the contract method 0x50fc2401. +// +// Solidity: function minBonderFee() view returns(uint256) +func (_HopL1CctpImplementation *HopL1CctpImplementationCallerSession) MinBonderFee() (*big.Int, error) { + return _HopL1CctpImplementation.Contract.MinBonderFee(&_HopL1CctpImplementation.CallOpts) +} + +// NativeToken is a free data retrieval call binding the contract method 0xe1758bd8. +// +// Solidity: function nativeToken() view returns(address) +func (_HopL1CctpImplementation *HopL1CctpImplementationCaller) NativeToken(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL1CctpImplementation.contract.Call(opts, &out, "nativeToken") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// NativeToken is a free data retrieval call binding the contract method 0xe1758bd8. +// +// Solidity: function nativeToken() view returns(address) +func (_HopL1CctpImplementation *HopL1CctpImplementationSession) NativeToken() (common.Address, error) { + return _HopL1CctpImplementation.Contract.NativeToken(&_HopL1CctpImplementation.CallOpts) +} + +// NativeToken is a free data retrieval call binding the contract method 0xe1758bd8. +// +// Solidity: function nativeToken() view returns(address) +func (_HopL1CctpImplementation *HopL1CctpImplementationCallerSession) NativeToken() (common.Address, error) { + return _HopL1CctpImplementation.Contract.NativeToken(&_HopL1CctpImplementation.CallOpts) +} + +// Send is a paid mutator transaction binding the contract method 0xa134ce5b. +// +// Solidity: function send(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee) returns() +func (_HopL1CctpImplementation *HopL1CctpImplementationTransactor) Send(opts *bind.TransactOpts, chainId *big.Int, recipient common.Address, amount *big.Int, bonderFee *big.Int) (*types.Transaction, error) { + return _HopL1CctpImplementation.contract.Transact(opts, "send", chainId, recipient, amount, bonderFee) +} + +// Send is a paid mutator transaction binding the contract method 0xa134ce5b. +// +// Solidity: function send(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee) returns() +func (_HopL1CctpImplementation *HopL1CctpImplementationSession) Send(chainId *big.Int, recipient common.Address, amount *big.Int, bonderFee *big.Int) (*types.Transaction, error) { + return _HopL1CctpImplementation.Contract.Send(&_HopL1CctpImplementation.TransactOpts, chainId, recipient, amount, bonderFee) +} + +// Send is a paid mutator transaction binding the contract method 0xa134ce5b. +// +// Solidity: function send(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee) returns() +func (_HopL1CctpImplementation *HopL1CctpImplementationTransactorSession) Send(chainId *big.Int, recipient common.Address, amount *big.Int, bonderFee *big.Int) (*types.Transaction, error) { + return _HopL1CctpImplementation.Contract.Send(&_HopL1CctpImplementation.TransactOpts, chainId, recipient, amount, bonderFee) +} + +// HopL1CctpImplementationCCTPTransferSentIterator is returned from FilterCCTPTransferSent and is used to iterate over the raw logs and unpacked data for CCTPTransferSent events raised by the HopL1CctpImplementation contract. +type HopL1CctpImplementationCCTPTransferSentIterator struct { + Event *HopL1CctpImplementationCCTPTransferSent // 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 *HopL1CctpImplementationCCTPTransferSentIterator) 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(HopL1CctpImplementationCCTPTransferSent) + 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(HopL1CctpImplementationCCTPTransferSent) + 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 *HopL1CctpImplementationCCTPTransferSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1CctpImplementationCCTPTransferSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1CctpImplementationCCTPTransferSent represents a CCTPTransferSent event raised by the HopL1CctpImplementation contract. +type HopL1CctpImplementationCCTPTransferSent struct { + CctpNonce uint64 + ChainId *big.Int + Recipient common.Address + Amount *big.Int + BonderFee *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCCTPTransferSent is a free log retrieval operation binding the contract event 0x10bf4019e09db5876a05d237bfcc676cd84eee2c23f820284906dd7cfa70d2c4. +// +// Solidity: event CCTPTransferSent(uint64 indexed cctpNonce, uint256 indexed chainId, address indexed recipient, uint256 amount, uint256 bonderFee) +func (_HopL1CctpImplementation *HopL1CctpImplementationFilterer) FilterCCTPTransferSent(opts *bind.FilterOpts, cctpNonce []uint64, chainId []*big.Int, recipient []common.Address) (*HopL1CctpImplementationCCTPTransferSentIterator, error) { + + var cctpNonceRule []interface{} + for _, cctpNonceItem := range cctpNonce { + cctpNonceRule = append(cctpNonceRule, cctpNonceItem) + } + var chainIdRule []interface{} + for _, chainIdItem := range chainId { + chainIdRule = append(chainIdRule, chainIdItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _HopL1CctpImplementation.contract.FilterLogs(opts, "CCTPTransferSent", cctpNonceRule, chainIdRule, recipientRule) + if err != nil { + return nil, err + } + return &HopL1CctpImplementationCCTPTransferSentIterator{contract: _HopL1CctpImplementation.contract, event: "CCTPTransferSent", logs: logs, sub: sub}, nil +} + +// WatchCCTPTransferSent is a free log subscription operation binding the contract event 0x10bf4019e09db5876a05d237bfcc676cd84eee2c23f820284906dd7cfa70d2c4. +// +// Solidity: event CCTPTransferSent(uint64 indexed cctpNonce, uint256 indexed chainId, address indexed recipient, uint256 amount, uint256 bonderFee) +func (_HopL1CctpImplementation *HopL1CctpImplementationFilterer) WatchCCTPTransferSent(opts *bind.WatchOpts, sink chan<- *HopL1CctpImplementationCCTPTransferSent, cctpNonce []uint64, chainId []*big.Int, recipient []common.Address) (event.Subscription, error) { + + var cctpNonceRule []interface{} + for _, cctpNonceItem := range cctpNonce { + cctpNonceRule = append(cctpNonceRule, cctpNonceItem) + } + var chainIdRule []interface{} + for _, chainIdItem := range chainId { + chainIdRule = append(chainIdRule, chainIdItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _HopL1CctpImplementation.contract.WatchLogs(opts, "CCTPTransferSent", cctpNonceRule, chainIdRule, recipientRule) + 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(HopL1CctpImplementationCCTPTransferSent) + if err := _HopL1CctpImplementation.contract.UnpackLog(event, "CCTPTransferSent", 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 +} + +// ParseCCTPTransferSent is a log parse operation binding the contract event 0x10bf4019e09db5876a05d237bfcc676cd84eee2c23f820284906dd7cfa70d2c4. +// +// Solidity: event CCTPTransferSent(uint64 indexed cctpNonce, uint256 indexed chainId, address indexed recipient, uint256 amount, uint256 bonderFee) +func (_HopL1CctpImplementation *HopL1CctpImplementationFilterer) ParseCCTPTransferSent(log types.Log) (*HopL1CctpImplementationCCTPTransferSent, error) { + event := new(HopL1CctpImplementationCCTPTransferSent) + if err := _HopL1CctpImplementation.contract.UnpackLog(event, "CCTPTransferSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/contracts/hop/l1Contracts/l1Erc20Bridge/l1Erc20Bridge.go b/contracts/hop/l1Contracts/l1Erc20Bridge/l1Erc20Bridge.go new file mode 100644 index 000000000..695c92520 --- /dev/null +++ b/contracts/hop/l1Contracts/l1Erc20Bridge/l1Erc20Bridge.go @@ -0,0 +1,3571 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package hopL1Erc20Bridge + +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 +) + +// BridgeTransferRoot is an auto generated low-level Go binding around an user-defined struct. +type BridgeTransferRoot struct { + Total *big.Int + AmountWithdrawn *big.Int + CreatedAt *big.Int +} + +// HopL1Erc20BridgeMetaData contains all meta data concerning the HopL1Erc20Bridge contract. +var HopL1Erc20BridgeMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"_l1CanonicalToken\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"bonders\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"_governance\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newBonder\",\"type\":\"address\"}],\"name\":\"BonderAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousBonder\",\"type\":\"address\"}],\"name\":\"BonderRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferRootId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"originalAmount\",\"type\":\"uint256\"}],\"name\":\"ChallengeResolved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalBondsSettled\",\"type\":\"uint256\"}],\"name\":\"MultipleWithdrawalsSettled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Stake\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferRootId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"originalAmount\",\"type\":\"uint256\"}],\"name\":\"TransferBondChallenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferRootBonded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"originChainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"TransferRootConfirmed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"TransferRootSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"relayerFee\",\"type\":\"uint256\"}],\"name\":\"TransferSentToL2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Unstake\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"}],\"name\":\"WithdrawalBondSettled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"WithdrawalBonded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"}],\"name\":\"Withdrew\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"CHALLENGE_AMOUNT_DIVISOR\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TIME_SLOT_SIZE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"addBonder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"bondTransferRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"}],\"name\":\"bondWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"chainBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengeResolutionPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"originalAmount\",\"type\":\"uint256\"}],\"name\":\"challengeTransferBond\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"originChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rootCommittedAt\",\"type\":\"uint256\"}],\"name\":\"confirmTransferRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"crossDomainMessengerWrappers\",\"outputs\":[{\"internalType\":\"contractIMessengerWrapper\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"getBondForTransferAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"}],\"name\":\"getBondedWithdrawalAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"getChallengeAmountForTransferAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"getCredit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"getDebitAndAdditionalDebit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"maybeBonder\",\"type\":\"address\"}],\"name\":\"getIsBonder\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"getRawDebit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"}],\"name\":\"getTimeSlot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"getTransferId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"getTransferRoot\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"total\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountWithdrawn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"}],\"internalType\":\"structBridge.TransferRoot\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"getTransferRootId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governance\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"isChainIdPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"}],\"name\":\"isTransferIdSpent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l1CanonicalToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minTransferRootBondDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"removeBonder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"originalAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"rescueTransferRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"originalAmount\",\"type\":\"uint256\"}],\"name\":\"resolveChallenge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"relayerFee\",\"type\":\"uint256\"}],\"name\":\"sendToL2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isPaused\",\"type\":\"bool\"}],\"name\":\"setChainIdDepositsPaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"}],\"name\":\"setChallengePeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_challengeResolutionPeriod\",\"type\":\"uint256\"}],\"name\":\"setChallengeResolutionPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contractIMessengerWrapper\",\"name\":\"_crossDomainMessengerWrapper\",\"type\":\"address\"}],\"name\":\"setCrossDomainMessengerWrapper\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newGovernance\",\"type\":\"address\"}],\"name\":\"setGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minTransferRootBondDelay\",\"type\":\"uint256\"}],\"name\":\"setMinTransferRootBondDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"transferRootTotalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"transferIdTreeIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"siblings\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"totalLeaves\",\"type\":\"uint256\"}],\"name\":\"settleBondedWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"bytes32[]\",\"name\":\"transferIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"settleBondedWithdrawals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"timeSlotToAmountBonded\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"transferBonds\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"challengeStartTime\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"challengeResolved\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"transferRootCommittedAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"unstake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"transferRootTotalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"transferIdTreeIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"siblings\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"totalLeaves\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// HopL1Erc20BridgeABI is the input ABI used to generate the binding from. +// Deprecated: Use HopL1Erc20BridgeMetaData.ABI instead. +var HopL1Erc20BridgeABI = HopL1Erc20BridgeMetaData.ABI + +// HopL1Erc20Bridge is an auto generated Go binding around an Ethereum contract. +type HopL1Erc20Bridge struct { + HopL1Erc20BridgeCaller // Read-only binding to the contract + HopL1Erc20BridgeTransactor // Write-only binding to the contract + HopL1Erc20BridgeFilterer // Log filterer for contract events +} + +// HopL1Erc20BridgeCaller is an auto generated read-only Go binding around an Ethereum contract. +type HopL1Erc20BridgeCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// HopL1Erc20BridgeTransactor is an auto generated write-only Go binding around an Ethereum contract. +type HopL1Erc20BridgeTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// HopL1Erc20BridgeFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type HopL1Erc20BridgeFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// HopL1Erc20BridgeSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type HopL1Erc20BridgeSession struct { + Contract *HopL1Erc20Bridge // 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 +} + +// HopL1Erc20BridgeCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type HopL1Erc20BridgeCallerSession struct { + Contract *HopL1Erc20BridgeCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// HopL1Erc20BridgeTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type HopL1Erc20BridgeTransactorSession struct { + Contract *HopL1Erc20BridgeTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// HopL1Erc20BridgeRaw is an auto generated low-level Go binding around an Ethereum contract. +type HopL1Erc20BridgeRaw struct { + Contract *HopL1Erc20Bridge // Generic contract binding to access the raw methods on +} + +// HopL1Erc20BridgeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type HopL1Erc20BridgeCallerRaw struct { + Contract *HopL1Erc20BridgeCaller // Generic read-only contract binding to access the raw methods on +} + +// HopL1Erc20BridgeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type HopL1Erc20BridgeTransactorRaw struct { + Contract *HopL1Erc20BridgeTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewHopL1Erc20Bridge creates a new instance of HopL1Erc20Bridge, bound to a specific deployed contract. +func NewHopL1Erc20Bridge(address common.Address, backend bind.ContractBackend) (*HopL1Erc20Bridge, error) { + contract, err := bindHopL1Erc20Bridge(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &HopL1Erc20Bridge{HopL1Erc20BridgeCaller: HopL1Erc20BridgeCaller{contract: contract}, HopL1Erc20BridgeTransactor: HopL1Erc20BridgeTransactor{contract: contract}, HopL1Erc20BridgeFilterer: HopL1Erc20BridgeFilterer{contract: contract}}, nil +} + +// NewHopL1Erc20BridgeCaller creates a new read-only instance of HopL1Erc20Bridge, bound to a specific deployed contract. +func NewHopL1Erc20BridgeCaller(address common.Address, caller bind.ContractCaller) (*HopL1Erc20BridgeCaller, error) { + contract, err := bindHopL1Erc20Bridge(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &HopL1Erc20BridgeCaller{contract: contract}, nil +} + +// NewHopL1Erc20BridgeTransactor creates a new write-only instance of HopL1Erc20Bridge, bound to a specific deployed contract. +func NewHopL1Erc20BridgeTransactor(address common.Address, transactor bind.ContractTransactor) (*HopL1Erc20BridgeTransactor, error) { + contract, err := bindHopL1Erc20Bridge(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &HopL1Erc20BridgeTransactor{contract: contract}, nil +} + +// NewHopL1Erc20BridgeFilterer creates a new log filterer instance of HopL1Erc20Bridge, bound to a specific deployed contract. +func NewHopL1Erc20BridgeFilterer(address common.Address, filterer bind.ContractFilterer) (*HopL1Erc20BridgeFilterer, error) { + contract, err := bindHopL1Erc20Bridge(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &HopL1Erc20BridgeFilterer{contract: contract}, nil +} + +// bindHopL1Erc20Bridge binds a generic wrapper to an already deployed contract. +func bindHopL1Erc20Bridge(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := HopL1Erc20BridgeMetaData.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 (_HopL1Erc20Bridge *HopL1Erc20BridgeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _HopL1Erc20Bridge.Contract.HopL1Erc20BridgeCaller.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 (_HopL1Erc20Bridge *HopL1Erc20BridgeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.HopL1Erc20BridgeTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_HopL1Erc20Bridge *HopL1Erc20BridgeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.HopL1Erc20BridgeTransactor.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 (_HopL1Erc20Bridge *HopL1Erc20BridgeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _HopL1Erc20Bridge.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 (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.contract.Transact(opts, method, params...) +} + +// CHALLENGEAMOUNTDIVISOR is a free data retrieval call binding the contract method 0x98c4f76d. +// +// Solidity: function CHALLENGE_AMOUNT_DIVISOR() view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCaller) CHALLENGEAMOUNTDIVISOR(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _HopL1Erc20Bridge.contract.Call(opts, &out, "CHALLENGE_AMOUNT_DIVISOR") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// CHALLENGEAMOUNTDIVISOR is a free data retrieval call binding the contract method 0x98c4f76d. +// +// Solidity: function CHALLENGE_AMOUNT_DIVISOR() view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) CHALLENGEAMOUNTDIVISOR() (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.CHALLENGEAMOUNTDIVISOR(&_HopL1Erc20Bridge.CallOpts) +} + +// CHALLENGEAMOUNTDIVISOR is a free data retrieval call binding the contract method 0x98c4f76d. +// +// Solidity: function CHALLENGE_AMOUNT_DIVISOR() view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCallerSession) CHALLENGEAMOUNTDIVISOR() (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.CHALLENGEAMOUNTDIVISOR(&_HopL1Erc20Bridge.CallOpts) +} + +// TIMESLOTSIZE is a free data retrieval call binding the contract method 0x4de8c6e6. +// +// Solidity: function TIME_SLOT_SIZE() view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCaller) TIMESLOTSIZE(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _HopL1Erc20Bridge.contract.Call(opts, &out, "TIME_SLOT_SIZE") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TIMESLOTSIZE is a free data retrieval call binding the contract method 0x4de8c6e6. +// +// Solidity: function TIME_SLOT_SIZE() view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) TIMESLOTSIZE() (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.TIMESLOTSIZE(&_HopL1Erc20Bridge.CallOpts) +} + +// TIMESLOTSIZE is a free data retrieval call binding the contract method 0x4de8c6e6. +// +// Solidity: function TIME_SLOT_SIZE() view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCallerSession) TIMESLOTSIZE() (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.TIMESLOTSIZE(&_HopL1Erc20Bridge.CallOpts) +} + +// ChainBalance is a free data retrieval call binding the contract method 0xfc110b67. +// +// Solidity: function chainBalance(uint256 ) view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCaller) ChainBalance(opts *bind.CallOpts, arg0 *big.Int) (*big.Int, error) { + var out []interface{} + err := _HopL1Erc20Bridge.contract.Call(opts, &out, "chainBalance", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// ChainBalance is a free data retrieval call binding the contract method 0xfc110b67. +// +// Solidity: function chainBalance(uint256 ) view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) ChainBalance(arg0 *big.Int) (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.ChainBalance(&_HopL1Erc20Bridge.CallOpts, arg0) +} + +// ChainBalance is a free data retrieval call binding the contract method 0xfc110b67. +// +// Solidity: function chainBalance(uint256 ) view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCallerSession) ChainBalance(arg0 *big.Int) (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.ChainBalance(&_HopL1Erc20Bridge.CallOpts, arg0) +} + +// ChallengePeriod is a free data retrieval call binding the contract method 0xf3f480d9. +// +// Solidity: function challengePeriod() view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCaller) ChallengePeriod(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _HopL1Erc20Bridge.contract.Call(opts, &out, "challengePeriod") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// ChallengePeriod is a free data retrieval call binding the contract method 0xf3f480d9. +// +// Solidity: function challengePeriod() view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) ChallengePeriod() (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.ChallengePeriod(&_HopL1Erc20Bridge.CallOpts) +} + +// ChallengePeriod is a free data retrieval call binding the contract method 0xf3f480d9. +// +// Solidity: function challengePeriod() view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCallerSession) ChallengePeriod() (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.ChallengePeriod(&_HopL1Erc20Bridge.CallOpts) +} + +// ChallengeResolutionPeriod is a free data retrieval call binding the contract method 0x767631d5. +// +// Solidity: function challengeResolutionPeriod() view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCaller) ChallengeResolutionPeriod(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _HopL1Erc20Bridge.contract.Call(opts, &out, "challengeResolutionPeriod") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// ChallengeResolutionPeriod is a free data retrieval call binding the contract method 0x767631d5. +// +// Solidity: function challengeResolutionPeriod() view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) ChallengeResolutionPeriod() (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.ChallengeResolutionPeriod(&_HopL1Erc20Bridge.CallOpts) +} + +// ChallengeResolutionPeriod is a free data retrieval call binding the contract method 0x767631d5. +// +// Solidity: function challengeResolutionPeriod() view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCallerSession) ChallengeResolutionPeriod() (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.ChallengeResolutionPeriod(&_HopL1Erc20Bridge.CallOpts) +} + +// CrossDomainMessengerWrappers is a free data retrieval call binding the contract method 0xa35962f3. +// +// Solidity: function crossDomainMessengerWrappers(uint256 ) view returns(address) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCaller) CrossDomainMessengerWrappers(opts *bind.CallOpts, arg0 *big.Int) (common.Address, error) { + var out []interface{} + err := _HopL1Erc20Bridge.contract.Call(opts, &out, "crossDomainMessengerWrappers", arg0) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// CrossDomainMessengerWrappers is a free data retrieval call binding the contract method 0xa35962f3. +// +// Solidity: function crossDomainMessengerWrappers(uint256 ) view returns(address) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) CrossDomainMessengerWrappers(arg0 *big.Int) (common.Address, error) { + return _HopL1Erc20Bridge.Contract.CrossDomainMessengerWrappers(&_HopL1Erc20Bridge.CallOpts, arg0) +} + +// CrossDomainMessengerWrappers is a free data retrieval call binding the contract method 0xa35962f3. +// +// Solidity: function crossDomainMessengerWrappers(uint256 ) view returns(address) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCallerSession) CrossDomainMessengerWrappers(arg0 *big.Int) (common.Address, error) { + return _HopL1Erc20Bridge.Contract.CrossDomainMessengerWrappers(&_HopL1Erc20Bridge.CallOpts, arg0) +} + +// GetBondForTransferAmount is a free data retrieval call binding the contract method 0xe19be150. +// +// Solidity: function getBondForTransferAmount(uint256 amount) pure returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCaller) GetBondForTransferAmount(opts *bind.CallOpts, amount *big.Int) (*big.Int, error) { + var out []interface{} + err := _HopL1Erc20Bridge.contract.Call(opts, &out, "getBondForTransferAmount", amount) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetBondForTransferAmount is a free data retrieval call binding the contract method 0xe19be150. +// +// Solidity: function getBondForTransferAmount(uint256 amount) pure returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) GetBondForTransferAmount(amount *big.Int) (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.GetBondForTransferAmount(&_HopL1Erc20Bridge.CallOpts, amount) +} + +// GetBondForTransferAmount is a free data retrieval call binding the contract method 0xe19be150. +// +// Solidity: function getBondForTransferAmount(uint256 amount) pure returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCallerSession) GetBondForTransferAmount(amount *big.Int) (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.GetBondForTransferAmount(&_HopL1Erc20Bridge.CallOpts, amount) +} + +// GetBondedWithdrawalAmount is a free data retrieval call binding the contract method 0x302830ab. +// +// Solidity: function getBondedWithdrawalAmount(address bonder, bytes32 transferId) view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCaller) GetBondedWithdrawalAmount(opts *bind.CallOpts, bonder common.Address, transferId [32]byte) (*big.Int, error) { + var out []interface{} + err := _HopL1Erc20Bridge.contract.Call(opts, &out, "getBondedWithdrawalAmount", bonder, transferId) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetBondedWithdrawalAmount is a free data retrieval call binding the contract method 0x302830ab. +// +// Solidity: function getBondedWithdrawalAmount(address bonder, bytes32 transferId) view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) GetBondedWithdrawalAmount(bonder common.Address, transferId [32]byte) (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.GetBondedWithdrawalAmount(&_HopL1Erc20Bridge.CallOpts, bonder, transferId) +} + +// GetBondedWithdrawalAmount is a free data retrieval call binding the contract method 0x302830ab. +// +// Solidity: function getBondedWithdrawalAmount(address bonder, bytes32 transferId) view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCallerSession) GetBondedWithdrawalAmount(bonder common.Address, transferId [32]byte) (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.GetBondedWithdrawalAmount(&_HopL1Erc20Bridge.CallOpts, bonder, transferId) +} + +// GetChainId is a free data retrieval call binding the contract method 0x3408e470. +// +// Solidity: function getChainId() view returns(uint256 chainId) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCaller) GetChainId(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _HopL1Erc20Bridge.contract.Call(opts, &out, "getChainId") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetChainId is a free data retrieval call binding the contract method 0x3408e470. +// +// Solidity: function getChainId() view returns(uint256 chainId) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) GetChainId() (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.GetChainId(&_HopL1Erc20Bridge.CallOpts) +} + +// GetChainId is a free data retrieval call binding the contract method 0x3408e470. +// +// Solidity: function getChainId() view returns(uint256 chainId) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCallerSession) GetChainId() (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.GetChainId(&_HopL1Erc20Bridge.CallOpts) +} + +// GetChallengeAmountForTransferAmount is a free data retrieval call binding the contract method 0xa239f5ee. +// +// Solidity: function getChallengeAmountForTransferAmount(uint256 amount) pure returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCaller) GetChallengeAmountForTransferAmount(opts *bind.CallOpts, amount *big.Int) (*big.Int, error) { + var out []interface{} + err := _HopL1Erc20Bridge.contract.Call(opts, &out, "getChallengeAmountForTransferAmount", amount) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetChallengeAmountForTransferAmount is a free data retrieval call binding the contract method 0xa239f5ee. +// +// Solidity: function getChallengeAmountForTransferAmount(uint256 amount) pure returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) GetChallengeAmountForTransferAmount(amount *big.Int) (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.GetChallengeAmountForTransferAmount(&_HopL1Erc20Bridge.CallOpts, amount) +} + +// GetChallengeAmountForTransferAmount is a free data retrieval call binding the contract method 0xa239f5ee. +// +// Solidity: function getChallengeAmountForTransferAmount(uint256 amount) pure returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCallerSession) GetChallengeAmountForTransferAmount(amount *big.Int) (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.GetChallengeAmountForTransferAmount(&_HopL1Erc20Bridge.CallOpts, amount) +} + +// GetCredit is a free data retrieval call binding the contract method 0x57344e6f. +// +// Solidity: function getCredit(address bonder) view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCaller) GetCredit(opts *bind.CallOpts, bonder common.Address) (*big.Int, error) { + var out []interface{} + err := _HopL1Erc20Bridge.contract.Call(opts, &out, "getCredit", bonder) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetCredit is a free data retrieval call binding the contract method 0x57344e6f. +// +// Solidity: function getCredit(address bonder) view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) GetCredit(bonder common.Address) (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.GetCredit(&_HopL1Erc20Bridge.CallOpts, bonder) +} + +// GetCredit is a free data retrieval call binding the contract method 0x57344e6f. +// +// Solidity: function getCredit(address bonder) view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCallerSession) GetCredit(bonder common.Address) (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.GetCredit(&_HopL1Erc20Bridge.CallOpts, bonder) +} + +// GetDebitAndAdditionalDebit is a free data retrieval call binding the contract method 0xffa9286c. +// +// Solidity: function getDebitAndAdditionalDebit(address bonder) view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCaller) GetDebitAndAdditionalDebit(opts *bind.CallOpts, bonder common.Address) (*big.Int, error) { + var out []interface{} + err := _HopL1Erc20Bridge.contract.Call(opts, &out, "getDebitAndAdditionalDebit", bonder) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetDebitAndAdditionalDebit is a free data retrieval call binding the contract method 0xffa9286c. +// +// Solidity: function getDebitAndAdditionalDebit(address bonder) view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) GetDebitAndAdditionalDebit(bonder common.Address) (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.GetDebitAndAdditionalDebit(&_HopL1Erc20Bridge.CallOpts, bonder) +} + +// GetDebitAndAdditionalDebit is a free data retrieval call binding the contract method 0xffa9286c. +// +// Solidity: function getDebitAndAdditionalDebit(address bonder) view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCallerSession) GetDebitAndAdditionalDebit(bonder common.Address) (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.GetDebitAndAdditionalDebit(&_HopL1Erc20Bridge.CallOpts, bonder) +} + +// GetIsBonder is a free data retrieval call binding the contract method 0xd5ef7551. +// +// Solidity: function getIsBonder(address maybeBonder) view returns(bool) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCaller) GetIsBonder(opts *bind.CallOpts, maybeBonder common.Address) (bool, error) { + var out []interface{} + err := _HopL1Erc20Bridge.contract.Call(opts, &out, "getIsBonder", maybeBonder) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// GetIsBonder is a free data retrieval call binding the contract method 0xd5ef7551. +// +// Solidity: function getIsBonder(address maybeBonder) view returns(bool) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) GetIsBonder(maybeBonder common.Address) (bool, error) { + return _HopL1Erc20Bridge.Contract.GetIsBonder(&_HopL1Erc20Bridge.CallOpts, maybeBonder) +} + +// GetIsBonder is a free data retrieval call binding the contract method 0xd5ef7551. +// +// Solidity: function getIsBonder(address maybeBonder) view returns(bool) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCallerSession) GetIsBonder(maybeBonder common.Address) (bool, error) { + return _HopL1Erc20Bridge.Contract.GetIsBonder(&_HopL1Erc20Bridge.CallOpts, maybeBonder) +} + +// GetRawDebit is a free data retrieval call binding the contract method 0x13948c76. +// +// Solidity: function getRawDebit(address bonder) view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCaller) GetRawDebit(opts *bind.CallOpts, bonder common.Address) (*big.Int, error) { + var out []interface{} + err := _HopL1Erc20Bridge.contract.Call(opts, &out, "getRawDebit", bonder) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetRawDebit is a free data retrieval call binding the contract method 0x13948c76. +// +// Solidity: function getRawDebit(address bonder) view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) GetRawDebit(bonder common.Address) (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.GetRawDebit(&_HopL1Erc20Bridge.CallOpts, bonder) +} + +// GetRawDebit is a free data retrieval call binding the contract method 0x13948c76. +// +// Solidity: function getRawDebit(address bonder) view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCallerSession) GetRawDebit(bonder common.Address) (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.GetRawDebit(&_HopL1Erc20Bridge.CallOpts, bonder) +} + +// GetTimeSlot is a free data retrieval call binding the contract method 0x2b85dcc9. +// +// Solidity: function getTimeSlot(uint256 time) pure returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCaller) GetTimeSlot(opts *bind.CallOpts, time *big.Int) (*big.Int, error) { + var out []interface{} + err := _HopL1Erc20Bridge.contract.Call(opts, &out, "getTimeSlot", time) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTimeSlot is a free data retrieval call binding the contract method 0x2b85dcc9. +// +// Solidity: function getTimeSlot(uint256 time) pure returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) GetTimeSlot(time *big.Int) (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.GetTimeSlot(&_HopL1Erc20Bridge.CallOpts, time) +} + +// GetTimeSlot is a free data retrieval call binding the contract method 0x2b85dcc9. +// +// Solidity: function getTimeSlot(uint256 time) pure returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCallerSession) GetTimeSlot(time *big.Int) (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.GetTimeSlot(&_HopL1Erc20Bridge.CallOpts, time) +} + +// GetTransferId is a free data retrieval call binding the contract method 0xaf215f94. +// +// Solidity: function getTransferId(uint256 chainId, address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline) pure returns(bytes32) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCaller) GetTransferId(opts *bind.CallOpts, chainId *big.Int, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) ([32]byte, error) { + var out []interface{} + err := _HopL1Erc20Bridge.contract.Call(opts, &out, "getTransferId", chainId, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetTransferId is a free data retrieval call binding the contract method 0xaf215f94. +// +// Solidity: function getTransferId(uint256 chainId, address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline) pure returns(bytes32) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) GetTransferId(chainId *big.Int, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) ([32]byte, error) { + return _HopL1Erc20Bridge.Contract.GetTransferId(&_HopL1Erc20Bridge.CallOpts, chainId, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline) +} + +// GetTransferId is a free data retrieval call binding the contract method 0xaf215f94. +// +// Solidity: function getTransferId(uint256 chainId, address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline) pure returns(bytes32) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCallerSession) GetTransferId(chainId *big.Int, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) ([32]byte, error) { + return _HopL1Erc20Bridge.Contract.GetTransferId(&_HopL1Erc20Bridge.CallOpts, chainId, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline) +} + +// GetTransferRoot is a free data retrieval call binding the contract method 0xce803b4f. +// +// Solidity: function getTransferRoot(bytes32 rootHash, uint256 totalAmount) view returns((uint256,uint256,uint256)) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCaller) GetTransferRoot(opts *bind.CallOpts, rootHash [32]byte, totalAmount *big.Int) (BridgeTransferRoot, error) { + var out []interface{} + err := _HopL1Erc20Bridge.contract.Call(opts, &out, "getTransferRoot", rootHash, totalAmount) + + if err != nil { + return *new(BridgeTransferRoot), err + } + + out0 := *abi.ConvertType(out[0], new(BridgeTransferRoot)).(*BridgeTransferRoot) + + return out0, err + +} + +// GetTransferRoot is a free data retrieval call binding the contract method 0xce803b4f. +// +// Solidity: function getTransferRoot(bytes32 rootHash, uint256 totalAmount) view returns((uint256,uint256,uint256)) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) GetTransferRoot(rootHash [32]byte, totalAmount *big.Int) (BridgeTransferRoot, error) { + return _HopL1Erc20Bridge.Contract.GetTransferRoot(&_HopL1Erc20Bridge.CallOpts, rootHash, totalAmount) +} + +// GetTransferRoot is a free data retrieval call binding the contract method 0xce803b4f. +// +// Solidity: function getTransferRoot(bytes32 rootHash, uint256 totalAmount) view returns((uint256,uint256,uint256)) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCallerSession) GetTransferRoot(rootHash [32]byte, totalAmount *big.Int) (BridgeTransferRoot, error) { + return _HopL1Erc20Bridge.Contract.GetTransferRoot(&_HopL1Erc20Bridge.CallOpts, rootHash, totalAmount) +} + +// GetTransferRootId is a free data retrieval call binding the contract method 0x960a7afa. +// +// Solidity: function getTransferRootId(bytes32 rootHash, uint256 totalAmount) pure returns(bytes32) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCaller) GetTransferRootId(opts *bind.CallOpts, rootHash [32]byte, totalAmount *big.Int) ([32]byte, error) { + var out []interface{} + err := _HopL1Erc20Bridge.contract.Call(opts, &out, "getTransferRootId", rootHash, totalAmount) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetTransferRootId is a free data retrieval call binding the contract method 0x960a7afa. +// +// Solidity: function getTransferRootId(bytes32 rootHash, uint256 totalAmount) pure returns(bytes32) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) GetTransferRootId(rootHash [32]byte, totalAmount *big.Int) ([32]byte, error) { + return _HopL1Erc20Bridge.Contract.GetTransferRootId(&_HopL1Erc20Bridge.CallOpts, rootHash, totalAmount) +} + +// GetTransferRootId is a free data retrieval call binding the contract method 0x960a7afa. +// +// Solidity: function getTransferRootId(bytes32 rootHash, uint256 totalAmount) pure returns(bytes32) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCallerSession) GetTransferRootId(rootHash [32]byte, totalAmount *big.Int) ([32]byte, error) { + return _HopL1Erc20Bridge.Contract.GetTransferRootId(&_HopL1Erc20Bridge.CallOpts, rootHash, totalAmount) +} + +// Governance is a free data retrieval call binding the contract method 0x5aa6e675. +// +// Solidity: function governance() view returns(address) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCaller) Governance(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL1Erc20Bridge.contract.Call(opts, &out, "governance") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Governance is a free data retrieval call binding the contract method 0x5aa6e675. +// +// Solidity: function governance() view returns(address) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) Governance() (common.Address, error) { + return _HopL1Erc20Bridge.Contract.Governance(&_HopL1Erc20Bridge.CallOpts) +} + +// Governance is a free data retrieval call binding the contract method 0x5aa6e675. +// +// Solidity: function governance() view returns(address) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCallerSession) Governance() (common.Address, error) { + return _HopL1Erc20Bridge.Contract.Governance(&_HopL1Erc20Bridge.CallOpts) +} + +// IsChainIdPaused is a free data retrieval call binding the contract method 0xfa2a69a3. +// +// Solidity: function isChainIdPaused(uint256 ) view returns(bool) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCaller) IsChainIdPaused(opts *bind.CallOpts, arg0 *big.Int) (bool, error) { + var out []interface{} + err := _HopL1Erc20Bridge.contract.Call(opts, &out, "isChainIdPaused", arg0) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsChainIdPaused is a free data retrieval call binding the contract method 0xfa2a69a3. +// +// Solidity: function isChainIdPaused(uint256 ) view returns(bool) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) IsChainIdPaused(arg0 *big.Int) (bool, error) { + return _HopL1Erc20Bridge.Contract.IsChainIdPaused(&_HopL1Erc20Bridge.CallOpts, arg0) +} + +// IsChainIdPaused is a free data retrieval call binding the contract method 0xfa2a69a3. +// +// Solidity: function isChainIdPaused(uint256 ) view returns(bool) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCallerSession) IsChainIdPaused(arg0 *big.Int) (bool, error) { + return _HopL1Erc20Bridge.Contract.IsChainIdPaused(&_HopL1Erc20Bridge.CallOpts, arg0) +} + +// IsTransferIdSpent is a free data retrieval call binding the contract method 0x3a7af631. +// +// Solidity: function isTransferIdSpent(bytes32 transferId) view returns(bool) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCaller) IsTransferIdSpent(opts *bind.CallOpts, transferId [32]byte) (bool, error) { + var out []interface{} + err := _HopL1Erc20Bridge.contract.Call(opts, &out, "isTransferIdSpent", transferId) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsTransferIdSpent is a free data retrieval call binding the contract method 0x3a7af631. +// +// Solidity: function isTransferIdSpent(bytes32 transferId) view returns(bool) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) IsTransferIdSpent(transferId [32]byte) (bool, error) { + return _HopL1Erc20Bridge.Contract.IsTransferIdSpent(&_HopL1Erc20Bridge.CallOpts, transferId) +} + +// IsTransferIdSpent is a free data retrieval call binding the contract method 0x3a7af631. +// +// Solidity: function isTransferIdSpent(bytes32 transferId) view returns(bool) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCallerSession) IsTransferIdSpent(transferId [32]byte) (bool, error) { + return _HopL1Erc20Bridge.Contract.IsTransferIdSpent(&_HopL1Erc20Bridge.CallOpts, transferId) +} + +// L1CanonicalToken is a free data retrieval call binding the contract method 0xb7a0bda6. +// +// Solidity: function l1CanonicalToken() view returns(address) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCaller) L1CanonicalToken(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL1Erc20Bridge.contract.Call(opts, &out, "l1CanonicalToken") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// L1CanonicalToken is a free data retrieval call binding the contract method 0xb7a0bda6. +// +// Solidity: function l1CanonicalToken() view returns(address) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) L1CanonicalToken() (common.Address, error) { + return _HopL1Erc20Bridge.Contract.L1CanonicalToken(&_HopL1Erc20Bridge.CallOpts) +} + +// L1CanonicalToken is a free data retrieval call binding the contract method 0xb7a0bda6. +// +// Solidity: function l1CanonicalToken() view returns(address) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCallerSession) L1CanonicalToken() (common.Address, error) { + return _HopL1Erc20Bridge.Contract.L1CanonicalToken(&_HopL1Erc20Bridge.CallOpts) +} + +// MinTransferRootBondDelay is a free data retrieval call binding the contract method 0x6cff06a7. +// +// Solidity: function minTransferRootBondDelay() view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCaller) MinTransferRootBondDelay(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _HopL1Erc20Bridge.contract.Call(opts, &out, "minTransferRootBondDelay") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MinTransferRootBondDelay is a free data retrieval call binding the contract method 0x6cff06a7. +// +// Solidity: function minTransferRootBondDelay() view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) MinTransferRootBondDelay() (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.MinTransferRootBondDelay(&_HopL1Erc20Bridge.CallOpts) +} + +// MinTransferRootBondDelay is a free data retrieval call binding the contract method 0x6cff06a7. +// +// Solidity: function minTransferRootBondDelay() view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCallerSession) MinTransferRootBondDelay() (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.MinTransferRootBondDelay(&_HopL1Erc20Bridge.CallOpts) +} + +// TimeSlotToAmountBonded is a free data retrieval call binding the contract method 0x7398d282. +// +// Solidity: function timeSlotToAmountBonded(uint256 , address ) view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCaller) TimeSlotToAmountBonded(opts *bind.CallOpts, arg0 *big.Int, arg1 common.Address) (*big.Int, error) { + var out []interface{} + err := _HopL1Erc20Bridge.contract.Call(opts, &out, "timeSlotToAmountBonded", arg0, arg1) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TimeSlotToAmountBonded is a free data retrieval call binding the contract method 0x7398d282. +// +// Solidity: function timeSlotToAmountBonded(uint256 , address ) view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) TimeSlotToAmountBonded(arg0 *big.Int, arg1 common.Address) (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.TimeSlotToAmountBonded(&_HopL1Erc20Bridge.CallOpts, arg0, arg1) +} + +// TimeSlotToAmountBonded is a free data retrieval call binding the contract method 0x7398d282. +// +// Solidity: function timeSlotToAmountBonded(uint256 , address ) view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCallerSession) TimeSlotToAmountBonded(arg0 *big.Int, arg1 common.Address) (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.TimeSlotToAmountBonded(&_HopL1Erc20Bridge.CallOpts, arg0, arg1) +} + +// TransferBonds is a free data retrieval call binding the contract method 0x5a7e1083. +// +// Solidity: function transferBonds(bytes32 ) view returns(address bonder, uint256 createdAt, uint256 totalAmount, uint256 challengeStartTime, address challenger, bool challengeResolved) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCaller) TransferBonds(opts *bind.CallOpts, arg0 [32]byte) (struct { + Bonder common.Address + CreatedAt *big.Int + TotalAmount *big.Int + ChallengeStartTime *big.Int + Challenger common.Address + ChallengeResolved bool +}, error) { + var out []interface{} + err := _HopL1Erc20Bridge.contract.Call(opts, &out, "transferBonds", arg0) + + outstruct := new(struct { + Bonder common.Address + CreatedAt *big.Int + TotalAmount *big.Int + ChallengeStartTime *big.Int + Challenger common.Address + ChallengeResolved bool + }) + if err != nil { + return *outstruct, err + } + + outstruct.Bonder = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + outstruct.CreatedAt = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.TotalAmount = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.ChallengeStartTime = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + outstruct.Challenger = *abi.ConvertType(out[4], new(common.Address)).(*common.Address) + outstruct.ChallengeResolved = *abi.ConvertType(out[5], new(bool)).(*bool) + + return *outstruct, err + +} + +// TransferBonds is a free data retrieval call binding the contract method 0x5a7e1083. +// +// Solidity: function transferBonds(bytes32 ) view returns(address bonder, uint256 createdAt, uint256 totalAmount, uint256 challengeStartTime, address challenger, bool challengeResolved) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) TransferBonds(arg0 [32]byte) (struct { + Bonder common.Address + CreatedAt *big.Int + TotalAmount *big.Int + ChallengeStartTime *big.Int + Challenger common.Address + ChallengeResolved bool +}, error) { + return _HopL1Erc20Bridge.Contract.TransferBonds(&_HopL1Erc20Bridge.CallOpts, arg0) +} + +// TransferBonds is a free data retrieval call binding the contract method 0x5a7e1083. +// +// Solidity: function transferBonds(bytes32 ) view returns(address bonder, uint256 createdAt, uint256 totalAmount, uint256 challengeStartTime, address challenger, bool challengeResolved) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCallerSession) TransferBonds(arg0 [32]byte) (struct { + Bonder common.Address + CreatedAt *big.Int + TotalAmount *big.Int + ChallengeStartTime *big.Int + Challenger common.Address + ChallengeResolved bool +}, error) { + return _HopL1Erc20Bridge.Contract.TransferBonds(&_HopL1Erc20Bridge.CallOpts, arg0) +} + +// TransferRootCommittedAt is a free data retrieval call binding the contract method 0x4612f40c. +// +// Solidity: function transferRootCommittedAt(bytes32 ) view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCaller) TransferRootCommittedAt(opts *bind.CallOpts, arg0 [32]byte) (*big.Int, error) { + var out []interface{} + err := _HopL1Erc20Bridge.contract.Call(opts, &out, "transferRootCommittedAt", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TransferRootCommittedAt is a free data retrieval call binding the contract method 0x4612f40c. +// +// Solidity: function transferRootCommittedAt(bytes32 ) view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) TransferRootCommittedAt(arg0 [32]byte) (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.TransferRootCommittedAt(&_HopL1Erc20Bridge.CallOpts, arg0) +} + +// TransferRootCommittedAt is a free data retrieval call binding the contract method 0x4612f40c. +// +// Solidity: function transferRootCommittedAt(bytes32 ) view returns(uint256) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeCallerSession) TransferRootCommittedAt(arg0 [32]byte) (*big.Int, error) { + return _HopL1Erc20Bridge.Contract.TransferRootCommittedAt(&_HopL1Erc20Bridge.CallOpts, arg0) +} + +// AddBonder is a paid mutator transaction binding the contract method 0x5325937f. +// +// Solidity: function addBonder(address bonder) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactor) AddBonder(opts *bind.TransactOpts, bonder common.Address) (*types.Transaction, error) { + return _HopL1Erc20Bridge.contract.Transact(opts, "addBonder", bonder) +} + +// AddBonder is a paid mutator transaction binding the contract method 0x5325937f. +// +// Solidity: function addBonder(address bonder) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) AddBonder(bonder common.Address) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.AddBonder(&_HopL1Erc20Bridge.TransactOpts, bonder) +} + +// AddBonder is a paid mutator transaction binding the contract method 0x5325937f. +// +// Solidity: function addBonder(address bonder) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactorSession) AddBonder(bonder common.Address) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.AddBonder(&_HopL1Erc20Bridge.TransactOpts, bonder) +} + +// BondTransferRoot is a paid mutator transaction binding the contract method 0x8d8798bf. +// +// Solidity: function bondTransferRoot(bytes32 rootHash, uint256 destinationChainId, uint256 totalAmount) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactor) BondTransferRoot(opts *bind.TransactOpts, rootHash [32]byte, destinationChainId *big.Int, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.contract.Transact(opts, "bondTransferRoot", rootHash, destinationChainId, totalAmount) +} + +// BondTransferRoot is a paid mutator transaction binding the contract method 0x8d8798bf. +// +// Solidity: function bondTransferRoot(bytes32 rootHash, uint256 destinationChainId, uint256 totalAmount) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) BondTransferRoot(rootHash [32]byte, destinationChainId *big.Int, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.BondTransferRoot(&_HopL1Erc20Bridge.TransactOpts, rootHash, destinationChainId, totalAmount) +} + +// BondTransferRoot is a paid mutator transaction binding the contract method 0x8d8798bf. +// +// Solidity: function bondTransferRoot(bytes32 rootHash, uint256 destinationChainId, uint256 totalAmount) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactorSession) BondTransferRoot(rootHash [32]byte, destinationChainId *big.Int, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.BondTransferRoot(&_HopL1Erc20Bridge.TransactOpts, rootHash, destinationChainId, totalAmount) +} + +// BondWithdrawal is a paid mutator transaction binding the contract method 0x23c452cd. +// +// Solidity: function bondWithdrawal(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactor) BondWithdrawal(opts *bind.TransactOpts, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.contract.Transact(opts, "bondWithdrawal", recipient, amount, transferNonce, bonderFee) +} + +// BondWithdrawal is a paid mutator transaction binding the contract method 0x23c452cd. +// +// Solidity: function bondWithdrawal(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) BondWithdrawal(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.BondWithdrawal(&_HopL1Erc20Bridge.TransactOpts, recipient, amount, transferNonce, bonderFee) +} + +// BondWithdrawal is a paid mutator transaction binding the contract method 0x23c452cd. +// +// Solidity: function bondWithdrawal(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactorSession) BondWithdrawal(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.BondWithdrawal(&_HopL1Erc20Bridge.TransactOpts, recipient, amount, transferNonce, bonderFee) +} + +// ChallengeTransferBond is a paid mutator transaction binding the contract method 0xbacc68af. +// +// Solidity: function challengeTransferBond(bytes32 rootHash, uint256 originalAmount) payable returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactor) ChallengeTransferBond(opts *bind.TransactOpts, rootHash [32]byte, originalAmount *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.contract.Transact(opts, "challengeTransferBond", rootHash, originalAmount) +} + +// ChallengeTransferBond is a paid mutator transaction binding the contract method 0xbacc68af. +// +// Solidity: function challengeTransferBond(bytes32 rootHash, uint256 originalAmount) payable returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) ChallengeTransferBond(rootHash [32]byte, originalAmount *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.ChallengeTransferBond(&_HopL1Erc20Bridge.TransactOpts, rootHash, originalAmount) +} + +// ChallengeTransferBond is a paid mutator transaction binding the contract method 0xbacc68af. +// +// Solidity: function challengeTransferBond(bytes32 rootHash, uint256 originalAmount) payable returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactorSession) ChallengeTransferBond(rootHash [32]byte, originalAmount *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.ChallengeTransferBond(&_HopL1Erc20Bridge.TransactOpts, rootHash, originalAmount) +} + +// ConfirmTransferRoot is a paid mutator transaction binding the contract method 0xef6ebe5e. +// +// Solidity: function confirmTransferRoot(uint256 originChainId, bytes32 rootHash, uint256 destinationChainId, uint256 totalAmount, uint256 rootCommittedAt) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactor) ConfirmTransferRoot(opts *bind.TransactOpts, originChainId *big.Int, rootHash [32]byte, destinationChainId *big.Int, totalAmount *big.Int, rootCommittedAt *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.contract.Transact(opts, "confirmTransferRoot", originChainId, rootHash, destinationChainId, totalAmount, rootCommittedAt) +} + +// ConfirmTransferRoot is a paid mutator transaction binding the contract method 0xef6ebe5e. +// +// Solidity: function confirmTransferRoot(uint256 originChainId, bytes32 rootHash, uint256 destinationChainId, uint256 totalAmount, uint256 rootCommittedAt) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) ConfirmTransferRoot(originChainId *big.Int, rootHash [32]byte, destinationChainId *big.Int, totalAmount *big.Int, rootCommittedAt *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.ConfirmTransferRoot(&_HopL1Erc20Bridge.TransactOpts, originChainId, rootHash, destinationChainId, totalAmount, rootCommittedAt) +} + +// ConfirmTransferRoot is a paid mutator transaction binding the contract method 0xef6ebe5e. +// +// Solidity: function confirmTransferRoot(uint256 originChainId, bytes32 rootHash, uint256 destinationChainId, uint256 totalAmount, uint256 rootCommittedAt) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactorSession) ConfirmTransferRoot(originChainId *big.Int, rootHash [32]byte, destinationChainId *big.Int, totalAmount *big.Int, rootCommittedAt *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.ConfirmTransferRoot(&_HopL1Erc20Bridge.TransactOpts, originChainId, rootHash, destinationChainId, totalAmount, rootCommittedAt) +} + +// RemoveBonder is a paid mutator transaction binding the contract method 0x04e6c2c0. +// +// Solidity: function removeBonder(address bonder) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactor) RemoveBonder(opts *bind.TransactOpts, bonder common.Address) (*types.Transaction, error) { + return _HopL1Erc20Bridge.contract.Transact(opts, "removeBonder", bonder) +} + +// RemoveBonder is a paid mutator transaction binding the contract method 0x04e6c2c0. +// +// Solidity: function removeBonder(address bonder) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) RemoveBonder(bonder common.Address) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.RemoveBonder(&_HopL1Erc20Bridge.TransactOpts, bonder) +} + +// RemoveBonder is a paid mutator transaction binding the contract method 0x04e6c2c0. +// +// Solidity: function removeBonder(address bonder) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactorSession) RemoveBonder(bonder common.Address) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.RemoveBonder(&_HopL1Erc20Bridge.TransactOpts, bonder) +} + +// RescueTransferRoot is a paid mutator transaction binding the contract method 0xcbd1642e. +// +// Solidity: function rescueTransferRoot(bytes32 rootHash, uint256 originalAmount, address recipient) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactor) RescueTransferRoot(opts *bind.TransactOpts, rootHash [32]byte, originalAmount *big.Int, recipient common.Address) (*types.Transaction, error) { + return _HopL1Erc20Bridge.contract.Transact(opts, "rescueTransferRoot", rootHash, originalAmount, recipient) +} + +// RescueTransferRoot is a paid mutator transaction binding the contract method 0xcbd1642e. +// +// Solidity: function rescueTransferRoot(bytes32 rootHash, uint256 originalAmount, address recipient) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) RescueTransferRoot(rootHash [32]byte, originalAmount *big.Int, recipient common.Address) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.RescueTransferRoot(&_HopL1Erc20Bridge.TransactOpts, rootHash, originalAmount, recipient) +} + +// RescueTransferRoot is a paid mutator transaction binding the contract method 0xcbd1642e. +// +// Solidity: function rescueTransferRoot(bytes32 rootHash, uint256 originalAmount, address recipient) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactorSession) RescueTransferRoot(rootHash [32]byte, originalAmount *big.Int, recipient common.Address) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.RescueTransferRoot(&_HopL1Erc20Bridge.TransactOpts, rootHash, originalAmount, recipient) +} + +// ResolveChallenge is a paid mutator transaction binding the contract method 0x45ca9fc9. +// +// Solidity: function resolveChallenge(bytes32 rootHash, uint256 originalAmount) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactor) ResolveChallenge(opts *bind.TransactOpts, rootHash [32]byte, originalAmount *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.contract.Transact(opts, "resolveChallenge", rootHash, originalAmount) +} + +// ResolveChallenge is a paid mutator transaction binding the contract method 0x45ca9fc9. +// +// Solidity: function resolveChallenge(bytes32 rootHash, uint256 originalAmount) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) ResolveChallenge(rootHash [32]byte, originalAmount *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.ResolveChallenge(&_HopL1Erc20Bridge.TransactOpts, rootHash, originalAmount) +} + +// ResolveChallenge is a paid mutator transaction binding the contract method 0x45ca9fc9. +// +// Solidity: function resolveChallenge(bytes32 rootHash, uint256 originalAmount) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactorSession) ResolveChallenge(rootHash [32]byte, originalAmount *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.ResolveChallenge(&_HopL1Erc20Bridge.TransactOpts, rootHash, originalAmount) +} + +// SendToL2 is a paid mutator transaction binding the contract method 0xdeace8f5. +// +// Solidity: function sendToL2(uint256 chainId, address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address relayer, uint256 relayerFee) payable returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactor) SendToL2(opts *bind.TransactOpts, chainId *big.Int, recipient common.Address, amount *big.Int, amountOutMin *big.Int, deadline *big.Int, relayer common.Address, relayerFee *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.contract.Transact(opts, "sendToL2", chainId, recipient, amount, amountOutMin, deadline, relayer, relayerFee) +} + +// SendToL2 is a paid mutator transaction binding the contract method 0xdeace8f5. +// +// Solidity: function sendToL2(uint256 chainId, address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address relayer, uint256 relayerFee) payable returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) SendToL2(chainId *big.Int, recipient common.Address, amount *big.Int, amountOutMin *big.Int, deadline *big.Int, relayer common.Address, relayerFee *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.SendToL2(&_HopL1Erc20Bridge.TransactOpts, chainId, recipient, amount, amountOutMin, deadline, relayer, relayerFee) +} + +// SendToL2 is a paid mutator transaction binding the contract method 0xdeace8f5. +// +// Solidity: function sendToL2(uint256 chainId, address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address relayer, uint256 relayerFee) payable returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactorSession) SendToL2(chainId *big.Int, recipient common.Address, amount *big.Int, amountOutMin *big.Int, deadline *big.Int, relayer common.Address, relayerFee *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.SendToL2(&_HopL1Erc20Bridge.TransactOpts, chainId, recipient, amount, amountOutMin, deadline, relayer, relayerFee) +} + +// SetChainIdDepositsPaused is a paid mutator transaction binding the contract method 0x14942024. +// +// Solidity: function setChainIdDepositsPaused(uint256 chainId, bool isPaused) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactor) SetChainIdDepositsPaused(opts *bind.TransactOpts, chainId *big.Int, isPaused bool) (*types.Transaction, error) { + return _HopL1Erc20Bridge.contract.Transact(opts, "setChainIdDepositsPaused", chainId, isPaused) +} + +// SetChainIdDepositsPaused is a paid mutator transaction binding the contract method 0x14942024. +// +// Solidity: function setChainIdDepositsPaused(uint256 chainId, bool isPaused) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) SetChainIdDepositsPaused(chainId *big.Int, isPaused bool) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.SetChainIdDepositsPaused(&_HopL1Erc20Bridge.TransactOpts, chainId, isPaused) +} + +// SetChainIdDepositsPaused is a paid mutator transaction binding the contract method 0x14942024. +// +// Solidity: function setChainIdDepositsPaused(uint256 chainId, bool isPaused) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactorSession) SetChainIdDepositsPaused(chainId *big.Int, isPaused bool) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.SetChainIdDepositsPaused(&_HopL1Erc20Bridge.TransactOpts, chainId, isPaused) +} + +// SetChallengePeriod is a paid mutator transaction binding the contract method 0x5d475fdd. +// +// Solidity: function setChallengePeriod(uint256 _challengePeriod) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactor) SetChallengePeriod(opts *bind.TransactOpts, _challengePeriod *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.contract.Transact(opts, "setChallengePeriod", _challengePeriod) +} + +// SetChallengePeriod is a paid mutator transaction binding the contract method 0x5d475fdd. +// +// Solidity: function setChallengePeriod(uint256 _challengePeriod) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) SetChallengePeriod(_challengePeriod *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.SetChallengePeriod(&_HopL1Erc20Bridge.TransactOpts, _challengePeriod) +} + +// SetChallengePeriod is a paid mutator transaction binding the contract method 0x5d475fdd. +// +// Solidity: function setChallengePeriod(uint256 _challengePeriod) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactorSession) SetChallengePeriod(_challengePeriod *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.SetChallengePeriod(&_HopL1Erc20Bridge.TransactOpts, _challengePeriod) +} + +// SetChallengeResolutionPeriod is a paid mutator transaction binding the contract method 0xeecd57e6. +// +// Solidity: function setChallengeResolutionPeriod(uint256 _challengeResolutionPeriod) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactor) SetChallengeResolutionPeriod(opts *bind.TransactOpts, _challengeResolutionPeriod *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.contract.Transact(opts, "setChallengeResolutionPeriod", _challengeResolutionPeriod) +} + +// SetChallengeResolutionPeriod is a paid mutator transaction binding the contract method 0xeecd57e6. +// +// Solidity: function setChallengeResolutionPeriod(uint256 _challengeResolutionPeriod) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) SetChallengeResolutionPeriod(_challengeResolutionPeriod *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.SetChallengeResolutionPeriod(&_HopL1Erc20Bridge.TransactOpts, _challengeResolutionPeriod) +} + +// SetChallengeResolutionPeriod is a paid mutator transaction binding the contract method 0xeecd57e6. +// +// Solidity: function setChallengeResolutionPeriod(uint256 _challengeResolutionPeriod) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactorSession) SetChallengeResolutionPeriod(_challengeResolutionPeriod *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.SetChallengeResolutionPeriod(&_HopL1Erc20Bridge.TransactOpts, _challengeResolutionPeriod) +} + +// SetCrossDomainMessengerWrapper is a paid mutator transaction binding the contract method 0xd4448163. +// +// Solidity: function setCrossDomainMessengerWrapper(uint256 chainId, address _crossDomainMessengerWrapper) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactor) SetCrossDomainMessengerWrapper(opts *bind.TransactOpts, chainId *big.Int, _crossDomainMessengerWrapper common.Address) (*types.Transaction, error) { + return _HopL1Erc20Bridge.contract.Transact(opts, "setCrossDomainMessengerWrapper", chainId, _crossDomainMessengerWrapper) +} + +// SetCrossDomainMessengerWrapper is a paid mutator transaction binding the contract method 0xd4448163. +// +// Solidity: function setCrossDomainMessengerWrapper(uint256 chainId, address _crossDomainMessengerWrapper) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) SetCrossDomainMessengerWrapper(chainId *big.Int, _crossDomainMessengerWrapper common.Address) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.SetCrossDomainMessengerWrapper(&_HopL1Erc20Bridge.TransactOpts, chainId, _crossDomainMessengerWrapper) +} + +// SetCrossDomainMessengerWrapper is a paid mutator transaction binding the contract method 0xd4448163. +// +// Solidity: function setCrossDomainMessengerWrapper(uint256 chainId, address _crossDomainMessengerWrapper) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactorSession) SetCrossDomainMessengerWrapper(chainId *big.Int, _crossDomainMessengerWrapper common.Address) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.SetCrossDomainMessengerWrapper(&_HopL1Erc20Bridge.TransactOpts, chainId, _crossDomainMessengerWrapper) +} + +// SetGovernance is a paid mutator transaction binding the contract method 0xab033ea9. +// +// Solidity: function setGovernance(address _newGovernance) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactor) SetGovernance(opts *bind.TransactOpts, _newGovernance common.Address) (*types.Transaction, error) { + return _HopL1Erc20Bridge.contract.Transact(opts, "setGovernance", _newGovernance) +} + +// SetGovernance is a paid mutator transaction binding the contract method 0xab033ea9. +// +// Solidity: function setGovernance(address _newGovernance) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) SetGovernance(_newGovernance common.Address) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.SetGovernance(&_HopL1Erc20Bridge.TransactOpts, _newGovernance) +} + +// SetGovernance is a paid mutator transaction binding the contract method 0xab033ea9. +// +// Solidity: function setGovernance(address _newGovernance) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactorSession) SetGovernance(_newGovernance common.Address) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.SetGovernance(&_HopL1Erc20Bridge.TransactOpts, _newGovernance) +} + +// SetMinTransferRootBondDelay is a paid mutator transaction binding the contract method 0x39ada669. +// +// Solidity: function setMinTransferRootBondDelay(uint256 _minTransferRootBondDelay) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactor) SetMinTransferRootBondDelay(opts *bind.TransactOpts, _minTransferRootBondDelay *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.contract.Transact(opts, "setMinTransferRootBondDelay", _minTransferRootBondDelay) +} + +// SetMinTransferRootBondDelay is a paid mutator transaction binding the contract method 0x39ada669. +// +// Solidity: function setMinTransferRootBondDelay(uint256 _minTransferRootBondDelay) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) SetMinTransferRootBondDelay(_minTransferRootBondDelay *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.SetMinTransferRootBondDelay(&_HopL1Erc20Bridge.TransactOpts, _minTransferRootBondDelay) +} + +// SetMinTransferRootBondDelay is a paid mutator transaction binding the contract method 0x39ada669. +// +// Solidity: function setMinTransferRootBondDelay(uint256 _minTransferRootBondDelay) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactorSession) SetMinTransferRootBondDelay(_minTransferRootBondDelay *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.SetMinTransferRootBondDelay(&_HopL1Erc20Bridge.TransactOpts, _minTransferRootBondDelay) +} + +// SettleBondedWithdrawal is a paid mutator transaction binding the contract method 0xc7525dd3. +// +// Solidity: function settleBondedWithdrawal(address bonder, bytes32 transferId, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactor) SettleBondedWithdrawal(opts *bind.TransactOpts, bonder common.Address, transferId [32]byte, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.contract.Transact(opts, "settleBondedWithdrawal", bonder, transferId, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +} + +// SettleBondedWithdrawal is a paid mutator transaction binding the contract method 0xc7525dd3. +// +// Solidity: function settleBondedWithdrawal(address bonder, bytes32 transferId, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) SettleBondedWithdrawal(bonder common.Address, transferId [32]byte, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.SettleBondedWithdrawal(&_HopL1Erc20Bridge.TransactOpts, bonder, transferId, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +} + +// SettleBondedWithdrawal is a paid mutator transaction binding the contract method 0xc7525dd3. +// +// Solidity: function settleBondedWithdrawal(address bonder, bytes32 transferId, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactorSession) SettleBondedWithdrawal(bonder common.Address, transferId [32]byte, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.SettleBondedWithdrawal(&_HopL1Erc20Bridge.TransactOpts, bonder, transferId, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +} + +// SettleBondedWithdrawals is a paid mutator transaction binding the contract method 0xb162717e. +// +// Solidity: function settleBondedWithdrawals(address bonder, bytes32[] transferIds, uint256 totalAmount) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactor) SettleBondedWithdrawals(opts *bind.TransactOpts, bonder common.Address, transferIds [][32]byte, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.contract.Transact(opts, "settleBondedWithdrawals", bonder, transferIds, totalAmount) +} + +// SettleBondedWithdrawals is a paid mutator transaction binding the contract method 0xb162717e. +// +// Solidity: function settleBondedWithdrawals(address bonder, bytes32[] transferIds, uint256 totalAmount) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) SettleBondedWithdrawals(bonder common.Address, transferIds [][32]byte, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.SettleBondedWithdrawals(&_HopL1Erc20Bridge.TransactOpts, bonder, transferIds, totalAmount) +} + +// SettleBondedWithdrawals is a paid mutator transaction binding the contract method 0xb162717e. +// +// Solidity: function settleBondedWithdrawals(address bonder, bytes32[] transferIds, uint256 totalAmount) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactorSession) SettleBondedWithdrawals(bonder common.Address, transferIds [][32]byte, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.SettleBondedWithdrawals(&_HopL1Erc20Bridge.TransactOpts, bonder, transferIds, totalAmount) +} + +// Stake is a paid mutator transaction binding the contract method 0xadc9772e. +// +// Solidity: function stake(address bonder, uint256 amount) payable returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactor) Stake(opts *bind.TransactOpts, bonder common.Address, amount *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.contract.Transact(opts, "stake", bonder, amount) +} + +// Stake is a paid mutator transaction binding the contract method 0xadc9772e. +// +// Solidity: function stake(address bonder, uint256 amount) payable returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) Stake(bonder common.Address, amount *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.Stake(&_HopL1Erc20Bridge.TransactOpts, bonder, amount) +} + +// Stake is a paid mutator transaction binding the contract method 0xadc9772e. +// +// Solidity: function stake(address bonder, uint256 amount) payable returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactorSession) Stake(bonder common.Address, amount *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.Stake(&_HopL1Erc20Bridge.TransactOpts, bonder, amount) +} + +// Unstake is a paid mutator transaction binding the contract method 0x2e17de78. +// +// Solidity: function unstake(uint256 amount) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactor) Unstake(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.contract.Transact(opts, "unstake", amount) +} + +// Unstake is a paid mutator transaction binding the contract method 0x2e17de78. +// +// Solidity: function unstake(uint256 amount) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) Unstake(amount *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.Unstake(&_HopL1Erc20Bridge.TransactOpts, amount) +} + +// Unstake is a paid mutator transaction binding the contract method 0x2e17de78. +// +// Solidity: function unstake(uint256 amount) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactorSession) Unstake(amount *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.Unstake(&_HopL1Erc20Bridge.TransactOpts, amount) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x0f7aadb7. +// +// Solidity: function withdraw(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactor) Withdraw(opts *bind.TransactOpts, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.contract.Transact(opts, "withdraw", recipient, amount, transferNonce, bonderFee, amountOutMin, deadline, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x0f7aadb7. +// +// Solidity: function withdraw(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeSession) Withdraw(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.Withdraw(&_HopL1Erc20Bridge.TransactOpts, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x0f7aadb7. +// +// Solidity: function withdraw(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() +func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactorSession) Withdraw(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL1Erc20Bridge.Contract.Withdraw(&_HopL1Erc20Bridge.TransactOpts, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +} + +// HopL1Erc20BridgeBonderAddedIterator is returned from FilterBonderAdded and is used to iterate over the raw logs and unpacked data for BonderAdded events raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeBonderAddedIterator struct { + Event *HopL1Erc20BridgeBonderAdded // 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 *HopL1Erc20BridgeBonderAddedIterator) 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(HopL1Erc20BridgeBonderAdded) + 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(HopL1Erc20BridgeBonderAdded) + 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 *HopL1Erc20BridgeBonderAddedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1Erc20BridgeBonderAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1Erc20BridgeBonderAdded represents a BonderAdded event raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeBonderAdded struct { + NewBonder common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBonderAdded is a free log retrieval operation binding the contract event 0x2cec73b7434d3b91198ad1a618f63e6a0761ce281af5ec9ec76606d948d03e23. +// +// Solidity: event BonderAdded(address indexed newBonder) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) FilterBonderAdded(opts *bind.FilterOpts, newBonder []common.Address) (*HopL1Erc20BridgeBonderAddedIterator, error) { + + var newBonderRule []interface{} + for _, newBonderItem := range newBonder { + newBonderRule = append(newBonderRule, newBonderItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.FilterLogs(opts, "BonderAdded", newBonderRule) + if err != nil { + return nil, err + } + return &HopL1Erc20BridgeBonderAddedIterator{contract: _HopL1Erc20Bridge.contract, event: "BonderAdded", logs: logs, sub: sub}, nil +} + +// WatchBonderAdded is a free log subscription operation binding the contract event 0x2cec73b7434d3b91198ad1a618f63e6a0761ce281af5ec9ec76606d948d03e23. +// +// Solidity: event BonderAdded(address indexed newBonder) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) WatchBonderAdded(opts *bind.WatchOpts, sink chan<- *HopL1Erc20BridgeBonderAdded, newBonder []common.Address) (event.Subscription, error) { + + var newBonderRule []interface{} + for _, newBonderItem := range newBonder { + newBonderRule = append(newBonderRule, newBonderItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.WatchLogs(opts, "BonderAdded", newBonderRule) + 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(HopL1Erc20BridgeBonderAdded) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "BonderAdded", 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 +} + +// ParseBonderAdded is a log parse operation binding the contract event 0x2cec73b7434d3b91198ad1a618f63e6a0761ce281af5ec9ec76606d948d03e23. +// +// Solidity: event BonderAdded(address indexed newBonder) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) ParseBonderAdded(log types.Log) (*HopL1Erc20BridgeBonderAdded, error) { + event := new(HopL1Erc20BridgeBonderAdded) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "BonderAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL1Erc20BridgeBonderRemovedIterator is returned from FilterBonderRemoved and is used to iterate over the raw logs and unpacked data for BonderRemoved events raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeBonderRemovedIterator struct { + Event *HopL1Erc20BridgeBonderRemoved // 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 *HopL1Erc20BridgeBonderRemovedIterator) 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(HopL1Erc20BridgeBonderRemoved) + 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(HopL1Erc20BridgeBonderRemoved) + 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 *HopL1Erc20BridgeBonderRemovedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1Erc20BridgeBonderRemovedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1Erc20BridgeBonderRemoved represents a BonderRemoved event raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeBonderRemoved struct { + PreviousBonder common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBonderRemoved is a free log retrieval operation binding the contract event 0x4234ba611d325b3ba434c4e1b037967b955b1274d4185ee9847b7491111a48ff. +// +// Solidity: event BonderRemoved(address indexed previousBonder) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) FilterBonderRemoved(opts *bind.FilterOpts, previousBonder []common.Address) (*HopL1Erc20BridgeBonderRemovedIterator, error) { + + var previousBonderRule []interface{} + for _, previousBonderItem := range previousBonder { + previousBonderRule = append(previousBonderRule, previousBonderItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.FilterLogs(opts, "BonderRemoved", previousBonderRule) + if err != nil { + return nil, err + } + return &HopL1Erc20BridgeBonderRemovedIterator{contract: _HopL1Erc20Bridge.contract, event: "BonderRemoved", logs: logs, sub: sub}, nil +} + +// WatchBonderRemoved is a free log subscription operation binding the contract event 0x4234ba611d325b3ba434c4e1b037967b955b1274d4185ee9847b7491111a48ff. +// +// Solidity: event BonderRemoved(address indexed previousBonder) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) WatchBonderRemoved(opts *bind.WatchOpts, sink chan<- *HopL1Erc20BridgeBonderRemoved, previousBonder []common.Address) (event.Subscription, error) { + + var previousBonderRule []interface{} + for _, previousBonderItem := range previousBonder { + previousBonderRule = append(previousBonderRule, previousBonderItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.WatchLogs(opts, "BonderRemoved", previousBonderRule) + 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(HopL1Erc20BridgeBonderRemoved) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "BonderRemoved", 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 +} + +// ParseBonderRemoved is a log parse operation binding the contract event 0x4234ba611d325b3ba434c4e1b037967b955b1274d4185ee9847b7491111a48ff. +// +// Solidity: event BonderRemoved(address indexed previousBonder) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) ParseBonderRemoved(log types.Log) (*HopL1Erc20BridgeBonderRemoved, error) { + event := new(HopL1Erc20BridgeBonderRemoved) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "BonderRemoved", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL1Erc20BridgeChallengeResolvedIterator is returned from FilterChallengeResolved and is used to iterate over the raw logs and unpacked data for ChallengeResolved events raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeChallengeResolvedIterator struct { + Event *HopL1Erc20BridgeChallengeResolved // 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 *HopL1Erc20BridgeChallengeResolvedIterator) 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(HopL1Erc20BridgeChallengeResolved) + 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(HopL1Erc20BridgeChallengeResolved) + 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 *HopL1Erc20BridgeChallengeResolvedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1Erc20BridgeChallengeResolvedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1Erc20BridgeChallengeResolved represents a ChallengeResolved event raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeChallengeResolved struct { + TransferRootId [32]byte + RootHash [32]byte + OriginalAmount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterChallengeResolved is a free log retrieval operation binding the contract event 0x4a99228a8a6d774d261be57ab0ed833bb1bae1f22bbbd3d4767b75ad03fdddf7. +// +// Solidity: event ChallengeResolved(bytes32 indexed transferRootId, bytes32 indexed rootHash, uint256 originalAmount) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) FilterChallengeResolved(opts *bind.FilterOpts, transferRootId [][32]byte, rootHash [][32]byte) (*HopL1Erc20BridgeChallengeResolvedIterator, error) { + + var transferRootIdRule []interface{} + for _, transferRootIdItem := range transferRootId { + transferRootIdRule = append(transferRootIdRule, transferRootIdItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.FilterLogs(opts, "ChallengeResolved", transferRootIdRule, rootHashRule) + if err != nil { + return nil, err + } + return &HopL1Erc20BridgeChallengeResolvedIterator{contract: _HopL1Erc20Bridge.contract, event: "ChallengeResolved", logs: logs, sub: sub}, nil +} + +// WatchChallengeResolved is a free log subscription operation binding the contract event 0x4a99228a8a6d774d261be57ab0ed833bb1bae1f22bbbd3d4767b75ad03fdddf7. +// +// Solidity: event ChallengeResolved(bytes32 indexed transferRootId, bytes32 indexed rootHash, uint256 originalAmount) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) WatchChallengeResolved(opts *bind.WatchOpts, sink chan<- *HopL1Erc20BridgeChallengeResolved, transferRootId [][32]byte, rootHash [][32]byte) (event.Subscription, error) { + + var transferRootIdRule []interface{} + for _, transferRootIdItem := range transferRootId { + transferRootIdRule = append(transferRootIdRule, transferRootIdItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.WatchLogs(opts, "ChallengeResolved", transferRootIdRule, rootHashRule) + 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(HopL1Erc20BridgeChallengeResolved) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "ChallengeResolved", 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 +} + +// ParseChallengeResolved is a log parse operation binding the contract event 0x4a99228a8a6d774d261be57ab0ed833bb1bae1f22bbbd3d4767b75ad03fdddf7. +// +// Solidity: event ChallengeResolved(bytes32 indexed transferRootId, bytes32 indexed rootHash, uint256 originalAmount) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) ParseChallengeResolved(log types.Log) (*HopL1Erc20BridgeChallengeResolved, error) { + event := new(HopL1Erc20BridgeChallengeResolved) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "ChallengeResolved", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL1Erc20BridgeMultipleWithdrawalsSettledIterator is returned from FilterMultipleWithdrawalsSettled and is used to iterate over the raw logs and unpacked data for MultipleWithdrawalsSettled events raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeMultipleWithdrawalsSettledIterator struct { + Event *HopL1Erc20BridgeMultipleWithdrawalsSettled // 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 *HopL1Erc20BridgeMultipleWithdrawalsSettledIterator) 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(HopL1Erc20BridgeMultipleWithdrawalsSettled) + 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(HopL1Erc20BridgeMultipleWithdrawalsSettled) + 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 *HopL1Erc20BridgeMultipleWithdrawalsSettledIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1Erc20BridgeMultipleWithdrawalsSettledIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1Erc20BridgeMultipleWithdrawalsSettled represents a MultipleWithdrawalsSettled event raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeMultipleWithdrawalsSettled struct { + Bonder common.Address + RootHash [32]byte + TotalBondsSettled *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMultipleWithdrawalsSettled is a free log retrieval operation binding the contract event 0x78e830d08be9d5f957414c84d685c061ecbd8467be98b42ebb64f0118b57d2ff. +// +// Solidity: event MultipleWithdrawalsSettled(address indexed bonder, bytes32 indexed rootHash, uint256 totalBondsSettled) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) FilterMultipleWithdrawalsSettled(opts *bind.FilterOpts, bonder []common.Address, rootHash [][32]byte) (*HopL1Erc20BridgeMultipleWithdrawalsSettledIterator, error) { + + var bonderRule []interface{} + for _, bonderItem := range bonder { + bonderRule = append(bonderRule, bonderItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.FilterLogs(opts, "MultipleWithdrawalsSettled", bonderRule, rootHashRule) + if err != nil { + return nil, err + } + return &HopL1Erc20BridgeMultipleWithdrawalsSettledIterator{contract: _HopL1Erc20Bridge.contract, event: "MultipleWithdrawalsSettled", logs: logs, sub: sub}, nil +} + +// WatchMultipleWithdrawalsSettled is a free log subscription operation binding the contract event 0x78e830d08be9d5f957414c84d685c061ecbd8467be98b42ebb64f0118b57d2ff. +// +// Solidity: event MultipleWithdrawalsSettled(address indexed bonder, bytes32 indexed rootHash, uint256 totalBondsSettled) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) WatchMultipleWithdrawalsSettled(opts *bind.WatchOpts, sink chan<- *HopL1Erc20BridgeMultipleWithdrawalsSettled, bonder []common.Address, rootHash [][32]byte) (event.Subscription, error) { + + var bonderRule []interface{} + for _, bonderItem := range bonder { + bonderRule = append(bonderRule, bonderItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.WatchLogs(opts, "MultipleWithdrawalsSettled", bonderRule, rootHashRule) + 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(HopL1Erc20BridgeMultipleWithdrawalsSettled) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "MultipleWithdrawalsSettled", 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 +} + +// ParseMultipleWithdrawalsSettled is a log parse operation binding the contract event 0x78e830d08be9d5f957414c84d685c061ecbd8467be98b42ebb64f0118b57d2ff. +// +// Solidity: event MultipleWithdrawalsSettled(address indexed bonder, bytes32 indexed rootHash, uint256 totalBondsSettled) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) ParseMultipleWithdrawalsSettled(log types.Log) (*HopL1Erc20BridgeMultipleWithdrawalsSettled, error) { + event := new(HopL1Erc20BridgeMultipleWithdrawalsSettled) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "MultipleWithdrawalsSettled", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL1Erc20BridgeStakeIterator is returned from FilterStake and is used to iterate over the raw logs and unpacked data for Stake events raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeStakeIterator struct { + Event *HopL1Erc20BridgeStake // 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 *HopL1Erc20BridgeStakeIterator) 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(HopL1Erc20BridgeStake) + 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(HopL1Erc20BridgeStake) + 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 *HopL1Erc20BridgeStakeIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1Erc20BridgeStakeIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1Erc20BridgeStake represents a Stake event raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeStake struct { + Account common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterStake is a free log retrieval operation binding the contract event 0xebedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a. +// +// Solidity: event Stake(address indexed account, uint256 amount) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) FilterStake(opts *bind.FilterOpts, account []common.Address) (*HopL1Erc20BridgeStakeIterator, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.FilterLogs(opts, "Stake", accountRule) + if err != nil { + return nil, err + } + return &HopL1Erc20BridgeStakeIterator{contract: _HopL1Erc20Bridge.contract, event: "Stake", logs: logs, sub: sub}, nil +} + +// WatchStake is a free log subscription operation binding the contract event 0xebedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a. +// +// Solidity: event Stake(address indexed account, uint256 amount) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) WatchStake(opts *bind.WatchOpts, sink chan<- *HopL1Erc20BridgeStake, account []common.Address) (event.Subscription, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.WatchLogs(opts, "Stake", accountRule) + 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(HopL1Erc20BridgeStake) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "Stake", 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 +} + +// ParseStake is a log parse operation binding the contract event 0xebedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a. +// +// Solidity: event Stake(address indexed account, uint256 amount) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) ParseStake(log types.Log) (*HopL1Erc20BridgeStake, error) { + event := new(HopL1Erc20BridgeStake) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "Stake", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL1Erc20BridgeTransferBondChallengedIterator is returned from FilterTransferBondChallenged and is used to iterate over the raw logs and unpacked data for TransferBondChallenged events raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeTransferBondChallengedIterator struct { + Event *HopL1Erc20BridgeTransferBondChallenged // 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 *HopL1Erc20BridgeTransferBondChallengedIterator) 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(HopL1Erc20BridgeTransferBondChallenged) + 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(HopL1Erc20BridgeTransferBondChallenged) + 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 *HopL1Erc20BridgeTransferBondChallengedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1Erc20BridgeTransferBondChallengedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1Erc20BridgeTransferBondChallenged represents a TransferBondChallenged event raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeTransferBondChallenged struct { + TransferRootId [32]byte + RootHash [32]byte + OriginalAmount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransferBondChallenged is a free log retrieval operation binding the contract event 0xec2697dcba539a0ac947cdf1f6d0b6314c065429eca8be2435859b10209d4c27. +// +// Solidity: event TransferBondChallenged(bytes32 indexed transferRootId, bytes32 indexed rootHash, uint256 originalAmount) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) FilterTransferBondChallenged(opts *bind.FilterOpts, transferRootId [][32]byte, rootHash [][32]byte) (*HopL1Erc20BridgeTransferBondChallengedIterator, error) { + + var transferRootIdRule []interface{} + for _, transferRootIdItem := range transferRootId { + transferRootIdRule = append(transferRootIdRule, transferRootIdItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.FilterLogs(opts, "TransferBondChallenged", transferRootIdRule, rootHashRule) + if err != nil { + return nil, err + } + return &HopL1Erc20BridgeTransferBondChallengedIterator{contract: _HopL1Erc20Bridge.contract, event: "TransferBondChallenged", logs: logs, sub: sub}, nil +} + +// WatchTransferBondChallenged is a free log subscription operation binding the contract event 0xec2697dcba539a0ac947cdf1f6d0b6314c065429eca8be2435859b10209d4c27. +// +// Solidity: event TransferBondChallenged(bytes32 indexed transferRootId, bytes32 indexed rootHash, uint256 originalAmount) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) WatchTransferBondChallenged(opts *bind.WatchOpts, sink chan<- *HopL1Erc20BridgeTransferBondChallenged, transferRootId [][32]byte, rootHash [][32]byte) (event.Subscription, error) { + + var transferRootIdRule []interface{} + for _, transferRootIdItem := range transferRootId { + transferRootIdRule = append(transferRootIdRule, transferRootIdItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.WatchLogs(opts, "TransferBondChallenged", transferRootIdRule, rootHashRule) + 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(HopL1Erc20BridgeTransferBondChallenged) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "TransferBondChallenged", 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 +} + +// ParseTransferBondChallenged is a log parse operation binding the contract event 0xec2697dcba539a0ac947cdf1f6d0b6314c065429eca8be2435859b10209d4c27. +// +// Solidity: event TransferBondChallenged(bytes32 indexed transferRootId, bytes32 indexed rootHash, uint256 originalAmount) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) ParseTransferBondChallenged(log types.Log) (*HopL1Erc20BridgeTransferBondChallenged, error) { + event := new(HopL1Erc20BridgeTransferBondChallenged) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "TransferBondChallenged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL1Erc20BridgeTransferRootBondedIterator is returned from FilterTransferRootBonded and is used to iterate over the raw logs and unpacked data for TransferRootBonded events raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeTransferRootBondedIterator struct { + Event *HopL1Erc20BridgeTransferRootBonded // 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 *HopL1Erc20BridgeTransferRootBondedIterator) 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(HopL1Erc20BridgeTransferRootBonded) + 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(HopL1Erc20BridgeTransferRootBonded) + 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 *HopL1Erc20BridgeTransferRootBondedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1Erc20BridgeTransferRootBondedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1Erc20BridgeTransferRootBonded represents a TransferRootBonded event raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeTransferRootBonded struct { + Root [32]byte + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransferRootBonded is a free log retrieval operation binding the contract event 0xa57b3e1f3af9eca02201028629700658608222c365064584cfe65d9630ef4f7b. +// +// Solidity: event TransferRootBonded(bytes32 indexed root, uint256 amount) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) FilterTransferRootBonded(opts *bind.FilterOpts, root [][32]byte) (*HopL1Erc20BridgeTransferRootBondedIterator, error) { + + var rootRule []interface{} + for _, rootItem := range root { + rootRule = append(rootRule, rootItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.FilterLogs(opts, "TransferRootBonded", rootRule) + if err != nil { + return nil, err + } + return &HopL1Erc20BridgeTransferRootBondedIterator{contract: _HopL1Erc20Bridge.contract, event: "TransferRootBonded", logs: logs, sub: sub}, nil +} + +// WatchTransferRootBonded is a free log subscription operation binding the contract event 0xa57b3e1f3af9eca02201028629700658608222c365064584cfe65d9630ef4f7b. +// +// Solidity: event TransferRootBonded(bytes32 indexed root, uint256 amount) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) WatchTransferRootBonded(opts *bind.WatchOpts, sink chan<- *HopL1Erc20BridgeTransferRootBonded, root [][32]byte) (event.Subscription, error) { + + var rootRule []interface{} + for _, rootItem := range root { + rootRule = append(rootRule, rootItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.WatchLogs(opts, "TransferRootBonded", rootRule) + 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(HopL1Erc20BridgeTransferRootBonded) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "TransferRootBonded", 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 +} + +// ParseTransferRootBonded is a log parse operation binding the contract event 0xa57b3e1f3af9eca02201028629700658608222c365064584cfe65d9630ef4f7b. +// +// Solidity: event TransferRootBonded(bytes32 indexed root, uint256 amount) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) ParseTransferRootBonded(log types.Log) (*HopL1Erc20BridgeTransferRootBonded, error) { + event := new(HopL1Erc20BridgeTransferRootBonded) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "TransferRootBonded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL1Erc20BridgeTransferRootConfirmedIterator is returned from FilterTransferRootConfirmed and is used to iterate over the raw logs and unpacked data for TransferRootConfirmed events raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeTransferRootConfirmedIterator struct { + Event *HopL1Erc20BridgeTransferRootConfirmed // 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 *HopL1Erc20BridgeTransferRootConfirmedIterator) 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(HopL1Erc20BridgeTransferRootConfirmed) + 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(HopL1Erc20BridgeTransferRootConfirmed) + 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 *HopL1Erc20BridgeTransferRootConfirmedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1Erc20BridgeTransferRootConfirmedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1Erc20BridgeTransferRootConfirmed represents a TransferRootConfirmed event raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeTransferRootConfirmed struct { + OriginChainId *big.Int + DestinationChainId *big.Int + RootHash [32]byte + TotalAmount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransferRootConfirmed is a free log retrieval operation binding the contract event 0xfdfb0eefa96935b8a8c0edf528e125dc6f3934fdbbfce31b38967e8ff413dccd. +// +// Solidity: event TransferRootConfirmed(uint256 indexed originChainId, uint256 indexed destinationChainId, bytes32 indexed rootHash, uint256 totalAmount) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) FilterTransferRootConfirmed(opts *bind.FilterOpts, originChainId []*big.Int, destinationChainId []*big.Int, rootHash [][32]byte) (*HopL1Erc20BridgeTransferRootConfirmedIterator, error) { + + var originChainIdRule []interface{} + for _, originChainIdItem := range originChainId { + originChainIdRule = append(originChainIdRule, originChainIdItem) + } + var destinationChainIdRule []interface{} + for _, destinationChainIdItem := range destinationChainId { + destinationChainIdRule = append(destinationChainIdRule, destinationChainIdItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.FilterLogs(opts, "TransferRootConfirmed", originChainIdRule, destinationChainIdRule, rootHashRule) + if err != nil { + return nil, err + } + return &HopL1Erc20BridgeTransferRootConfirmedIterator{contract: _HopL1Erc20Bridge.contract, event: "TransferRootConfirmed", logs: logs, sub: sub}, nil +} + +// WatchTransferRootConfirmed is a free log subscription operation binding the contract event 0xfdfb0eefa96935b8a8c0edf528e125dc6f3934fdbbfce31b38967e8ff413dccd. +// +// Solidity: event TransferRootConfirmed(uint256 indexed originChainId, uint256 indexed destinationChainId, bytes32 indexed rootHash, uint256 totalAmount) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) WatchTransferRootConfirmed(opts *bind.WatchOpts, sink chan<- *HopL1Erc20BridgeTransferRootConfirmed, originChainId []*big.Int, destinationChainId []*big.Int, rootHash [][32]byte) (event.Subscription, error) { + + var originChainIdRule []interface{} + for _, originChainIdItem := range originChainId { + originChainIdRule = append(originChainIdRule, originChainIdItem) + } + var destinationChainIdRule []interface{} + for _, destinationChainIdItem := range destinationChainId { + destinationChainIdRule = append(destinationChainIdRule, destinationChainIdItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.WatchLogs(opts, "TransferRootConfirmed", originChainIdRule, destinationChainIdRule, rootHashRule) + 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(HopL1Erc20BridgeTransferRootConfirmed) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "TransferRootConfirmed", 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 +} + +// ParseTransferRootConfirmed is a log parse operation binding the contract event 0xfdfb0eefa96935b8a8c0edf528e125dc6f3934fdbbfce31b38967e8ff413dccd. +// +// Solidity: event TransferRootConfirmed(uint256 indexed originChainId, uint256 indexed destinationChainId, bytes32 indexed rootHash, uint256 totalAmount) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) ParseTransferRootConfirmed(log types.Log) (*HopL1Erc20BridgeTransferRootConfirmed, error) { + event := new(HopL1Erc20BridgeTransferRootConfirmed) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "TransferRootConfirmed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL1Erc20BridgeTransferRootSetIterator is returned from FilterTransferRootSet and is used to iterate over the raw logs and unpacked data for TransferRootSet events raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeTransferRootSetIterator struct { + Event *HopL1Erc20BridgeTransferRootSet // 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 *HopL1Erc20BridgeTransferRootSetIterator) 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(HopL1Erc20BridgeTransferRootSet) + 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(HopL1Erc20BridgeTransferRootSet) + 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 *HopL1Erc20BridgeTransferRootSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1Erc20BridgeTransferRootSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1Erc20BridgeTransferRootSet represents a TransferRootSet event raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeTransferRootSet struct { + RootHash [32]byte + TotalAmount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransferRootSet is a free log retrieval operation binding the contract event 0xb33d2162aead99dab59e77a7a67ea025b776bf8ca8079e132afdf9b23e03bd42. +// +// Solidity: event TransferRootSet(bytes32 indexed rootHash, uint256 totalAmount) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) FilterTransferRootSet(opts *bind.FilterOpts, rootHash [][32]byte) (*HopL1Erc20BridgeTransferRootSetIterator, error) { + + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.FilterLogs(opts, "TransferRootSet", rootHashRule) + if err != nil { + return nil, err + } + return &HopL1Erc20BridgeTransferRootSetIterator{contract: _HopL1Erc20Bridge.contract, event: "TransferRootSet", logs: logs, sub: sub}, nil +} + +// WatchTransferRootSet is a free log subscription operation binding the contract event 0xb33d2162aead99dab59e77a7a67ea025b776bf8ca8079e132afdf9b23e03bd42. +// +// Solidity: event TransferRootSet(bytes32 indexed rootHash, uint256 totalAmount) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) WatchTransferRootSet(opts *bind.WatchOpts, sink chan<- *HopL1Erc20BridgeTransferRootSet, rootHash [][32]byte) (event.Subscription, error) { + + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.WatchLogs(opts, "TransferRootSet", rootHashRule) + 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(HopL1Erc20BridgeTransferRootSet) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "TransferRootSet", 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 +} + +// ParseTransferRootSet is a log parse operation binding the contract event 0xb33d2162aead99dab59e77a7a67ea025b776bf8ca8079e132afdf9b23e03bd42. +// +// Solidity: event TransferRootSet(bytes32 indexed rootHash, uint256 totalAmount) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) ParseTransferRootSet(log types.Log) (*HopL1Erc20BridgeTransferRootSet, error) { + event := new(HopL1Erc20BridgeTransferRootSet) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "TransferRootSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL1Erc20BridgeTransferSentToL2Iterator is returned from FilterTransferSentToL2 and is used to iterate over the raw logs and unpacked data for TransferSentToL2 events raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeTransferSentToL2Iterator struct { + Event *HopL1Erc20BridgeTransferSentToL2 // 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 *HopL1Erc20BridgeTransferSentToL2Iterator) 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(HopL1Erc20BridgeTransferSentToL2) + 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(HopL1Erc20BridgeTransferSentToL2) + 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 *HopL1Erc20BridgeTransferSentToL2Iterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1Erc20BridgeTransferSentToL2Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1Erc20BridgeTransferSentToL2 represents a TransferSentToL2 event raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeTransferSentToL2 struct { + ChainId *big.Int + Recipient common.Address + Amount *big.Int + AmountOutMin *big.Int + Deadline *big.Int + Relayer common.Address + RelayerFee *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransferSentToL2 is a free log retrieval operation binding the contract event 0x0a0607688c86ec1775abcdbab7b33a3a35a6c9cde677c9be880150c231cc6b0b. +// +// Solidity: event TransferSentToL2(uint256 indexed chainId, address indexed recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address indexed relayer, uint256 relayerFee) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) FilterTransferSentToL2(opts *bind.FilterOpts, chainId []*big.Int, recipient []common.Address, relayer []common.Address) (*HopL1Erc20BridgeTransferSentToL2Iterator, error) { + + var chainIdRule []interface{} + for _, chainIdItem := range chainId { + chainIdRule = append(chainIdRule, chainIdItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + var relayerRule []interface{} + for _, relayerItem := range relayer { + relayerRule = append(relayerRule, relayerItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.FilterLogs(opts, "TransferSentToL2", chainIdRule, recipientRule, relayerRule) + if err != nil { + return nil, err + } + return &HopL1Erc20BridgeTransferSentToL2Iterator{contract: _HopL1Erc20Bridge.contract, event: "TransferSentToL2", logs: logs, sub: sub}, nil +} + +// WatchTransferSentToL2 is a free log subscription operation binding the contract event 0x0a0607688c86ec1775abcdbab7b33a3a35a6c9cde677c9be880150c231cc6b0b. +// +// Solidity: event TransferSentToL2(uint256 indexed chainId, address indexed recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address indexed relayer, uint256 relayerFee) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) WatchTransferSentToL2(opts *bind.WatchOpts, sink chan<- *HopL1Erc20BridgeTransferSentToL2, chainId []*big.Int, recipient []common.Address, relayer []common.Address) (event.Subscription, error) { + + var chainIdRule []interface{} + for _, chainIdItem := range chainId { + chainIdRule = append(chainIdRule, chainIdItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + var relayerRule []interface{} + for _, relayerItem := range relayer { + relayerRule = append(relayerRule, relayerItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.WatchLogs(opts, "TransferSentToL2", chainIdRule, recipientRule, relayerRule) + 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(HopL1Erc20BridgeTransferSentToL2) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "TransferSentToL2", 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 +} + +// ParseTransferSentToL2 is a log parse operation binding the contract event 0x0a0607688c86ec1775abcdbab7b33a3a35a6c9cde677c9be880150c231cc6b0b. +// +// Solidity: event TransferSentToL2(uint256 indexed chainId, address indexed recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address indexed relayer, uint256 relayerFee) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) ParseTransferSentToL2(log types.Log) (*HopL1Erc20BridgeTransferSentToL2, error) { + event := new(HopL1Erc20BridgeTransferSentToL2) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "TransferSentToL2", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL1Erc20BridgeUnstakeIterator is returned from FilterUnstake and is used to iterate over the raw logs and unpacked data for Unstake events raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeUnstakeIterator struct { + Event *HopL1Erc20BridgeUnstake // 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 *HopL1Erc20BridgeUnstakeIterator) 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(HopL1Erc20BridgeUnstake) + 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(HopL1Erc20BridgeUnstake) + 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 *HopL1Erc20BridgeUnstakeIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1Erc20BridgeUnstakeIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1Erc20BridgeUnstake represents a Unstake event raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeUnstake struct { + Account common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnstake is a free log retrieval operation binding the contract event 0x85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd. +// +// Solidity: event Unstake(address indexed account, uint256 amount) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) FilterUnstake(opts *bind.FilterOpts, account []common.Address) (*HopL1Erc20BridgeUnstakeIterator, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.FilterLogs(opts, "Unstake", accountRule) + if err != nil { + return nil, err + } + return &HopL1Erc20BridgeUnstakeIterator{contract: _HopL1Erc20Bridge.contract, event: "Unstake", logs: logs, sub: sub}, nil +} + +// WatchUnstake is a free log subscription operation binding the contract event 0x85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd. +// +// Solidity: event Unstake(address indexed account, uint256 amount) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) WatchUnstake(opts *bind.WatchOpts, sink chan<- *HopL1Erc20BridgeUnstake, account []common.Address) (event.Subscription, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.WatchLogs(opts, "Unstake", accountRule) + 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(HopL1Erc20BridgeUnstake) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "Unstake", 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 +} + +// ParseUnstake is a log parse operation binding the contract event 0x85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd. +// +// Solidity: event Unstake(address indexed account, uint256 amount) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) ParseUnstake(log types.Log) (*HopL1Erc20BridgeUnstake, error) { + event := new(HopL1Erc20BridgeUnstake) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "Unstake", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL1Erc20BridgeWithdrawalBondSettledIterator is returned from FilterWithdrawalBondSettled and is used to iterate over the raw logs and unpacked data for WithdrawalBondSettled events raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeWithdrawalBondSettledIterator struct { + Event *HopL1Erc20BridgeWithdrawalBondSettled // 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 *HopL1Erc20BridgeWithdrawalBondSettledIterator) 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(HopL1Erc20BridgeWithdrawalBondSettled) + 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(HopL1Erc20BridgeWithdrawalBondSettled) + 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 *HopL1Erc20BridgeWithdrawalBondSettledIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1Erc20BridgeWithdrawalBondSettledIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1Erc20BridgeWithdrawalBondSettled represents a WithdrawalBondSettled event raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeWithdrawalBondSettled struct { + Bonder common.Address + TransferId [32]byte + RootHash [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawalBondSettled is a free log retrieval operation binding the contract event 0x84eb21b24c31b27a3bc67dde4a598aad06db6e9415cd66544492b9616996143c. +// +// Solidity: event WithdrawalBondSettled(address indexed bonder, bytes32 indexed transferId, bytes32 indexed rootHash) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) FilterWithdrawalBondSettled(opts *bind.FilterOpts, bonder []common.Address, transferId [][32]byte, rootHash [][32]byte) (*HopL1Erc20BridgeWithdrawalBondSettledIterator, error) { + + var bonderRule []interface{} + for _, bonderItem := range bonder { + bonderRule = append(bonderRule, bonderItem) + } + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.FilterLogs(opts, "WithdrawalBondSettled", bonderRule, transferIdRule, rootHashRule) + if err != nil { + return nil, err + } + return &HopL1Erc20BridgeWithdrawalBondSettledIterator{contract: _HopL1Erc20Bridge.contract, event: "WithdrawalBondSettled", logs: logs, sub: sub}, nil +} + +// WatchWithdrawalBondSettled is a free log subscription operation binding the contract event 0x84eb21b24c31b27a3bc67dde4a598aad06db6e9415cd66544492b9616996143c. +// +// Solidity: event WithdrawalBondSettled(address indexed bonder, bytes32 indexed transferId, bytes32 indexed rootHash) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) WatchWithdrawalBondSettled(opts *bind.WatchOpts, sink chan<- *HopL1Erc20BridgeWithdrawalBondSettled, bonder []common.Address, transferId [][32]byte, rootHash [][32]byte) (event.Subscription, error) { + + var bonderRule []interface{} + for _, bonderItem := range bonder { + bonderRule = append(bonderRule, bonderItem) + } + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.WatchLogs(opts, "WithdrawalBondSettled", bonderRule, transferIdRule, rootHashRule) + 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(HopL1Erc20BridgeWithdrawalBondSettled) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "WithdrawalBondSettled", 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 +} + +// ParseWithdrawalBondSettled is a log parse operation binding the contract event 0x84eb21b24c31b27a3bc67dde4a598aad06db6e9415cd66544492b9616996143c. +// +// Solidity: event WithdrawalBondSettled(address indexed bonder, bytes32 indexed transferId, bytes32 indexed rootHash) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) ParseWithdrawalBondSettled(log types.Log) (*HopL1Erc20BridgeWithdrawalBondSettled, error) { + event := new(HopL1Erc20BridgeWithdrawalBondSettled) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "WithdrawalBondSettled", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL1Erc20BridgeWithdrawalBondedIterator is returned from FilterWithdrawalBonded and is used to iterate over the raw logs and unpacked data for WithdrawalBonded events raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeWithdrawalBondedIterator struct { + Event *HopL1Erc20BridgeWithdrawalBonded // 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 *HopL1Erc20BridgeWithdrawalBondedIterator) 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(HopL1Erc20BridgeWithdrawalBonded) + 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(HopL1Erc20BridgeWithdrawalBonded) + 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 *HopL1Erc20BridgeWithdrawalBondedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1Erc20BridgeWithdrawalBondedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1Erc20BridgeWithdrawalBonded represents a WithdrawalBonded event raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeWithdrawalBonded struct { + TransferId [32]byte + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawalBonded is a free log retrieval operation binding the contract event 0x0c3d250c7831051e78aa6a56679e590374c7c424415ffe4aa474491def2fe705. +// +// Solidity: event WithdrawalBonded(bytes32 indexed transferId, uint256 amount) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) FilterWithdrawalBonded(opts *bind.FilterOpts, transferId [][32]byte) (*HopL1Erc20BridgeWithdrawalBondedIterator, error) { + + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.FilterLogs(opts, "WithdrawalBonded", transferIdRule) + if err != nil { + return nil, err + } + return &HopL1Erc20BridgeWithdrawalBondedIterator{contract: _HopL1Erc20Bridge.contract, event: "WithdrawalBonded", logs: logs, sub: sub}, nil +} + +// WatchWithdrawalBonded is a free log subscription operation binding the contract event 0x0c3d250c7831051e78aa6a56679e590374c7c424415ffe4aa474491def2fe705. +// +// Solidity: event WithdrawalBonded(bytes32 indexed transferId, uint256 amount) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) WatchWithdrawalBonded(opts *bind.WatchOpts, sink chan<- *HopL1Erc20BridgeWithdrawalBonded, transferId [][32]byte) (event.Subscription, error) { + + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.WatchLogs(opts, "WithdrawalBonded", transferIdRule) + 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(HopL1Erc20BridgeWithdrawalBonded) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "WithdrawalBonded", 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 +} + +// ParseWithdrawalBonded is a log parse operation binding the contract event 0x0c3d250c7831051e78aa6a56679e590374c7c424415ffe4aa474491def2fe705. +// +// Solidity: event WithdrawalBonded(bytes32 indexed transferId, uint256 amount) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) ParseWithdrawalBonded(log types.Log) (*HopL1Erc20BridgeWithdrawalBonded, error) { + event := new(HopL1Erc20BridgeWithdrawalBonded) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "WithdrawalBonded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL1Erc20BridgeWithdrewIterator is returned from FilterWithdrew and is used to iterate over the raw logs and unpacked data for Withdrew events raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeWithdrewIterator struct { + Event *HopL1Erc20BridgeWithdrew // 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 *HopL1Erc20BridgeWithdrewIterator) 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(HopL1Erc20BridgeWithdrew) + 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(HopL1Erc20BridgeWithdrew) + 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 *HopL1Erc20BridgeWithdrewIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1Erc20BridgeWithdrewIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1Erc20BridgeWithdrew represents a Withdrew event raised by the HopL1Erc20Bridge contract. +type HopL1Erc20BridgeWithdrew struct { + TransferId [32]byte + Recipient common.Address + Amount *big.Int + TransferNonce [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrew is a free log retrieval operation binding the contract event 0x9475cdbde5fc71fe2ccd413c82878ee54d061b9f74f9e2e1a03ff1178821502c. +// +// Solidity: event Withdrew(bytes32 indexed transferId, address indexed recipient, uint256 amount, bytes32 transferNonce) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) FilterWithdrew(opts *bind.FilterOpts, transferId [][32]byte, recipient []common.Address) (*HopL1Erc20BridgeWithdrewIterator, error) { + + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.FilterLogs(opts, "Withdrew", transferIdRule, recipientRule) + if err != nil { + return nil, err + } + return &HopL1Erc20BridgeWithdrewIterator{contract: _HopL1Erc20Bridge.contract, event: "Withdrew", logs: logs, sub: sub}, nil +} + +// WatchWithdrew is a free log subscription operation binding the contract event 0x9475cdbde5fc71fe2ccd413c82878ee54d061b9f74f9e2e1a03ff1178821502c. +// +// Solidity: event Withdrew(bytes32 indexed transferId, address indexed recipient, uint256 amount, bytes32 transferNonce) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) WatchWithdrew(opts *bind.WatchOpts, sink chan<- *HopL1Erc20BridgeWithdrew, transferId [][32]byte, recipient []common.Address) (event.Subscription, error) { + + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _HopL1Erc20Bridge.contract.WatchLogs(opts, "Withdrew", transferIdRule, recipientRule) + 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(HopL1Erc20BridgeWithdrew) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "Withdrew", 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 +} + +// ParseWithdrew is a log parse operation binding the contract event 0x9475cdbde5fc71fe2ccd413c82878ee54d061b9f74f9e2e1a03ff1178821502c. +// +// Solidity: event Withdrew(bytes32 indexed transferId, address indexed recipient, uint256 amount, bytes32 transferNonce) +func (_HopL1Erc20Bridge *HopL1Erc20BridgeFilterer) ParseWithdrew(log types.Log) (*HopL1Erc20BridgeWithdrew, error) { + event := new(HopL1Erc20BridgeWithdrew) + if err := _HopL1Erc20Bridge.contract.UnpackLog(event, "Withdrew", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/contracts/hop/bridge/l1Bridge.go b/contracts/hop/l1Contracts/l1EthBridge/l1EthBridge.go similarity index 51% rename from contracts/hop/bridge/l1Bridge.go rename to contracts/hop/l1Contracts/l1EthBridge/l1EthBridge.go index 6802fd20d..29145674d 100644 --- a/contracts/hop/bridge/l1Bridge.go +++ b/contracts/hop/l1Contracts/l1EthBridge/l1EthBridge.go @@ -1,9 +1,10 @@ // Code generated - DO NOT EDIT. // This file is a generated binding and any manual changes will be lost. -package hopBridge +package hopL1EthBridge import ( + "errors" "math/big" "strings" @@ -17,6 +18,7 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var ( + _ = errors.New _ = big.NewInt _ = strings.NewReader _ = ethereum.NotFound @@ -24,6 +26,7 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription + _ = abi.ConvertType ) // BridgeTransferRoot is an auto generated low-level Go binding around an user-defined struct. @@ -33,157 +36,163 @@ type BridgeTransferRoot struct { CreatedAt *big.Int } -// HopBridgeABI is the input ABI used to generate the binding from. -const HopBridgeABI = "[{\"inputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"_l1CanonicalToken\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"bonders\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"_governance\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newBonder\",\"type\":\"address\"}],\"name\":\"BonderAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousBonder\",\"type\":\"address\"}],\"name\":\"BonderRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferRootId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"originalAmount\",\"type\":\"uint256\"}],\"name\":\"ChallengeResolved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalBondsSettled\",\"type\":\"uint256\"}],\"name\":\"MultipleWithdrawalsSettled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Stake\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferRootId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"originalAmount\",\"type\":\"uint256\"}],\"name\":\"TransferBondChallenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferRootBonded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"originChainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"TransferRootConfirmed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"TransferRootSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"relayerFee\",\"type\":\"uint256\"}],\"name\":\"TransferSentToL2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Unstake\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"}],\"name\":\"WithdrawalBondSettled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"WithdrawalBonded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"}],\"name\":\"Withdrew\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"CHALLENGE_AMOUNT_DIVISOR\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TIME_SLOT_SIZE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"addBonder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"bondTransferRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"}],\"name\":\"bondWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"chainBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengeResolutionPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"originalAmount\",\"type\":\"uint256\"}],\"name\":\"challengeTransferBond\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"originChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rootCommittedAt\",\"type\":\"uint256\"}],\"name\":\"confirmTransferRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"crossDomainMessengerWrappers\",\"outputs\":[{\"internalType\":\"contractIMessengerWrapper\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"getBondForTransferAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"}],\"name\":\"getBondedWithdrawalAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"getChallengeAmountForTransferAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"getCredit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"getDebitAndAdditionalDebit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"maybeBonder\",\"type\":\"address\"}],\"name\":\"getIsBonder\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"getRawDebit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"}],\"name\":\"getTimeSlot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"getTransferId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"getTransferRoot\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"total\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountWithdrawn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"}],\"internalType\":\"structBridge.TransferRoot\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"getTransferRootId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governance\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"isChainIdPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"}],\"name\":\"isTransferIdSpent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l1CanonicalToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minTransferRootBondDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"removeBonder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"originalAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"rescueTransferRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"originalAmount\",\"type\":\"uint256\"}],\"name\":\"resolveChallenge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"relayerFee\",\"type\":\"uint256\"}],\"name\":\"sendToL2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isPaused\",\"type\":\"bool\"}],\"name\":\"setChainIdDepositsPaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"}],\"name\":\"setChallengePeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_challengeResolutionPeriod\",\"type\":\"uint256\"}],\"name\":\"setChallengeResolutionPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contractIMessengerWrapper\",\"name\":\"_crossDomainMessengerWrapper\",\"type\":\"address\"}],\"name\":\"setCrossDomainMessengerWrapper\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newGovernance\",\"type\":\"address\"}],\"name\":\"setGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minTransferRootBondDelay\",\"type\":\"uint256\"}],\"name\":\"setMinTransferRootBondDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"transferRootTotalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"transferIdTreeIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"siblings\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"totalLeaves\",\"type\":\"uint256\"}],\"name\":\"settleBondedWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"bytes32[]\",\"name\":\"transferIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"settleBondedWithdrawals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"timeSlotToAmountBonded\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"transferBonds\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"challengeStartTime\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"challengeResolved\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"transferRootCommittedAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"unstake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"transferRootTotalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"transferIdTreeIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"siblings\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"totalLeaves\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// HopBridge is an auto generated Go binding around an Ethereum contract. -type HopBridge struct { - HopBridgeCaller // Read-only binding to the contract - HopBridgeTransactor // Write-only binding to the contract - HopBridgeFilterer // Log filterer for contract events +// HopL1EthBridgeMetaData contains all meta data concerning the HopL1EthBridge contract. +var HopL1EthBridgeMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bonders\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"_governance\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newBonder\",\"type\":\"address\"}],\"name\":\"BonderAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousBonder\",\"type\":\"address\"}],\"name\":\"BonderRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferRootId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"originalAmount\",\"type\":\"uint256\"}],\"name\":\"ChallengeResolved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalBondsSettled\",\"type\":\"uint256\"}],\"name\":\"MultipleWithdrawalsSettled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Stake\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferRootId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"originalAmount\",\"type\":\"uint256\"}],\"name\":\"TransferBondChallenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferRootBonded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"originChainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"TransferRootConfirmed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"TransferRootSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"relayerFee\",\"type\":\"uint256\"}],\"name\":\"TransferSentToL2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Unstake\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"}],\"name\":\"WithdrawalBondSettled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"WithdrawalBonded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"}],\"name\":\"Withdrew\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"CHALLENGE_AMOUNT_DIVISOR\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TIME_SLOT_SIZE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"addBonder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"bondTransferRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"}],\"name\":\"bondWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"chainBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengeResolutionPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"originalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"}],\"name\":\"challengeTransferBond\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"originChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rootCommittedAt\",\"type\":\"uint256\"}],\"name\":\"confirmTransferRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"crossDomainMessengerWrappers\",\"outputs\":[{\"internalType\":\"contractIMessengerWrapper\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"getBondForTransferAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"}],\"name\":\"getBondedWithdrawalAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"getChallengeAmountForTransferAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"getCredit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"getDebitAndAdditionalDebit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"maybeBonder\",\"type\":\"address\"}],\"name\":\"getIsBonder\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"getRawDebit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"}],\"name\":\"getTimeSlot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"getTransferId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"getTransferRoot\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"total\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountWithdrawn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"}],\"internalType\":\"structBridge.TransferRoot\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"getTransferRootId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governance\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"isChainIdPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"}],\"name\":\"isTransferIdSpent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minTransferRootBondDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"removeBonder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"originalAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"rescueTransferRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"originalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"}],\"name\":\"resolveChallenge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"relayerFee\",\"type\":\"uint256\"}],\"name\":\"sendToL2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isPaused\",\"type\":\"bool\"}],\"name\":\"setChainIdDepositsPaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"}],\"name\":\"setChallengePeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_challengeResolutionPeriod\",\"type\":\"uint256\"}],\"name\":\"setChallengeResolutionPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contractIMessengerWrapper\",\"name\":\"_crossDomainMessengerWrapper\",\"type\":\"address\"}],\"name\":\"setCrossDomainMessengerWrapper\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newGovernance\",\"type\":\"address\"}],\"name\":\"setGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minTransferRootBondDelay\",\"type\":\"uint256\"}],\"name\":\"setMinTransferRootBondDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"transferRootTotalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"transferIdTreeIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"siblings\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"totalLeaves\",\"type\":\"uint256\"}],\"name\":\"settleBondedWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"bytes32[]\",\"name\":\"transferIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"settleBondedWithdrawals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"timeSlotToAmountBonded\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"transferBonds\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"challengeStartTime\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"challengeResolved\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"transferRootCommittedAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"unstake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"transferRootTotalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"transferIdTreeIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"siblings\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"totalLeaves\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } -// HopBridgeCaller is an auto generated read-only Go binding around an Ethereum contract. -type HopBridgeCaller struct { +// HopL1EthBridgeABI is the input ABI used to generate the binding from. +// Deprecated: Use HopL1EthBridgeMetaData.ABI instead. +var HopL1EthBridgeABI = HopL1EthBridgeMetaData.ABI + +// HopL1EthBridge is an auto generated Go binding around an Ethereum contract. +type HopL1EthBridge struct { + HopL1EthBridgeCaller // Read-only binding to the contract + HopL1EthBridgeTransactor // Write-only binding to the contract + HopL1EthBridgeFilterer // Log filterer for contract events +} + +// HopL1EthBridgeCaller is an auto generated read-only Go binding around an Ethereum contract. +type HopL1EthBridgeCaller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// HopBridgeTransactor is an auto generated write-only Go binding around an Ethereum contract. -type HopBridgeTransactor struct { +// HopL1EthBridgeTransactor is an auto generated write-only Go binding around an Ethereum contract. +type HopL1EthBridgeTransactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// HopBridgeFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type HopBridgeFilterer struct { +// HopL1EthBridgeFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type HopL1EthBridgeFilterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// HopBridgeSession is an auto generated Go binding around an Ethereum contract, +// HopL1EthBridgeSession is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. -type HopBridgeSession struct { - Contract *HopBridge // Generic contract binding to set the session for +type HopL1EthBridgeSession struct { + Contract *HopL1EthBridge // 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 } -// HopBridgeCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// HopL1EthBridgeCallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. -type HopBridgeCallerSession struct { - Contract *HopBridgeCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session +type HopL1EthBridgeCallerSession struct { + Contract *HopL1EthBridgeCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session } -// HopBridgeTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// HopL1EthBridgeTransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. -type HopBridgeTransactorSession struct { - Contract *HopBridgeTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +type HopL1EthBridgeTransactorSession struct { + Contract *HopL1EthBridgeTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } -// HopBridgeRaw is an auto generated low-level Go binding around an Ethereum contract. -type HopBridgeRaw struct { - Contract *HopBridge // Generic contract binding to access the raw methods on +// HopL1EthBridgeRaw is an auto generated low-level Go binding around an Ethereum contract. +type HopL1EthBridgeRaw struct { + Contract *HopL1EthBridge // Generic contract binding to access the raw methods on } -// HopBridgeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type HopBridgeCallerRaw struct { - Contract *HopBridgeCaller // Generic read-only contract binding to access the raw methods on +// HopL1EthBridgeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type HopL1EthBridgeCallerRaw struct { + Contract *HopL1EthBridgeCaller // Generic read-only contract binding to access the raw methods on } -// HopBridgeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type HopBridgeTransactorRaw struct { - Contract *HopBridgeTransactor // Generic write-only contract binding to access the raw methods on +// HopL1EthBridgeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type HopL1EthBridgeTransactorRaw struct { + Contract *HopL1EthBridgeTransactor // Generic write-only contract binding to access the raw methods on } -// NewHopBridge creates a new instance of HopBridge, bound to a specific deployed contract. -func NewHopBridge(address common.Address, backend bind.ContractBackend) (*HopBridge, error) { - contract, err := bindHopBridge(address, backend, backend, backend) +// NewHopL1EthBridge creates a new instance of HopL1EthBridge, bound to a specific deployed contract. +func NewHopL1EthBridge(address common.Address, backend bind.ContractBackend) (*HopL1EthBridge, error) { + contract, err := bindHopL1EthBridge(address, backend, backend, backend) if err != nil { return nil, err } - return &HopBridge{HopBridgeCaller: HopBridgeCaller{contract: contract}, HopBridgeTransactor: HopBridgeTransactor{contract: contract}, HopBridgeFilterer: HopBridgeFilterer{contract: contract}}, nil + return &HopL1EthBridge{HopL1EthBridgeCaller: HopL1EthBridgeCaller{contract: contract}, HopL1EthBridgeTransactor: HopL1EthBridgeTransactor{contract: contract}, HopL1EthBridgeFilterer: HopL1EthBridgeFilterer{contract: contract}}, nil } -// NewHopBridgeCaller creates a new read-only instance of HopBridge, bound to a specific deployed contract. -func NewHopBridgeCaller(address common.Address, caller bind.ContractCaller) (*HopBridgeCaller, error) { - contract, err := bindHopBridge(address, caller, nil, nil) +// NewHopL1EthBridgeCaller creates a new read-only instance of HopL1EthBridge, bound to a specific deployed contract. +func NewHopL1EthBridgeCaller(address common.Address, caller bind.ContractCaller) (*HopL1EthBridgeCaller, error) { + contract, err := bindHopL1EthBridge(address, caller, nil, nil) if err != nil { return nil, err } - return &HopBridgeCaller{contract: contract}, nil + return &HopL1EthBridgeCaller{contract: contract}, nil } -// NewHopBridgeTransactor creates a new write-only instance of HopBridge, bound to a specific deployed contract. -func NewHopBridgeTransactor(address common.Address, transactor bind.ContractTransactor) (*HopBridgeTransactor, error) { - contract, err := bindHopBridge(address, nil, transactor, nil) +// NewHopL1EthBridgeTransactor creates a new write-only instance of HopL1EthBridge, bound to a specific deployed contract. +func NewHopL1EthBridgeTransactor(address common.Address, transactor bind.ContractTransactor) (*HopL1EthBridgeTransactor, error) { + contract, err := bindHopL1EthBridge(address, nil, transactor, nil) if err != nil { return nil, err } - return &HopBridgeTransactor{contract: contract}, nil + return &HopL1EthBridgeTransactor{contract: contract}, nil } -// NewHopBridgeFilterer creates a new log filterer instance of HopBridge, bound to a specific deployed contract. -func NewHopBridgeFilterer(address common.Address, filterer bind.ContractFilterer) (*HopBridgeFilterer, error) { - contract, err := bindHopBridge(address, nil, nil, filterer) +// NewHopL1EthBridgeFilterer creates a new log filterer instance of HopL1EthBridge, bound to a specific deployed contract. +func NewHopL1EthBridgeFilterer(address common.Address, filterer bind.ContractFilterer) (*HopL1EthBridgeFilterer, error) { + contract, err := bindHopL1EthBridge(address, nil, nil, filterer) if err != nil { return nil, err } - return &HopBridgeFilterer{contract: contract}, nil + return &HopL1EthBridgeFilterer{contract: contract}, nil } -// bindHopBridge binds a generic wrapper to an already deployed contract. -func bindHopBridge(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(HopBridgeABI)) +// bindHopL1EthBridge binds a generic wrapper to an already deployed contract. +func bindHopL1EthBridge(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := HopL1EthBridgeMetaData.GetAbi() if err != nil { return nil, err } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil + 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 (_HopBridge *HopBridgeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _HopBridge.Contract.HopBridgeCaller.contract.Call(opts, result, method, params...) +func (_HopL1EthBridge *HopL1EthBridgeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _HopL1EthBridge.Contract.HopL1EthBridgeCaller.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 (_HopBridge *HopBridgeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _HopBridge.Contract.HopBridgeTransactor.contract.Transfer(opts) +func (_HopL1EthBridge *HopL1EthBridgeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.HopL1EthBridgeTransactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. -func (_HopBridge *HopBridgeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _HopBridge.Contract.HopBridgeTransactor.contract.Transact(opts, method, params...) +func (_HopL1EthBridge *HopL1EthBridgeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.HopL1EthBridgeTransactor.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 (_HopBridge *HopBridgeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _HopBridge.Contract.contract.Call(opts, result, method, params...) +func (_HopL1EthBridge *HopL1EthBridgeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _HopL1EthBridge.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 (_HopBridge *HopBridgeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _HopBridge.Contract.contract.Transfer(opts) +func (_HopL1EthBridge *HopL1EthBridgeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. -func (_HopBridge *HopBridgeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _HopBridge.Contract.contract.Transact(opts, method, params...) +func (_HopL1EthBridge *HopL1EthBridgeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.contract.Transact(opts, method, params...) } // CHALLENGEAMOUNTDIVISOR is a free data retrieval call binding the contract method 0x98c4f76d. // // Solidity: function CHALLENGE_AMOUNT_DIVISOR() view returns(uint256) -func (_HopBridge *HopBridgeCaller) CHALLENGEAMOUNTDIVISOR(opts *bind.CallOpts) (*big.Int, error) { +func (_HopL1EthBridge *HopL1EthBridgeCaller) CHALLENGEAMOUNTDIVISOR(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} - err := _HopBridge.contract.Call(opts, &out, "CHALLENGE_AMOUNT_DIVISOR") + err := _HopL1EthBridge.contract.Call(opts, &out, "CHALLENGE_AMOUNT_DIVISOR") if err != nil { return *new(*big.Int), err @@ -198,23 +207,23 @@ func (_HopBridge *HopBridgeCaller) CHALLENGEAMOUNTDIVISOR(opts *bind.CallOpts) ( // CHALLENGEAMOUNTDIVISOR is a free data retrieval call binding the contract method 0x98c4f76d. // // Solidity: function CHALLENGE_AMOUNT_DIVISOR() view returns(uint256) -func (_HopBridge *HopBridgeSession) CHALLENGEAMOUNTDIVISOR() (*big.Int, error) { - return _HopBridge.Contract.CHALLENGEAMOUNTDIVISOR(&_HopBridge.CallOpts) +func (_HopL1EthBridge *HopL1EthBridgeSession) CHALLENGEAMOUNTDIVISOR() (*big.Int, error) { + return _HopL1EthBridge.Contract.CHALLENGEAMOUNTDIVISOR(&_HopL1EthBridge.CallOpts) } // CHALLENGEAMOUNTDIVISOR is a free data retrieval call binding the contract method 0x98c4f76d. // // Solidity: function CHALLENGE_AMOUNT_DIVISOR() view returns(uint256) -func (_HopBridge *HopBridgeCallerSession) CHALLENGEAMOUNTDIVISOR() (*big.Int, error) { - return _HopBridge.Contract.CHALLENGEAMOUNTDIVISOR(&_HopBridge.CallOpts) +func (_HopL1EthBridge *HopL1EthBridgeCallerSession) CHALLENGEAMOUNTDIVISOR() (*big.Int, error) { + return _HopL1EthBridge.Contract.CHALLENGEAMOUNTDIVISOR(&_HopL1EthBridge.CallOpts) } // TIMESLOTSIZE is a free data retrieval call binding the contract method 0x4de8c6e6. // // Solidity: function TIME_SLOT_SIZE() view returns(uint256) -func (_HopBridge *HopBridgeCaller) TIMESLOTSIZE(opts *bind.CallOpts) (*big.Int, error) { +func (_HopL1EthBridge *HopL1EthBridgeCaller) TIMESLOTSIZE(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} - err := _HopBridge.contract.Call(opts, &out, "TIME_SLOT_SIZE") + err := _HopL1EthBridge.contract.Call(opts, &out, "TIME_SLOT_SIZE") if err != nil { return *new(*big.Int), err @@ -229,23 +238,23 @@ func (_HopBridge *HopBridgeCaller) TIMESLOTSIZE(opts *bind.CallOpts) (*big.Int, // TIMESLOTSIZE is a free data retrieval call binding the contract method 0x4de8c6e6. // // Solidity: function TIME_SLOT_SIZE() view returns(uint256) -func (_HopBridge *HopBridgeSession) TIMESLOTSIZE() (*big.Int, error) { - return _HopBridge.Contract.TIMESLOTSIZE(&_HopBridge.CallOpts) +func (_HopL1EthBridge *HopL1EthBridgeSession) TIMESLOTSIZE() (*big.Int, error) { + return _HopL1EthBridge.Contract.TIMESLOTSIZE(&_HopL1EthBridge.CallOpts) } // TIMESLOTSIZE is a free data retrieval call binding the contract method 0x4de8c6e6. // // Solidity: function TIME_SLOT_SIZE() view returns(uint256) -func (_HopBridge *HopBridgeCallerSession) TIMESLOTSIZE() (*big.Int, error) { - return _HopBridge.Contract.TIMESLOTSIZE(&_HopBridge.CallOpts) +func (_HopL1EthBridge *HopL1EthBridgeCallerSession) TIMESLOTSIZE() (*big.Int, error) { + return _HopL1EthBridge.Contract.TIMESLOTSIZE(&_HopL1EthBridge.CallOpts) } // ChainBalance is a free data retrieval call binding the contract method 0xfc110b67. // // Solidity: function chainBalance(uint256 ) view returns(uint256) -func (_HopBridge *HopBridgeCaller) ChainBalance(opts *bind.CallOpts, arg0 *big.Int) (*big.Int, error) { +func (_HopL1EthBridge *HopL1EthBridgeCaller) ChainBalance(opts *bind.CallOpts, arg0 *big.Int) (*big.Int, error) { var out []interface{} - err := _HopBridge.contract.Call(opts, &out, "chainBalance", arg0) + err := _HopL1EthBridge.contract.Call(opts, &out, "chainBalance", arg0) if err != nil { return *new(*big.Int), err @@ -260,23 +269,23 @@ func (_HopBridge *HopBridgeCaller) ChainBalance(opts *bind.CallOpts, arg0 *big.I // ChainBalance is a free data retrieval call binding the contract method 0xfc110b67. // // Solidity: function chainBalance(uint256 ) view returns(uint256) -func (_HopBridge *HopBridgeSession) ChainBalance(arg0 *big.Int) (*big.Int, error) { - return _HopBridge.Contract.ChainBalance(&_HopBridge.CallOpts, arg0) +func (_HopL1EthBridge *HopL1EthBridgeSession) ChainBalance(arg0 *big.Int) (*big.Int, error) { + return _HopL1EthBridge.Contract.ChainBalance(&_HopL1EthBridge.CallOpts, arg0) } // ChainBalance is a free data retrieval call binding the contract method 0xfc110b67. // // Solidity: function chainBalance(uint256 ) view returns(uint256) -func (_HopBridge *HopBridgeCallerSession) ChainBalance(arg0 *big.Int) (*big.Int, error) { - return _HopBridge.Contract.ChainBalance(&_HopBridge.CallOpts, arg0) +func (_HopL1EthBridge *HopL1EthBridgeCallerSession) ChainBalance(arg0 *big.Int) (*big.Int, error) { + return _HopL1EthBridge.Contract.ChainBalance(&_HopL1EthBridge.CallOpts, arg0) } // ChallengePeriod is a free data retrieval call binding the contract method 0xf3f480d9. // // Solidity: function challengePeriod() view returns(uint256) -func (_HopBridge *HopBridgeCaller) ChallengePeriod(opts *bind.CallOpts) (*big.Int, error) { +func (_HopL1EthBridge *HopL1EthBridgeCaller) ChallengePeriod(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} - err := _HopBridge.contract.Call(opts, &out, "challengePeriod") + err := _HopL1EthBridge.contract.Call(opts, &out, "challengePeriod") if err != nil { return *new(*big.Int), err @@ -291,23 +300,23 @@ func (_HopBridge *HopBridgeCaller) ChallengePeriod(opts *bind.CallOpts) (*big.In // ChallengePeriod is a free data retrieval call binding the contract method 0xf3f480d9. // // Solidity: function challengePeriod() view returns(uint256) -func (_HopBridge *HopBridgeSession) ChallengePeriod() (*big.Int, error) { - return _HopBridge.Contract.ChallengePeriod(&_HopBridge.CallOpts) +func (_HopL1EthBridge *HopL1EthBridgeSession) ChallengePeriod() (*big.Int, error) { + return _HopL1EthBridge.Contract.ChallengePeriod(&_HopL1EthBridge.CallOpts) } // ChallengePeriod is a free data retrieval call binding the contract method 0xf3f480d9. // // Solidity: function challengePeriod() view returns(uint256) -func (_HopBridge *HopBridgeCallerSession) ChallengePeriod() (*big.Int, error) { - return _HopBridge.Contract.ChallengePeriod(&_HopBridge.CallOpts) +func (_HopL1EthBridge *HopL1EthBridgeCallerSession) ChallengePeriod() (*big.Int, error) { + return _HopL1EthBridge.Contract.ChallengePeriod(&_HopL1EthBridge.CallOpts) } // ChallengeResolutionPeriod is a free data retrieval call binding the contract method 0x767631d5. // // Solidity: function challengeResolutionPeriod() view returns(uint256) -func (_HopBridge *HopBridgeCaller) ChallengeResolutionPeriod(opts *bind.CallOpts) (*big.Int, error) { +func (_HopL1EthBridge *HopL1EthBridgeCaller) ChallengeResolutionPeriod(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} - err := _HopBridge.contract.Call(opts, &out, "challengeResolutionPeriod") + err := _HopL1EthBridge.contract.Call(opts, &out, "challengeResolutionPeriod") if err != nil { return *new(*big.Int), err @@ -322,23 +331,23 @@ func (_HopBridge *HopBridgeCaller) ChallengeResolutionPeriod(opts *bind.CallOpts // ChallengeResolutionPeriod is a free data retrieval call binding the contract method 0x767631d5. // // Solidity: function challengeResolutionPeriod() view returns(uint256) -func (_HopBridge *HopBridgeSession) ChallengeResolutionPeriod() (*big.Int, error) { - return _HopBridge.Contract.ChallengeResolutionPeriod(&_HopBridge.CallOpts) +func (_HopL1EthBridge *HopL1EthBridgeSession) ChallengeResolutionPeriod() (*big.Int, error) { + return _HopL1EthBridge.Contract.ChallengeResolutionPeriod(&_HopL1EthBridge.CallOpts) } // ChallengeResolutionPeriod is a free data retrieval call binding the contract method 0x767631d5. // // Solidity: function challengeResolutionPeriod() view returns(uint256) -func (_HopBridge *HopBridgeCallerSession) ChallengeResolutionPeriod() (*big.Int, error) { - return _HopBridge.Contract.ChallengeResolutionPeriod(&_HopBridge.CallOpts) +func (_HopL1EthBridge *HopL1EthBridgeCallerSession) ChallengeResolutionPeriod() (*big.Int, error) { + return _HopL1EthBridge.Contract.ChallengeResolutionPeriod(&_HopL1EthBridge.CallOpts) } // CrossDomainMessengerWrappers is a free data retrieval call binding the contract method 0xa35962f3. // // Solidity: function crossDomainMessengerWrappers(uint256 ) view returns(address) -func (_HopBridge *HopBridgeCaller) CrossDomainMessengerWrappers(opts *bind.CallOpts, arg0 *big.Int) (common.Address, error) { +func (_HopL1EthBridge *HopL1EthBridgeCaller) CrossDomainMessengerWrappers(opts *bind.CallOpts, arg0 *big.Int) (common.Address, error) { var out []interface{} - err := _HopBridge.contract.Call(opts, &out, "crossDomainMessengerWrappers", arg0) + err := _HopL1EthBridge.contract.Call(opts, &out, "crossDomainMessengerWrappers", arg0) if err != nil { return *new(common.Address), err @@ -353,23 +362,23 @@ func (_HopBridge *HopBridgeCaller) CrossDomainMessengerWrappers(opts *bind.CallO // CrossDomainMessengerWrappers is a free data retrieval call binding the contract method 0xa35962f3. // // Solidity: function crossDomainMessengerWrappers(uint256 ) view returns(address) -func (_HopBridge *HopBridgeSession) CrossDomainMessengerWrappers(arg0 *big.Int) (common.Address, error) { - return _HopBridge.Contract.CrossDomainMessengerWrappers(&_HopBridge.CallOpts, arg0) +func (_HopL1EthBridge *HopL1EthBridgeSession) CrossDomainMessengerWrappers(arg0 *big.Int) (common.Address, error) { + return _HopL1EthBridge.Contract.CrossDomainMessengerWrappers(&_HopL1EthBridge.CallOpts, arg0) } // CrossDomainMessengerWrappers is a free data retrieval call binding the contract method 0xa35962f3. // // Solidity: function crossDomainMessengerWrappers(uint256 ) view returns(address) -func (_HopBridge *HopBridgeCallerSession) CrossDomainMessengerWrappers(arg0 *big.Int) (common.Address, error) { - return _HopBridge.Contract.CrossDomainMessengerWrappers(&_HopBridge.CallOpts, arg0) +func (_HopL1EthBridge *HopL1EthBridgeCallerSession) CrossDomainMessengerWrappers(arg0 *big.Int) (common.Address, error) { + return _HopL1EthBridge.Contract.CrossDomainMessengerWrappers(&_HopL1EthBridge.CallOpts, arg0) } // GetBondForTransferAmount is a free data retrieval call binding the contract method 0xe19be150. // // Solidity: function getBondForTransferAmount(uint256 amount) pure returns(uint256) -func (_HopBridge *HopBridgeCaller) GetBondForTransferAmount(opts *bind.CallOpts, amount *big.Int) (*big.Int, error) { +func (_HopL1EthBridge *HopL1EthBridgeCaller) GetBondForTransferAmount(opts *bind.CallOpts, amount *big.Int) (*big.Int, error) { var out []interface{} - err := _HopBridge.contract.Call(opts, &out, "getBondForTransferAmount", amount) + err := _HopL1EthBridge.contract.Call(opts, &out, "getBondForTransferAmount", amount) if err != nil { return *new(*big.Int), err @@ -384,23 +393,23 @@ func (_HopBridge *HopBridgeCaller) GetBondForTransferAmount(opts *bind.CallOpts, // GetBondForTransferAmount is a free data retrieval call binding the contract method 0xe19be150. // // Solidity: function getBondForTransferAmount(uint256 amount) pure returns(uint256) -func (_HopBridge *HopBridgeSession) GetBondForTransferAmount(amount *big.Int) (*big.Int, error) { - return _HopBridge.Contract.GetBondForTransferAmount(&_HopBridge.CallOpts, amount) +func (_HopL1EthBridge *HopL1EthBridgeSession) GetBondForTransferAmount(amount *big.Int) (*big.Int, error) { + return _HopL1EthBridge.Contract.GetBondForTransferAmount(&_HopL1EthBridge.CallOpts, amount) } // GetBondForTransferAmount is a free data retrieval call binding the contract method 0xe19be150. // // Solidity: function getBondForTransferAmount(uint256 amount) pure returns(uint256) -func (_HopBridge *HopBridgeCallerSession) GetBondForTransferAmount(amount *big.Int) (*big.Int, error) { - return _HopBridge.Contract.GetBondForTransferAmount(&_HopBridge.CallOpts, amount) +func (_HopL1EthBridge *HopL1EthBridgeCallerSession) GetBondForTransferAmount(amount *big.Int) (*big.Int, error) { + return _HopL1EthBridge.Contract.GetBondForTransferAmount(&_HopL1EthBridge.CallOpts, amount) } // GetBondedWithdrawalAmount is a free data retrieval call binding the contract method 0x302830ab. // // Solidity: function getBondedWithdrawalAmount(address bonder, bytes32 transferId) view returns(uint256) -func (_HopBridge *HopBridgeCaller) GetBondedWithdrawalAmount(opts *bind.CallOpts, bonder common.Address, transferId [32]byte) (*big.Int, error) { +func (_HopL1EthBridge *HopL1EthBridgeCaller) GetBondedWithdrawalAmount(opts *bind.CallOpts, bonder common.Address, transferId [32]byte) (*big.Int, error) { var out []interface{} - err := _HopBridge.contract.Call(opts, &out, "getBondedWithdrawalAmount", bonder, transferId) + err := _HopL1EthBridge.contract.Call(opts, &out, "getBondedWithdrawalAmount", bonder, transferId) if err != nil { return *new(*big.Int), err @@ -415,23 +424,23 @@ func (_HopBridge *HopBridgeCaller) GetBondedWithdrawalAmount(opts *bind.CallOpts // GetBondedWithdrawalAmount is a free data retrieval call binding the contract method 0x302830ab. // // Solidity: function getBondedWithdrawalAmount(address bonder, bytes32 transferId) view returns(uint256) -func (_HopBridge *HopBridgeSession) GetBondedWithdrawalAmount(bonder common.Address, transferId [32]byte) (*big.Int, error) { - return _HopBridge.Contract.GetBondedWithdrawalAmount(&_HopBridge.CallOpts, bonder, transferId) +func (_HopL1EthBridge *HopL1EthBridgeSession) GetBondedWithdrawalAmount(bonder common.Address, transferId [32]byte) (*big.Int, error) { + return _HopL1EthBridge.Contract.GetBondedWithdrawalAmount(&_HopL1EthBridge.CallOpts, bonder, transferId) } // GetBondedWithdrawalAmount is a free data retrieval call binding the contract method 0x302830ab. // // Solidity: function getBondedWithdrawalAmount(address bonder, bytes32 transferId) view returns(uint256) -func (_HopBridge *HopBridgeCallerSession) GetBondedWithdrawalAmount(bonder common.Address, transferId [32]byte) (*big.Int, error) { - return _HopBridge.Contract.GetBondedWithdrawalAmount(&_HopBridge.CallOpts, bonder, transferId) +func (_HopL1EthBridge *HopL1EthBridgeCallerSession) GetBondedWithdrawalAmount(bonder common.Address, transferId [32]byte) (*big.Int, error) { + return _HopL1EthBridge.Contract.GetBondedWithdrawalAmount(&_HopL1EthBridge.CallOpts, bonder, transferId) } // GetChainId is a free data retrieval call binding the contract method 0x3408e470. // // Solidity: function getChainId() view returns(uint256 chainId) -func (_HopBridge *HopBridgeCaller) GetChainId(opts *bind.CallOpts) (*big.Int, error) { +func (_HopL1EthBridge *HopL1EthBridgeCaller) GetChainId(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} - err := _HopBridge.contract.Call(opts, &out, "getChainId") + err := _HopL1EthBridge.contract.Call(opts, &out, "getChainId") if err != nil { return *new(*big.Int), err @@ -446,23 +455,23 @@ func (_HopBridge *HopBridgeCaller) GetChainId(opts *bind.CallOpts) (*big.Int, er // GetChainId is a free data retrieval call binding the contract method 0x3408e470. // // Solidity: function getChainId() view returns(uint256 chainId) -func (_HopBridge *HopBridgeSession) GetChainId() (*big.Int, error) { - return _HopBridge.Contract.GetChainId(&_HopBridge.CallOpts) +func (_HopL1EthBridge *HopL1EthBridgeSession) GetChainId() (*big.Int, error) { + return _HopL1EthBridge.Contract.GetChainId(&_HopL1EthBridge.CallOpts) } // GetChainId is a free data retrieval call binding the contract method 0x3408e470. // // Solidity: function getChainId() view returns(uint256 chainId) -func (_HopBridge *HopBridgeCallerSession) GetChainId() (*big.Int, error) { - return _HopBridge.Contract.GetChainId(&_HopBridge.CallOpts) +func (_HopL1EthBridge *HopL1EthBridgeCallerSession) GetChainId() (*big.Int, error) { + return _HopL1EthBridge.Contract.GetChainId(&_HopL1EthBridge.CallOpts) } // GetChallengeAmountForTransferAmount is a free data retrieval call binding the contract method 0xa239f5ee. // // Solidity: function getChallengeAmountForTransferAmount(uint256 amount) pure returns(uint256) -func (_HopBridge *HopBridgeCaller) GetChallengeAmountForTransferAmount(opts *bind.CallOpts, amount *big.Int) (*big.Int, error) { +func (_HopL1EthBridge *HopL1EthBridgeCaller) GetChallengeAmountForTransferAmount(opts *bind.CallOpts, amount *big.Int) (*big.Int, error) { var out []interface{} - err := _HopBridge.contract.Call(opts, &out, "getChallengeAmountForTransferAmount", amount) + err := _HopL1EthBridge.contract.Call(opts, &out, "getChallengeAmountForTransferAmount", amount) if err != nil { return *new(*big.Int), err @@ -477,23 +486,23 @@ func (_HopBridge *HopBridgeCaller) GetChallengeAmountForTransferAmount(opts *bin // GetChallengeAmountForTransferAmount is a free data retrieval call binding the contract method 0xa239f5ee. // // Solidity: function getChallengeAmountForTransferAmount(uint256 amount) pure returns(uint256) -func (_HopBridge *HopBridgeSession) GetChallengeAmountForTransferAmount(amount *big.Int) (*big.Int, error) { - return _HopBridge.Contract.GetChallengeAmountForTransferAmount(&_HopBridge.CallOpts, amount) +func (_HopL1EthBridge *HopL1EthBridgeSession) GetChallengeAmountForTransferAmount(amount *big.Int) (*big.Int, error) { + return _HopL1EthBridge.Contract.GetChallengeAmountForTransferAmount(&_HopL1EthBridge.CallOpts, amount) } // GetChallengeAmountForTransferAmount is a free data retrieval call binding the contract method 0xa239f5ee. // // Solidity: function getChallengeAmountForTransferAmount(uint256 amount) pure returns(uint256) -func (_HopBridge *HopBridgeCallerSession) GetChallengeAmountForTransferAmount(amount *big.Int) (*big.Int, error) { - return _HopBridge.Contract.GetChallengeAmountForTransferAmount(&_HopBridge.CallOpts, amount) +func (_HopL1EthBridge *HopL1EthBridgeCallerSession) GetChallengeAmountForTransferAmount(amount *big.Int) (*big.Int, error) { + return _HopL1EthBridge.Contract.GetChallengeAmountForTransferAmount(&_HopL1EthBridge.CallOpts, amount) } // GetCredit is a free data retrieval call binding the contract method 0x57344e6f. // // Solidity: function getCredit(address bonder) view returns(uint256) -func (_HopBridge *HopBridgeCaller) GetCredit(opts *bind.CallOpts, bonder common.Address) (*big.Int, error) { +func (_HopL1EthBridge *HopL1EthBridgeCaller) GetCredit(opts *bind.CallOpts, bonder common.Address) (*big.Int, error) { var out []interface{} - err := _HopBridge.contract.Call(opts, &out, "getCredit", bonder) + err := _HopL1EthBridge.contract.Call(opts, &out, "getCredit", bonder) if err != nil { return *new(*big.Int), err @@ -508,23 +517,23 @@ func (_HopBridge *HopBridgeCaller) GetCredit(opts *bind.CallOpts, bonder common. // GetCredit is a free data retrieval call binding the contract method 0x57344e6f. // // Solidity: function getCredit(address bonder) view returns(uint256) -func (_HopBridge *HopBridgeSession) GetCredit(bonder common.Address) (*big.Int, error) { - return _HopBridge.Contract.GetCredit(&_HopBridge.CallOpts, bonder) +func (_HopL1EthBridge *HopL1EthBridgeSession) GetCredit(bonder common.Address) (*big.Int, error) { + return _HopL1EthBridge.Contract.GetCredit(&_HopL1EthBridge.CallOpts, bonder) } // GetCredit is a free data retrieval call binding the contract method 0x57344e6f. // // Solidity: function getCredit(address bonder) view returns(uint256) -func (_HopBridge *HopBridgeCallerSession) GetCredit(bonder common.Address) (*big.Int, error) { - return _HopBridge.Contract.GetCredit(&_HopBridge.CallOpts, bonder) +func (_HopL1EthBridge *HopL1EthBridgeCallerSession) GetCredit(bonder common.Address) (*big.Int, error) { + return _HopL1EthBridge.Contract.GetCredit(&_HopL1EthBridge.CallOpts, bonder) } // GetDebitAndAdditionalDebit is a free data retrieval call binding the contract method 0xffa9286c. // // Solidity: function getDebitAndAdditionalDebit(address bonder) view returns(uint256) -func (_HopBridge *HopBridgeCaller) GetDebitAndAdditionalDebit(opts *bind.CallOpts, bonder common.Address) (*big.Int, error) { +func (_HopL1EthBridge *HopL1EthBridgeCaller) GetDebitAndAdditionalDebit(opts *bind.CallOpts, bonder common.Address) (*big.Int, error) { var out []interface{} - err := _HopBridge.contract.Call(opts, &out, "getDebitAndAdditionalDebit", bonder) + err := _HopL1EthBridge.contract.Call(opts, &out, "getDebitAndAdditionalDebit", bonder) if err != nil { return *new(*big.Int), err @@ -539,23 +548,23 @@ func (_HopBridge *HopBridgeCaller) GetDebitAndAdditionalDebit(opts *bind.CallOpt // GetDebitAndAdditionalDebit is a free data retrieval call binding the contract method 0xffa9286c. // // Solidity: function getDebitAndAdditionalDebit(address bonder) view returns(uint256) -func (_HopBridge *HopBridgeSession) GetDebitAndAdditionalDebit(bonder common.Address) (*big.Int, error) { - return _HopBridge.Contract.GetDebitAndAdditionalDebit(&_HopBridge.CallOpts, bonder) +func (_HopL1EthBridge *HopL1EthBridgeSession) GetDebitAndAdditionalDebit(bonder common.Address) (*big.Int, error) { + return _HopL1EthBridge.Contract.GetDebitAndAdditionalDebit(&_HopL1EthBridge.CallOpts, bonder) } // GetDebitAndAdditionalDebit is a free data retrieval call binding the contract method 0xffa9286c. // // Solidity: function getDebitAndAdditionalDebit(address bonder) view returns(uint256) -func (_HopBridge *HopBridgeCallerSession) GetDebitAndAdditionalDebit(bonder common.Address) (*big.Int, error) { - return _HopBridge.Contract.GetDebitAndAdditionalDebit(&_HopBridge.CallOpts, bonder) +func (_HopL1EthBridge *HopL1EthBridgeCallerSession) GetDebitAndAdditionalDebit(bonder common.Address) (*big.Int, error) { + return _HopL1EthBridge.Contract.GetDebitAndAdditionalDebit(&_HopL1EthBridge.CallOpts, bonder) } // GetIsBonder is a free data retrieval call binding the contract method 0xd5ef7551. // // Solidity: function getIsBonder(address maybeBonder) view returns(bool) -func (_HopBridge *HopBridgeCaller) GetIsBonder(opts *bind.CallOpts, maybeBonder common.Address) (bool, error) { +func (_HopL1EthBridge *HopL1EthBridgeCaller) GetIsBonder(opts *bind.CallOpts, maybeBonder common.Address) (bool, error) { var out []interface{} - err := _HopBridge.contract.Call(opts, &out, "getIsBonder", maybeBonder) + err := _HopL1EthBridge.contract.Call(opts, &out, "getIsBonder", maybeBonder) if err != nil { return *new(bool), err @@ -570,23 +579,23 @@ func (_HopBridge *HopBridgeCaller) GetIsBonder(opts *bind.CallOpts, maybeBonder // GetIsBonder is a free data retrieval call binding the contract method 0xd5ef7551. // // Solidity: function getIsBonder(address maybeBonder) view returns(bool) -func (_HopBridge *HopBridgeSession) GetIsBonder(maybeBonder common.Address) (bool, error) { - return _HopBridge.Contract.GetIsBonder(&_HopBridge.CallOpts, maybeBonder) +func (_HopL1EthBridge *HopL1EthBridgeSession) GetIsBonder(maybeBonder common.Address) (bool, error) { + return _HopL1EthBridge.Contract.GetIsBonder(&_HopL1EthBridge.CallOpts, maybeBonder) } // GetIsBonder is a free data retrieval call binding the contract method 0xd5ef7551. // // Solidity: function getIsBonder(address maybeBonder) view returns(bool) -func (_HopBridge *HopBridgeCallerSession) GetIsBonder(maybeBonder common.Address) (bool, error) { - return _HopBridge.Contract.GetIsBonder(&_HopBridge.CallOpts, maybeBonder) +func (_HopL1EthBridge *HopL1EthBridgeCallerSession) GetIsBonder(maybeBonder common.Address) (bool, error) { + return _HopL1EthBridge.Contract.GetIsBonder(&_HopL1EthBridge.CallOpts, maybeBonder) } // GetRawDebit is a free data retrieval call binding the contract method 0x13948c76. // // Solidity: function getRawDebit(address bonder) view returns(uint256) -func (_HopBridge *HopBridgeCaller) GetRawDebit(opts *bind.CallOpts, bonder common.Address) (*big.Int, error) { +func (_HopL1EthBridge *HopL1EthBridgeCaller) GetRawDebit(opts *bind.CallOpts, bonder common.Address) (*big.Int, error) { var out []interface{} - err := _HopBridge.contract.Call(opts, &out, "getRawDebit", bonder) + err := _HopL1EthBridge.contract.Call(opts, &out, "getRawDebit", bonder) if err != nil { return *new(*big.Int), err @@ -601,23 +610,23 @@ func (_HopBridge *HopBridgeCaller) GetRawDebit(opts *bind.CallOpts, bonder commo // GetRawDebit is a free data retrieval call binding the contract method 0x13948c76. // // Solidity: function getRawDebit(address bonder) view returns(uint256) -func (_HopBridge *HopBridgeSession) GetRawDebit(bonder common.Address) (*big.Int, error) { - return _HopBridge.Contract.GetRawDebit(&_HopBridge.CallOpts, bonder) +func (_HopL1EthBridge *HopL1EthBridgeSession) GetRawDebit(bonder common.Address) (*big.Int, error) { + return _HopL1EthBridge.Contract.GetRawDebit(&_HopL1EthBridge.CallOpts, bonder) } // GetRawDebit is a free data retrieval call binding the contract method 0x13948c76. // // Solidity: function getRawDebit(address bonder) view returns(uint256) -func (_HopBridge *HopBridgeCallerSession) GetRawDebit(bonder common.Address) (*big.Int, error) { - return _HopBridge.Contract.GetRawDebit(&_HopBridge.CallOpts, bonder) +func (_HopL1EthBridge *HopL1EthBridgeCallerSession) GetRawDebit(bonder common.Address) (*big.Int, error) { + return _HopL1EthBridge.Contract.GetRawDebit(&_HopL1EthBridge.CallOpts, bonder) } // GetTimeSlot is a free data retrieval call binding the contract method 0x2b85dcc9. // // Solidity: function getTimeSlot(uint256 time) pure returns(uint256) -func (_HopBridge *HopBridgeCaller) GetTimeSlot(opts *bind.CallOpts, time *big.Int) (*big.Int, error) { +func (_HopL1EthBridge *HopL1EthBridgeCaller) GetTimeSlot(opts *bind.CallOpts, time *big.Int) (*big.Int, error) { var out []interface{} - err := _HopBridge.contract.Call(opts, &out, "getTimeSlot", time) + err := _HopL1EthBridge.contract.Call(opts, &out, "getTimeSlot", time) if err != nil { return *new(*big.Int), err @@ -632,23 +641,23 @@ func (_HopBridge *HopBridgeCaller) GetTimeSlot(opts *bind.CallOpts, time *big.In // GetTimeSlot is a free data retrieval call binding the contract method 0x2b85dcc9. // // Solidity: function getTimeSlot(uint256 time) pure returns(uint256) -func (_HopBridge *HopBridgeSession) GetTimeSlot(time *big.Int) (*big.Int, error) { - return _HopBridge.Contract.GetTimeSlot(&_HopBridge.CallOpts, time) +func (_HopL1EthBridge *HopL1EthBridgeSession) GetTimeSlot(time *big.Int) (*big.Int, error) { + return _HopL1EthBridge.Contract.GetTimeSlot(&_HopL1EthBridge.CallOpts, time) } // GetTimeSlot is a free data retrieval call binding the contract method 0x2b85dcc9. // // Solidity: function getTimeSlot(uint256 time) pure returns(uint256) -func (_HopBridge *HopBridgeCallerSession) GetTimeSlot(time *big.Int) (*big.Int, error) { - return _HopBridge.Contract.GetTimeSlot(&_HopBridge.CallOpts, time) +func (_HopL1EthBridge *HopL1EthBridgeCallerSession) GetTimeSlot(time *big.Int) (*big.Int, error) { + return _HopL1EthBridge.Contract.GetTimeSlot(&_HopL1EthBridge.CallOpts, time) } // GetTransferId is a free data retrieval call binding the contract method 0xaf215f94. // // Solidity: function getTransferId(uint256 chainId, address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline) pure returns(bytes32) -func (_HopBridge *HopBridgeCaller) GetTransferId(opts *bind.CallOpts, chainId *big.Int, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) ([32]byte, error) { +func (_HopL1EthBridge *HopL1EthBridgeCaller) GetTransferId(opts *bind.CallOpts, chainId *big.Int, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) ([32]byte, error) { var out []interface{} - err := _HopBridge.contract.Call(opts, &out, "getTransferId", chainId, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline) + err := _HopL1EthBridge.contract.Call(opts, &out, "getTransferId", chainId, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline) if err != nil { return *new([32]byte), err @@ -663,23 +672,23 @@ func (_HopBridge *HopBridgeCaller) GetTransferId(opts *bind.CallOpts, chainId *b // GetTransferId is a free data retrieval call binding the contract method 0xaf215f94. // // Solidity: function getTransferId(uint256 chainId, address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline) pure returns(bytes32) -func (_HopBridge *HopBridgeSession) GetTransferId(chainId *big.Int, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) ([32]byte, error) { - return _HopBridge.Contract.GetTransferId(&_HopBridge.CallOpts, chainId, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline) +func (_HopL1EthBridge *HopL1EthBridgeSession) GetTransferId(chainId *big.Int, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) ([32]byte, error) { + return _HopL1EthBridge.Contract.GetTransferId(&_HopL1EthBridge.CallOpts, chainId, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline) } // GetTransferId is a free data retrieval call binding the contract method 0xaf215f94. // // Solidity: function getTransferId(uint256 chainId, address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline) pure returns(bytes32) -func (_HopBridge *HopBridgeCallerSession) GetTransferId(chainId *big.Int, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) ([32]byte, error) { - return _HopBridge.Contract.GetTransferId(&_HopBridge.CallOpts, chainId, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline) +func (_HopL1EthBridge *HopL1EthBridgeCallerSession) GetTransferId(chainId *big.Int, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) ([32]byte, error) { + return _HopL1EthBridge.Contract.GetTransferId(&_HopL1EthBridge.CallOpts, chainId, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline) } // GetTransferRoot is a free data retrieval call binding the contract method 0xce803b4f. // // Solidity: function getTransferRoot(bytes32 rootHash, uint256 totalAmount) view returns((uint256,uint256,uint256)) -func (_HopBridge *HopBridgeCaller) GetTransferRoot(opts *bind.CallOpts, rootHash [32]byte, totalAmount *big.Int) (BridgeTransferRoot, error) { +func (_HopL1EthBridge *HopL1EthBridgeCaller) GetTransferRoot(opts *bind.CallOpts, rootHash [32]byte, totalAmount *big.Int) (BridgeTransferRoot, error) { var out []interface{} - err := _HopBridge.contract.Call(opts, &out, "getTransferRoot", rootHash, totalAmount) + err := _HopL1EthBridge.contract.Call(opts, &out, "getTransferRoot", rootHash, totalAmount) if err != nil { return *new(BridgeTransferRoot), err @@ -694,23 +703,23 @@ func (_HopBridge *HopBridgeCaller) GetTransferRoot(opts *bind.CallOpts, rootHash // GetTransferRoot is a free data retrieval call binding the contract method 0xce803b4f. // // Solidity: function getTransferRoot(bytes32 rootHash, uint256 totalAmount) view returns((uint256,uint256,uint256)) -func (_HopBridge *HopBridgeSession) GetTransferRoot(rootHash [32]byte, totalAmount *big.Int) (BridgeTransferRoot, error) { - return _HopBridge.Contract.GetTransferRoot(&_HopBridge.CallOpts, rootHash, totalAmount) +func (_HopL1EthBridge *HopL1EthBridgeSession) GetTransferRoot(rootHash [32]byte, totalAmount *big.Int) (BridgeTransferRoot, error) { + return _HopL1EthBridge.Contract.GetTransferRoot(&_HopL1EthBridge.CallOpts, rootHash, totalAmount) } // GetTransferRoot is a free data retrieval call binding the contract method 0xce803b4f. // // Solidity: function getTransferRoot(bytes32 rootHash, uint256 totalAmount) view returns((uint256,uint256,uint256)) -func (_HopBridge *HopBridgeCallerSession) GetTransferRoot(rootHash [32]byte, totalAmount *big.Int) (BridgeTransferRoot, error) { - return _HopBridge.Contract.GetTransferRoot(&_HopBridge.CallOpts, rootHash, totalAmount) +func (_HopL1EthBridge *HopL1EthBridgeCallerSession) GetTransferRoot(rootHash [32]byte, totalAmount *big.Int) (BridgeTransferRoot, error) { + return _HopL1EthBridge.Contract.GetTransferRoot(&_HopL1EthBridge.CallOpts, rootHash, totalAmount) } // GetTransferRootId is a free data retrieval call binding the contract method 0x960a7afa. // // Solidity: function getTransferRootId(bytes32 rootHash, uint256 totalAmount) pure returns(bytes32) -func (_HopBridge *HopBridgeCaller) GetTransferRootId(opts *bind.CallOpts, rootHash [32]byte, totalAmount *big.Int) ([32]byte, error) { +func (_HopL1EthBridge *HopL1EthBridgeCaller) GetTransferRootId(opts *bind.CallOpts, rootHash [32]byte, totalAmount *big.Int) ([32]byte, error) { var out []interface{} - err := _HopBridge.contract.Call(opts, &out, "getTransferRootId", rootHash, totalAmount) + err := _HopL1EthBridge.contract.Call(opts, &out, "getTransferRootId", rootHash, totalAmount) if err != nil { return *new([32]byte), err @@ -725,23 +734,23 @@ func (_HopBridge *HopBridgeCaller) GetTransferRootId(opts *bind.CallOpts, rootHa // GetTransferRootId is a free data retrieval call binding the contract method 0x960a7afa. // // Solidity: function getTransferRootId(bytes32 rootHash, uint256 totalAmount) pure returns(bytes32) -func (_HopBridge *HopBridgeSession) GetTransferRootId(rootHash [32]byte, totalAmount *big.Int) ([32]byte, error) { - return _HopBridge.Contract.GetTransferRootId(&_HopBridge.CallOpts, rootHash, totalAmount) +func (_HopL1EthBridge *HopL1EthBridgeSession) GetTransferRootId(rootHash [32]byte, totalAmount *big.Int) ([32]byte, error) { + return _HopL1EthBridge.Contract.GetTransferRootId(&_HopL1EthBridge.CallOpts, rootHash, totalAmount) } // GetTransferRootId is a free data retrieval call binding the contract method 0x960a7afa. // // Solidity: function getTransferRootId(bytes32 rootHash, uint256 totalAmount) pure returns(bytes32) -func (_HopBridge *HopBridgeCallerSession) GetTransferRootId(rootHash [32]byte, totalAmount *big.Int) ([32]byte, error) { - return _HopBridge.Contract.GetTransferRootId(&_HopBridge.CallOpts, rootHash, totalAmount) +func (_HopL1EthBridge *HopL1EthBridgeCallerSession) GetTransferRootId(rootHash [32]byte, totalAmount *big.Int) ([32]byte, error) { + return _HopL1EthBridge.Contract.GetTransferRootId(&_HopL1EthBridge.CallOpts, rootHash, totalAmount) } // Governance is a free data retrieval call binding the contract method 0x5aa6e675. // // Solidity: function governance() view returns(address) -func (_HopBridge *HopBridgeCaller) Governance(opts *bind.CallOpts) (common.Address, error) { +func (_HopL1EthBridge *HopL1EthBridgeCaller) Governance(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _HopBridge.contract.Call(opts, &out, "governance") + err := _HopL1EthBridge.contract.Call(opts, &out, "governance") if err != nil { return *new(common.Address), err @@ -756,23 +765,23 @@ func (_HopBridge *HopBridgeCaller) Governance(opts *bind.CallOpts) (common.Addre // Governance is a free data retrieval call binding the contract method 0x5aa6e675. // // Solidity: function governance() view returns(address) -func (_HopBridge *HopBridgeSession) Governance() (common.Address, error) { - return _HopBridge.Contract.Governance(&_HopBridge.CallOpts) +func (_HopL1EthBridge *HopL1EthBridgeSession) Governance() (common.Address, error) { + return _HopL1EthBridge.Contract.Governance(&_HopL1EthBridge.CallOpts) } // Governance is a free data retrieval call binding the contract method 0x5aa6e675. // // Solidity: function governance() view returns(address) -func (_HopBridge *HopBridgeCallerSession) Governance() (common.Address, error) { - return _HopBridge.Contract.Governance(&_HopBridge.CallOpts) +func (_HopL1EthBridge *HopL1EthBridgeCallerSession) Governance() (common.Address, error) { + return _HopL1EthBridge.Contract.Governance(&_HopL1EthBridge.CallOpts) } // IsChainIdPaused is a free data retrieval call binding the contract method 0xfa2a69a3. // // Solidity: function isChainIdPaused(uint256 ) view returns(bool) -func (_HopBridge *HopBridgeCaller) IsChainIdPaused(opts *bind.CallOpts, arg0 *big.Int) (bool, error) { +func (_HopL1EthBridge *HopL1EthBridgeCaller) IsChainIdPaused(opts *bind.CallOpts, arg0 *big.Int) (bool, error) { var out []interface{} - err := _HopBridge.contract.Call(opts, &out, "isChainIdPaused", arg0) + err := _HopL1EthBridge.contract.Call(opts, &out, "isChainIdPaused", arg0) if err != nil { return *new(bool), err @@ -787,23 +796,23 @@ func (_HopBridge *HopBridgeCaller) IsChainIdPaused(opts *bind.CallOpts, arg0 *bi // IsChainIdPaused is a free data retrieval call binding the contract method 0xfa2a69a3. // // Solidity: function isChainIdPaused(uint256 ) view returns(bool) -func (_HopBridge *HopBridgeSession) IsChainIdPaused(arg0 *big.Int) (bool, error) { - return _HopBridge.Contract.IsChainIdPaused(&_HopBridge.CallOpts, arg0) +func (_HopL1EthBridge *HopL1EthBridgeSession) IsChainIdPaused(arg0 *big.Int) (bool, error) { + return _HopL1EthBridge.Contract.IsChainIdPaused(&_HopL1EthBridge.CallOpts, arg0) } // IsChainIdPaused is a free data retrieval call binding the contract method 0xfa2a69a3. // // Solidity: function isChainIdPaused(uint256 ) view returns(bool) -func (_HopBridge *HopBridgeCallerSession) IsChainIdPaused(arg0 *big.Int) (bool, error) { - return _HopBridge.Contract.IsChainIdPaused(&_HopBridge.CallOpts, arg0) +func (_HopL1EthBridge *HopL1EthBridgeCallerSession) IsChainIdPaused(arg0 *big.Int) (bool, error) { + return _HopL1EthBridge.Contract.IsChainIdPaused(&_HopL1EthBridge.CallOpts, arg0) } // IsTransferIdSpent is a free data retrieval call binding the contract method 0x3a7af631. // // Solidity: function isTransferIdSpent(bytes32 transferId) view returns(bool) -func (_HopBridge *HopBridgeCaller) IsTransferIdSpent(opts *bind.CallOpts, transferId [32]byte) (bool, error) { +func (_HopL1EthBridge *HopL1EthBridgeCaller) IsTransferIdSpent(opts *bind.CallOpts, transferId [32]byte) (bool, error) { var out []interface{} - err := _HopBridge.contract.Call(opts, &out, "isTransferIdSpent", transferId) + err := _HopL1EthBridge.contract.Call(opts, &out, "isTransferIdSpent", transferId) if err != nil { return *new(bool), err @@ -818,54 +827,23 @@ func (_HopBridge *HopBridgeCaller) IsTransferIdSpent(opts *bind.CallOpts, transf // IsTransferIdSpent is a free data retrieval call binding the contract method 0x3a7af631. // // Solidity: function isTransferIdSpent(bytes32 transferId) view returns(bool) -func (_HopBridge *HopBridgeSession) IsTransferIdSpent(transferId [32]byte) (bool, error) { - return _HopBridge.Contract.IsTransferIdSpent(&_HopBridge.CallOpts, transferId) +func (_HopL1EthBridge *HopL1EthBridgeSession) IsTransferIdSpent(transferId [32]byte) (bool, error) { + return _HopL1EthBridge.Contract.IsTransferIdSpent(&_HopL1EthBridge.CallOpts, transferId) } // IsTransferIdSpent is a free data retrieval call binding the contract method 0x3a7af631. // // Solidity: function isTransferIdSpent(bytes32 transferId) view returns(bool) -func (_HopBridge *HopBridgeCallerSession) IsTransferIdSpent(transferId [32]byte) (bool, error) { - return _HopBridge.Contract.IsTransferIdSpent(&_HopBridge.CallOpts, transferId) -} - -// L1CanonicalToken is a free data retrieval call binding the contract method 0xb7a0bda6. -// -// Solidity: function l1CanonicalToken() view returns(address) -func (_HopBridge *HopBridgeCaller) L1CanonicalToken(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _HopBridge.contract.Call(opts, &out, "l1CanonicalToken") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// L1CanonicalToken is a free data retrieval call binding the contract method 0xb7a0bda6. -// -// Solidity: function l1CanonicalToken() view returns(address) -func (_HopBridge *HopBridgeSession) L1CanonicalToken() (common.Address, error) { - return _HopBridge.Contract.L1CanonicalToken(&_HopBridge.CallOpts) -} - -// L1CanonicalToken is a free data retrieval call binding the contract method 0xb7a0bda6. -// -// Solidity: function l1CanonicalToken() view returns(address) -func (_HopBridge *HopBridgeCallerSession) L1CanonicalToken() (common.Address, error) { - return _HopBridge.Contract.L1CanonicalToken(&_HopBridge.CallOpts) +func (_HopL1EthBridge *HopL1EthBridgeCallerSession) IsTransferIdSpent(transferId [32]byte) (bool, error) { + return _HopL1EthBridge.Contract.IsTransferIdSpent(&_HopL1EthBridge.CallOpts, transferId) } // MinTransferRootBondDelay is a free data retrieval call binding the contract method 0x6cff06a7. // // Solidity: function minTransferRootBondDelay() view returns(uint256) -func (_HopBridge *HopBridgeCaller) MinTransferRootBondDelay(opts *bind.CallOpts) (*big.Int, error) { +func (_HopL1EthBridge *HopL1EthBridgeCaller) MinTransferRootBondDelay(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} - err := _HopBridge.contract.Call(opts, &out, "minTransferRootBondDelay") + err := _HopL1EthBridge.contract.Call(opts, &out, "minTransferRootBondDelay") if err != nil { return *new(*big.Int), err @@ -880,23 +858,23 @@ func (_HopBridge *HopBridgeCaller) MinTransferRootBondDelay(opts *bind.CallOpts) // MinTransferRootBondDelay is a free data retrieval call binding the contract method 0x6cff06a7. // // Solidity: function minTransferRootBondDelay() view returns(uint256) -func (_HopBridge *HopBridgeSession) MinTransferRootBondDelay() (*big.Int, error) { - return _HopBridge.Contract.MinTransferRootBondDelay(&_HopBridge.CallOpts) +func (_HopL1EthBridge *HopL1EthBridgeSession) MinTransferRootBondDelay() (*big.Int, error) { + return _HopL1EthBridge.Contract.MinTransferRootBondDelay(&_HopL1EthBridge.CallOpts) } // MinTransferRootBondDelay is a free data retrieval call binding the contract method 0x6cff06a7. // // Solidity: function minTransferRootBondDelay() view returns(uint256) -func (_HopBridge *HopBridgeCallerSession) MinTransferRootBondDelay() (*big.Int, error) { - return _HopBridge.Contract.MinTransferRootBondDelay(&_HopBridge.CallOpts) +func (_HopL1EthBridge *HopL1EthBridgeCallerSession) MinTransferRootBondDelay() (*big.Int, error) { + return _HopL1EthBridge.Contract.MinTransferRootBondDelay(&_HopL1EthBridge.CallOpts) } // TimeSlotToAmountBonded is a free data retrieval call binding the contract method 0x7398d282. // // Solidity: function timeSlotToAmountBonded(uint256 , address ) view returns(uint256) -func (_HopBridge *HopBridgeCaller) TimeSlotToAmountBonded(opts *bind.CallOpts, arg0 *big.Int, arg1 common.Address) (*big.Int, error) { +func (_HopL1EthBridge *HopL1EthBridgeCaller) TimeSlotToAmountBonded(opts *bind.CallOpts, arg0 *big.Int, arg1 common.Address) (*big.Int, error) { var out []interface{} - err := _HopBridge.contract.Call(opts, &out, "timeSlotToAmountBonded", arg0, arg1) + err := _HopL1EthBridge.contract.Call(opts, &out, "timeSlotToAmountBonded", arg0, arg1) if err != nil { return *new(*big.Int), err @@ -911,21 +889,21 @@ func (_HopBridge *HopBridgeCaller) TimeSlotToAmountBonded(opts *bind.CallOpts, a // TimeSlotToAmountBonded is a free data retrieval call binding the contract method 0x7398d282. // // Solidity: function timeSlotToAmountBonded(uint256 , address ) view returns(uint256) -func (_HopBridge *HopBridgeSession) TimeSlotToAmountBonded(arg0 *big.Int, arg1 common.Address) (*big.Int, error) { - return _HopBridge.Contract.TimeSlotToAmountBonded(&_HopBridge.CallOpts, arg0, arg1) +func (_HopL1EthBridge *HopL1EthBridgeSession) TimeSlotToAmountBonded(arg0 *big.Int, arg1 common.Address) (*big.Int, error) { + return _HopL1EthBridge.Contract.TimeSlotToAmountBonded(&_HopL1EthBridge.CallOpts, arg0, arg1) } // TimeSlotToAmountBonded is a free data retrieval call binding the contract method 0x7398d282. // // Solidity: function timeSlotToAmountBonded(uint256 , address ) view returns(uint256) -func (_HopBridge *HopBridgeCallerSession) TimeSlotToAmountBonded(arg0 *big.Int, arg1 common.Address) (*big.Int, error) { - return _HopBridge.Contract.TimeSlotToAmountBonded(&_HopBridge.CallOpts, arg0, arg1) +func (_HopL1EthBridge *HopL1EthBridgeCallerSession) TimeSlotToAmountBonded(arg0 *big.Int, arg1 common.Address) (*big.Int, error) { + return _HopL1EthBridge.Contract.TimeSlotToAmountBonded(&_HopL1EthBridge.CallOpts, arg0, arg1) } // TransferBonds is a free data retrieval call binding the contract method 0x5a7e1083. // // Solidity: function transferBonds(bytes32 ) view returns(address bonder, uint256 createdAt, uint256 totalAmount, uint256 challengeStartTime, address challenger, bool challengeResolved) -func (_HopBridge *HopBridgeCaller) TransferBonds(opts *bind.CallOpts, arg0 [32]byte) (struct { +func (_HopL1EthBridge *HopL1EthBridgeCaller) TransferBonds(opts *bind.CallOpts, arg0 [32]byte) (struct { Bonder common.Address CreatedAt *big.Int TotalAmount *big.Int @@ -934,7 +912,7 @@ func (_HopBridge *HopBridgeCaller) TransferBonds(opts *bind.CallOpts, arg0 [32]b ChallengeResolved bool }, error) { var out []interface{} - err := _HopBridge.contract.Call(opts, &out, "transferBonds", arg0) + err := _HopL1EthBridge.contract.Call(opts, &out, "transferBonds", arg0) outstruct := new(struct { Bonder common.Address @@ -962,7 +940,7 @@ func (_HopBridge *HopBridgeCaller) TransferBonds(opts *bind.CallOpts, arg0 [32]b // TransferBonds is a free data retrieval call binding the contract method 0x5a7e1083. // // Solidity: function transferBonds(bytes32 ) view returns(address bonder, uint256 createdAt, uint256 totalAmount, uint256 challengeStartTime, address challenger, bool challengeResolved) -func (_HopBridge *HopBridgeSession) TransferBonds(arg0 [32]byte) (struct { +func (_HopL1EthBridge *HopL1EthBridgeSession) TransferBonds(arg0 [32]byte) (struct { Bonder common.Address CreatedAt *big.Int TotalAmount *big.Int @@ -970,13 +948,13 @@ func (_HopBridge *HopBridgeSession) TransferBonds(arg0 [32]byte) (struct { Challenger common.Address ChallengeResolved bool }, error) { - return _HopBridge.Contract.TransferBonds(&_HopBridge.CallOpts, arg0) + return _HopL1EthBridge.Contract.TransferBonds(&_HopL1EthBridge.CallOpts, arg0) } // TransferBonds is a free data retrieval call binding the contract method 0x5a7e1083. // // Solidity: function transferBonds(bytes32 ) view returns(address bonder, uint256 createdAt, uint256 totalAmount, uint256 challengeStartTime, address challenger, bool challengeResolved) -func (_HopBridge *HopBridgeCallerSession) TransferBonds(arg0 [32]byte) (struct { +func (_HopL1EthBridge *HopL1EthBridgeCallerSession) TransferBonds(arg0 [32]byte) (struct { Bonder common.Address CreatedAt *big.Int TotalAmount *big.Int @@ -984,15 +962,15 @@ func (_HopBridge *HopBridgeCallerSession) TransferBonds(arg0 [32]byte) (struct { Challenger common.Address ChallengeResolved bool }, error) { - return _HopBridge.Contract.TransferBonds(&_HopBridge.CallOpts, arg0) + return _HopL1EthBridge.Contract.TransferBonds(&_HopL1EthBridge.CallOpts, arg0) } -// TransferRootCommittedAt is a free data retrieval call binding the contract method 0x4612f40c. +// TransferRootCommittedAt is a free data retrieval call binding the contract method 0x3b8fea28. // -// Solidity: function transferRootCommittedAt(bytes32 ) view returns(uint256) -func (_HopBridge *HopBridgeCaller) TransferRootCommittedAt(opts *bind.CallOpts, arg0 [32]byte) (*big.Int, error) { +// Solidity: function transferRootCommittedAt(uint256 , bytes32 ) view returns(uint256) +func (_HopL1EthBridge *HopL1EthBridgeCaller) TransferRootCommittedAt(opts *bind.CallOpts, arg0 *big.Int, arg1 [32]byte) (*big.Int, error) { var out []interface{} - err := _HopBridge.contract.Call(opts, &out, "transferRootCommittedAt", arg0) + err := _HopL1EthBridge.contract.Call(opts, &out, "transferRootCommittedAt", arg0, arg1) if err != nil { return *new(*big.Int), err @@ -1004,443 +982,443 @@ func (_HopBridge *HopBridgeCaller) TransferRootCommittedAt(opts *bind.CallOpts, } -// TransferRootCommittedAt is a free data retrieval call binding the contract method 0x4612f40c. +// TransferRootCommittedAt is a free data retrieval call binding the contract method 0x3b8fea28. // -// Solidity: function transferRootCommittedAt(bytes32 ) view returns(uint256) -func (_HopBridge *HopBridgeSession) TransferRootCommittedAt(arg0 [32]byte) (*big.Int, error) { - return _HopBridge.Contract.TransferRootCommittedAt(&_HopBridge.CallOpts, arg0) +// Solidity: function transferRootCommittedAt(uint256 , bytes32 ) view returns(uint256) +func (_HopL1EthBridge *HopL1EthBridgeSession) TransferRootCommittedAt(arg0 *big.Int, arg1 [32]byte) (*big.Int, error) { + return _HopL1EthBridge.Contract.TransferRootCommittedAt(&_HopL1EthBridge.CallOpts, arg0, arg1) } -// TransferRootCommittedAt is a free data retrieval call binding the contract method 0x4612f40c. +// TransferRootCommittedAt is a free data retrieval call binding the contract method 0x3b8fea28. // -// Solidity: function transferRootCommittedAt(bytes32 ) view returns(uint256) -func (_HopBridge *HopBridgeCallerSession) TransferRootCommittedAt(arg0 [32]byte) (*big.Int, error) { - return _HopBridge.Contract.TransferRootCommittedAt(&_HopBridge.CallOpts, arg0) +// Solidity: function transferRootCommittedAt(uint256 , bytes32 ) view returns(uint256) +func (_HopL1EthBridge *HopL1EthBridgeCallerSession) TransferRootCommittedAt(arg0 *big.Int, arg1 [32]byte) (*big.Int, error) { + return _HopL1EthBridge.Contract.TransferRootCommittedAt(&_HopL1EthBridge.CallOpts, arg0, arg1) } // AddBonder is a paid mutator transaction binding the contract method 0x5325937f. // // Solidity: function addBonder(address bonder) returns() -func (_HopBridge *HopBridgeTransactor) AddBonder(opts *bind.TransactOpts, bonder common.Address) (*types.Transaction, error) { - return _HopBridge.contract.Transact(opts, "addBonder", bonder) +func (_HopL1EthBridge *HopL1EthBridgeTransactor) AddBonder(opts *bind.TransactOpts, bonder common.Address) (*types.Transaction, error) { + return _HopL1EthBridge.contract.Transact(opts, "addBonder", bonder) } // AddBonder is a paid mutator transaction binding the contract method 0x5325937f. // // Solidity: function addBonder(address bonder) returns() -func (_HopBridge *HopBridgeSession) AddBonder(bonder common.Address) (*types.Transaction, error) { - return _HopBridge.Contract.AddBonder(&_HopBridge.TransactOpts, bonder) +func (_HopL1EthBridge *HopL1EthBridgeSession) AddBonder(bonder common.Address) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.AddBonder(&_HopL1EthBridge.TransactOpts, bonder) } // AddBonder is a paid mutator transaction binding the contract method 0x5325937f. // // Solidity: function addBonder(address bonder) returns() -func (_HopBridge *HopBridgeTransactorSession) AddBonder(bonder common.Address) (*types.Transaction, error) { - return _HopBridge.Contract.AddBonder(&_HopBridge.TransactOpts, bonder) +func (_HopL1EthBridge *HopL1EthBridgeTransactorSession) AddBonder(bonder common.Address) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.AddBonder(&_HopL1EthBridge.TransactOpts, bonder) } // BondTransferRoot is a paid mutator transaction binding the contract method 0x8d8798bf. // // Solidity: function bondTransferRoot(bytes32 rootHash, uint256 destinationChainId, uint256 totalAmount) returns() -func (_HopBridge *HopBridgeTransactor) BondTransferRoot(opts *bind.TransactOpts, rootHash [32]byte, destinationChainId *big.Int, totalAmount *big.Int) (*types.Transaction, error) { - return _HopBridge.contract.Transact(opts, "bondTransferRoot", rootHash, destinationChainId, totalAmount) +func (_HopL1EthBridge *HopL1EthBridgeTransactor) BondTransferRoot(opts *bind.TransactOpts, rootHash [32]byte, destinationChainId *big.Int, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.contract.Transact(opts, "bondTransferRoot", rootHash, destinationChainId, totalAmount) } // BondTransferRoot is a paid mutator transaction binding the contract method 0x8d8798bf. // // Solidity: function bondTransferRoot(bytes32 rootHash, uint256 destinationChainId, uint256 totalAmount) returns() -func (_HopBridge *HopBridgeSession) BondTransferRoot(rootHash [32]byte, destinationChainId *big.Int, totalAmount *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.BondTransferRoot(&_HopBridge.TransactOpts, rootHash, destinationChainId, totalAmount) +func (_HopL1EthBridge *HopL1EthBridgeSession) BondTransferRoot(rootHash [32]byte, destinationChainId *big.Int, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.BondTransferRoot(&_HopL1EthBridge.TransactOpts, rootHash, destinationChainId, totalAmount) } // BondTransferRoot is a paid mutator transaction binding the contract method 0x8d8798bf. // // Solidity: function bondTransferRoot(bytes32 rootHash, uint256 destinationChainId, uint256 totalAmount) returns() -func (_HopBridge *HopBridgeTransactorSession) BondTransferRoot(rootHash [32]byte, destinationChainId *big.Int, totalAmount *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.BondTransferRoot(&_HopBridge.TransactOpts, rootHash, destinationChainId, totalAmount) +func (_HopL1EthBridge *HopL1EthBridgeTransactorSession) BondTransferRoot(rootHash [32]byte, destinationChainId *big.Int, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.BondTransferRoot(&_HopL1EthBridge.TransactOpts, rootHash, destinationChainId, totalAmount) } // BondWithdrawal is a paid mutator transaction binding the contract method 0x23c452cd. // // Solidity: function bondWithdrawal(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee) returns() -func (_HopBridge *HopBridgeTransactor) BondWithdrawal(opts *bind.TransactOpts, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int) (*types.Transaction, error) { - return _HopBridge.contract.Transact(opts, "bondWithdrawal", recipient, amount, transferNonce, bonderFee) +func (_HopL1EthBridge *HopL1EthBridgeTransactor) BondWithdrawal(opts *bind.TransactOpts, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.contract.Transact(opts, "bondWithdrawal", recipient, amount, transferNonce, bonderFee) } // BondWithdrawal is a paid mutator transaction binding the contract method 0x23c452cd. // // Solidity: function bondWithdrawal(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee) returns() -func (_HopBridge *HopBridgeSession) BondWithdrawal(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.BondWithdrawal(&_HopBridge.TransactOpts, recipient, amount, transferNonce, bonderFee) +func (_HopL1EthBridge *HopL1EthBridgeSession) BondWithdrawal(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.BondWithdrawal(&_HopL1EthBridge.TransactOpts, recipient, amount, transferNonce, bonderFee) } // BondWithdrawal is a paid mutator transaction binding the contract method 0x23c452cd. // // Solidity: function bondWithdrawal(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee) returns() -func (_HopBridge *HopBridgeTransactorSession) BondWithdrawal(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.BondWithdrawal(&_HopBridge.TransactOpts, recipient, amount, transferNonce, bonderFee) +func (_HopL1EthBridge *HopL1EthBridgeTransactorSession) BondWithdrawal(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.BondWithdrawal(&_HopL1EthBridge.TransactOpts, recipient, amount, transferNonce, bonderFee) } -// ChallengeTransferBond is a paid mutator transaction binding the contract method 0xbacc68af. +// ChallengeTransferBond is a paid mutator transaction binding the contract method 0x1bbe15ea. // -// Solidity: function challengeTransferBond(bytes32 rootHash, uint256 originalAmount) payable returns() -func (_HopBridge *HopBridgeTransactor) ChallengeTransferBond(opts *bind.TransactOpts, rootHash [32]byte, originalAmount *big.Int) (*types.Transaction, error) { - return _HopBridge.contract.Transact(opts, "challengeTransferBond", rootHash, originalAmount) +// Solidity: function challengeTransferBond(bytes32 rootHash, uint256 originalAmount, uint256 destinationChainId) payable returns() +func (_HopL1EthBridge *HopL1EthBridgeTransactor) ChallengeTransferBond(opts *bind.TransactOpts, rootHash [32]byte, originalAmount *big.Int, destinationChainId *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.contract.Transact(opts, "challengeTransferBond", rootHash, originalAmount, destinationChainId) } -// ChallengeTransferBond is a paid mutator transaction binding the contract method 0xbacc68af. +// ChallengeTransferBond is a paid mutator transaction binding the contract method 0x1bbe15ea. // -// Solidity: function challengeTransferBond(bytes32 rootHash, uint256 originalAmount) payable returns() -func (_HopBridge *HopBridgeSession) ChallengeTransferBond(rootHash [32]byte, originalAmount *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.ChallengeTransferBond(&_HopBridge.TransactOpts, rootHash, originalAmount) +// Solidity: function challengeTransferBond(bytes32 rootHash, uint256 originalAmount, uint256 destinationChainId) payable returns() +func (_HopL1EthBridge *HopL1EthBridgeSession) ChallengeTransferBond(rootHash [32]byte, originalAmount *big.Int, destinationChainId *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.ChallengeTransferBond(&_HopL1EthBridge.TransactOpts, rootHash, originalAmount, destinationChainId) } -// ChallengeTransferBond is a paid mutator transaction binding the contract method 0xbacc68af. +// ChallengeTransferBond is a paid mutator transaction binding the contract method 0x1bbe15ea. // -// Solidity: function challengeTransferBond(bytes32 rootHash, uint256 originalAmount) payable returns() -func (_HopBridge *HopBridgeTransactorSession) ChallengeTransferBond(rootHash [32]byte, originalAmount *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.ChallengeTransferBond(&_HopBridge.TransactOpts, rootHash, originalAmount) +// Solidity: function challengeTransferBond(bytes32 rootHash, uint256 originalAmount, uint256 destinationChainId) payable returns() +func (_HopL1EthBridge *HopL1EthBridgeTransactorSession) ChallengeTransferBond(rootHash [32]byte, originalAmount *big.Int, destinationChainId *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.ChallengeTransferBond(&_HopL1EthBridge.TransactOpts, rootHash, originalAmount, destinationChainId) } // ConfirmTransferRoot is a paid mutator transaction binding the contract method 0xef6ebe5e. // // Solidity: function confirmTransferRoot(uint256 originChainId, bytes32 rootHash, uint256 destinationChainId, uint256 totalAmount, uint256 rootCommittedAt) returns() -func (_HopBridge *HopBridgeTransactor) ConfirmTransferRoot(opts *bind.TransactOpts, originChainId *big.Int, rootHash [32]byte, destinationChainId *big.Int, totalAmount *big.Int, rootCommittedAt *big.Int) (*types.Transaction, error) { - return _HopBridge.contract.Transact(opts, "confirmTransferRoot", originChainId, rootHash, destinationChainId, totalAmount, rootCommittedAt) +func (_HopL1EthBridge *HopL1EthBridgeTransactor) ConfirmTransferRoot(opts *bind.TransactOpts, originChainId *big.Int, rootHash [32]byte, destinationChainId *big.Int, totalAmount *big.Int, rootCommittedAt *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.contract.Transact(opts, "confirmTransferRoot", originChainId, rootHash, destinationChainId, totalAmount, rootCommittedAt) } // ConfirmTransferRoot is a paid mutator transaction binding the contract method 0xef6ebe5e. // // Solidity: function confirmTransferRoot(uint256 originChainId, bytes32 rootHash, uint256 destinationChainId, uint256 totalAmount, uint256 rootCommittedAt) returns() -func (_HopBridge *HopBridgeSession) ConfirmTransferRoot(originChainId *big.Int, rootHash [32]byte, destinationChainId *big.Int, totalAmount *big.Int, rootCommittedAt *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.ConfirmTransferRoot(&_HopBridge.TransactOpts, originChainId, rootHash, destinationChainId, totalAmount, rootCommittedAt) +func (_HopL1EthBridge *HopL1EthBridgeSession) ConfirmTransferRoot(originChainId *big.Int, rootHash [32]byte, destinationChainId *big.Int, totalAmount *big.Int, rootCommittedAt *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.ConfirmTransferRoot(&_HopL1EthBridge.TransactOpts, originChainId, rootHash, destinationChainId, totalAmount, rootCommittedAt) } // ConfirmTransferRoot is a paid mutator transaction binding the contract method 0xef6ebe5e. // // Solidity: function confirmTransferRoot(uint256 originChainId, bytes32 rootHash, uint256 destinationChainId, uint256 totalAmount, uint256 rootCommittedAt) returns() -func (_HopBridge *HopBridgeTransactorSession) ConfirmTransferRoot(originChainId *big.Int, rootHash [32]byte, destinationChainId *big.Int, totalAmount *big.Int, rootCommittedAt *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.ConfirmTransferRoot(&_HopBridge.TransactOpts, originChainId, rootHash, destinationChainId, totalAmount, rootCommittedAt) +func (_HopL1EthBridge *HopL1EthBridgeTransactorSession) ConfirmTransferRoot(originChainId *big.Int, rootHash [32]byte, destinationChainId *big.Int, totalAmount *big.Int, rootCommittedAt *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.ConfirmTransferRoot(&_HopL1EthBridge.TransactOpts, originChainId, rootHash, destinationChainId, totalAmount, rootCommittedAt) } // RemoveBonder is a paid mutator transaction binding the contract method 0x04e6c2c0. // // Solidity: function removeBonder(address bonder) returns() -func (_HopBridge *HopBridgeTransactor) RemoveBonder(opts *bind.TransactOpts, bonder common.Address) (*types.Transaction, error) { - return _HopBridge.contract.Transact(opts, "removeBonder", bonder) +func (_HopL1EthBridge *HopL1EthBridgeTransactor) RemoveBonder(opts *bind.TransactOpts, bonder common.Address) (*types.Transaction, error) { + return _HopL1EthBridge.contract.Transact(opts, "removeBonder", bonder) } // RemoveBonder is a paid mutator transaction binding the contract method 0x04e6c2c0. // // Solidity: function removeBonder(address bonder) returns() -func (_HopBridge *HopBridgeSession) RemoveBonder(bonder common.Address) (*types.Transaction, error) { - return _HopBridge.Contract.RemoveBonder(&_HopBridge.TransactOpts, bonder) +func (_HopL1EthBridge *HopL1EthBridgeSession) RemoveBonder(bonder common.Address) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.RemoveBonder(&_HopL1EthBridge.TransactOpts, bonder) } // RemoveBonder is a paid mutator transaction binding the contract method 0x04e6c2c0. // // Solidity: function removeBonder(address bonder) returns() -func (_HopBridge *HopBridgeTransactorSession) RemoveBonder(bonder common.Address) (*types.Transaction, error) { - return _HopBridge.Contract.RemoveBonder(&_HopBridge.TransactOpts, bonder) +func (_HopL1EthBridge *HopL1EthBridgeTransactorSession) RemoveBonder(bonder common.Address) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.RemoveBonder(&_HopL1EthBridge.TransactOpts, bonder) } // RescueTransferRoot is a paid mutator transaction binding the contract method 0xcbd1642e. // // Solidity: function rescueTransferRoot(bytes32 rootHash, uint256 originalAmount, address recipient) returns() -func (_HopBridge *HopBridgeTransactor) RescueTransferRoot(opts *bind.TransactOpts, rootHash [32]byte, originalAmount *big.Int, recipient common.Address) (*types.Transaction, error) { - return _HopBridge.contract.Transact(opts, "rescueTransferRoot", rootHash, originalAmount, recipient) +func (_HopL1EthBridge *HopL1EthBridgeTransactor) RescueTransferRoot(opts *bind.TransactOpts, rootHash [32]byte, originalAmount *big.Int, recipient common.Address) (*types.Transaction, error) { + return _HopL1EthBridge.contract.Transact(opts, "rescueTransferRoot", rootHash, originalAmount, recipient) } // RescueTransferRoot is a paid mutator transaction binding the contract method 0xcbd1642e. // // Solidity: function rescueTransferRoot(bytes32 rootHash, uint256 originalAmount, address recipient) returns() -func (_HopBridge *HopBridgeSession) RescueTransferRoot(rootHash [32]byte, originalAmount *big.Int, recipient common.Address) (*types.Transaction, error) { - return _HopBridge.Contract.RescueTransferRoot(&_HopBridge.TransactOpts, rootHash, originalAmount, recipient) +func (_HopL1EthBridge *HopL1EthBridgeSession) RescueTransferRoot(rootHash [32]byte, originalAmount *big.Int, recipient common.Address) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.RescueTransferRoot(&_HopL1EthBridge.TransactOpts, rootHash, originalAmount, recipient) } // RescueTransferRoot is a paid mutator transaction binding the contract method 0xcbd1642e. // // Solidity: function rescueTransferRoot(bytes32 rootHash, uint256 originalAmount, address recipient) returns() -func (_HopBridge *HopBridgeTransactorSession) RescueTransferRoot(rootHash [32]byte, originalAmount *big.Int, recipient common.Address) (*types.Transaction, error) { - return _HopBridge.Contract.RescueTransferRoot(&_HopBridge.TransactOpts, rootHash, originalAmount, recipient) +func (_HopL1EthBridge *HopL1EthBridgeTransactorSession) RescueTransferRoot(rootHash [32]byte, originalAmount *big.Int, recipient common.Address) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.RescueTransferRoot(&_HopL1EthBridge.TransactOpts, rootHash, originalAmount, recipient) } -// ResolveChallenge is a paid mutator transaction binding the contract method 0x45ca9fc9. +// ResolveChallenge is a paid mutator transaction binding the contract method 0x81707b80. // -// Solidity: function resolveChallenge(bytes32 rootHash, uint256 originalAmount) returns() -func (_HopBridge *HopBridgeTransactor) ResolveChallenge(opts *bind.TransactOpts, rootHash [32]byte, originalAmount *big.Int) (*types.Transaction, error) { - return _HopBridge.contract.Transact(opts, "resolveChallenge", rootHash, originalAmount) +// Solidity: function resolveChallenge(bytes32 rootHash, uint256 originalAmount, uint256 destinationChainId) returns() +func (_HopL1EthBridge *HopL1EthBridgeTransactor) ResolveChallenge(opts *bind.TransactOpts, rootHash [32]byte, originalAmount *big.Int, destinationChainId *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.contract.Transact(opts, "resolveChallenge", rootHash, originalAmount, destinationChainId) } -// ResolveChallenge is a paid mutator transaction binding the contract method 0x45ca9fc9. +// ResolveChallenge is a paid mutator transaction binding the contract method 0x81707b80. // -// Solidity: function resolveChallenge(bytes32 rootHash, uint256 originalAmount) returns() -func (_HopBridge *HopBridgeSession) ResolveChallenge(rootHash [32]byte, originalAmount *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.ResolveChallenge(&_HopBridge.TransactOpts, rootHash, originalAmount) +// Solidity: function resolveChallenge(bytes32 rootHash, uint256 originalAmount, uint256 destinationChainId) returns() +func (_HopL1EthBridge *HopL1EthBridgeSession) ResolveChallenge(rootHash [32]byte, originalAmount *big.Int, destinationChainId *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.ResolveChallenge(&_HopL1EthBridge.TransactOpts, rootHash, originalAmount, destinationChainId) } -// ResolveChallenge is a paid mutator transaction binding the contract method 0x45ca9fc9. +// ResolveChallenge is a paid mutator transaction binding the contract method 0x81707b80. // -// Solidity: function resolveChallenge(bytes32 rootHash, uint256 originalAmount) returns() -func (_HopBridge *HopBridgeTransactorSession) ResolveChallenge(rootHash [32]byte, originalAmount *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.ResolveChallenge(&_HopBridge.TransactOpts, rootHash, originalAmount) +// Solidity: function resolveChallenge(bytes32 rootHash, uint256 originalAmount, uint256 destinationChainId) returns() +func (_HopL1EthBridge *HopL1EthBridgeTransactorSession) ResolveChallenge(rootHash [32]byte, originalAmount *big.Int, destinationChainId *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.ResolveChallenge(&_HopL1EthBridge.TransactOpts, rootHash, originalAmount, destinationChainId) } // SendToL2 is a paid mutator transaction binding the contract method 0xdeace8f5. // // Solidity: function sendToL2(uint256 chainId, address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address relayer, uint256 relayerFee) payable returns() -func (_HopBridge *HopBridgeTransactor) SendToL2(opts *bind.TransactOpts, chainId *big.Int, recipient common.Address, amount *big.Int, amountOutMin *big.Int, deadline *big.Int, relayer common.Address, relayerFee *big.Int) (*types.Transaction, error) { - return _HopBridge.contract.Transact(opts, "sendToL2", chainId, recipient, amount, amountOutMin, deadline, relayer, relayerFee) +func (_HopL1EthBridge *HopL1EthBridgeTransactor) SendToL2(opts *bind.TransactOpts, chainId *big.Int, recipient common.Address, amount *big.Int, amountOutMin *big.Int, deadline *big.Int, relayer common.Address, relayerFee *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.contract.Transact(opts, "sendToL2", chainId, recipient, amount, amountOutMin, deadline, relayer, relayerFee) } // SendToL2 is a paid mutator transaction binding the contract method 0xdeace8f5. // // Solidity: function sendToL2(uint256 chainId, address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address relayer, uint256 relayerFee) payable returns() -func (_HopBridge *HopBridgeSession) SendToL2(chainId *big.Int, recipient common.Address, amount *big.Int, amountOutMin *big.Int, deadline *big.Int, relayer common.Address, relayerFee *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.SendToL2(&_HopBridge.TransactOpts, chainId, recipient, amount, amountOutMin, deadline, relayer, relayerFee) +func (_HopL1EthBridge *HopL1EthBridgeSession) SendToL2(chainId *big.Int, recipient common.Address, amount *big.Int, amountOutMin *big.Int, deadline *big.Int, relayer common.Address, relayerFee *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.SendToL2(&_HopL1EthBridge.TransactOpts, chainId, recipient, amount, amountOutMin, deadline, relayer, relayerFee) } // SendToL2 is a paid mutator transaction binding the contract method 0xdeace8f5. // // Solidity: function sendToL2(uint256 chainId, address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address relayer, uint256 relayerFee) payable returns() -func (_HopBridge *HopBridgeTransactorSession) SendToL2(chainId *big.Int, recipient common.Address, amount *big.Int, amountOutMin *big.Int, deadline *big.Int, relayer common.Address, relayerFee *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.SendToL2(&_HopBridge.TransactOpts, chainId, recipient, amount, amountOutMin, deadline, relayer, relayerFee) +func (_HopL1EthBridge *HopL1EthBridgeTransactorSession) SendToL2(chainId *big.Int, recipient common.Address, amount *big.Int, amountOutMin *big.Int, deadline *big.Int, relayer common.Address, relayerFee *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.SendToL2(&_HopL1EthBridge.TransactOpts, chainId, recipient, amount, amountOutMin, deadline, relayer, relayerFee) } // SetChainIdDepositsPaused is a paid mutator transaction binding the contract method 0x14942024. // // Solidity: function setChainIdDepositsPaused(uint256 chainId, bool isPaused) returns() -func (_HopBridge *HopBridgeTransactor) SetChainIdDepositsPaused(opts *bind.TransactOpts, chainId *big.Int, isPaused bool) (*types.Transaction, error) { - return _HopBridge.contract.Transact(opts, "setChainIdDepositsPaused", chainId, isPaused) +func (_HopL1EthBridge *HopL1EthBridgeTransactor) SetChainIdDepositsPaused(opts *bind.TransactOpts, chainId *big.Int, isPaused bool) (*types.Transaction, error) { + return _HopL1EthBridge.contract.Transact(opts, "setChainIdDepositsPaused", chainId, isPaused) } // SetChainIdDepositsPaused is a paid mutator transaction binding the contract method 0x14942024. // // Solidity: function setChainIdDepositsPaused(uint256 chainId, bool isPaused) returns() -func (_HopBridge *HopBridgeSession) SetChainIdDepositsPaused(chainId *big.Int, isPaused bool) (*types.Transaction, error) { - return _HopBridge.Contract.SetChainIdDepositsPaused(&_HopBridge.TransactOpts, chainId, isPaused) +func (_HopL1EthBridge *HopL1EthBridgeSession) SetChainIdDepositsPaused(chainId *big.Int, isPaused bool) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.SetChainIdDepositsPaused(&_HopL1EthBridge.TransactOpts, chainId, isPaused) } // SetChainIdDepositsPaused is a paid mutator transaction binding the contract method 0x14942024. // // Solidity: function setChainIdDepositsPaused(uint256 chainId, bool isPaused) returns() -func (_HopBridge *HopBridgeTransactorSession) SetChainIdDepositsPaused(chainId *big.Int, isPaused bool) (*types.Transaction, error) { - return _HopBridge.Contract.SetChainIdDepositsPaused(&_HopBridge.TransactOpts, chainId, isPaused) +func (_HopL1EthBridge *HopL1EthBridgeTransactorSession) SetChainIdDepositsPaused(chainId *big.Int, isPaused bool) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.SetChainIdDepositsPaused(&_HopL1EthBridge.TransactOpts, chainId, isPaused) } // SetChallengePeriod is a paid mutator transaction binding the contract method 0x5d475fdd. // // Solidity: function setChallengePeriod(uint256 _challengePeriod) returns() -func (_HopBridge *HopBridgeTransactor) SetChallengePeriod(opts *bind.TransactOpts, _challengePeriod *big.Int) (*types.Transaction, error) { - return _HopBridge.contract.Transact(opts, "setChallengePeriod", _challengePeriod) +func (_HopL1EthBridge *HopL1EthBridgeTransactor) SetChallengePeriod(opts *bind.TransactOpts, _challengePeriod *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.contract.Transact(opts, "setChallengePeriod", _challengePeriod) } // SetChallengePeriod is a paid mutator transaction binding the contract method 0x5d475fdd. // // Solidity: function setChallengePeriod(uint256 _challengePeriod) returns() -func (_HopBridge *HopBridgeSession) SetChallengePeriod(_challengePeriod *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.SetChallengePeriod(&_HopBridge.TransactOpts, _challengePeriod) +func (_HopL1EthBridge *HopL1EthBridgeSession) SetChallengePeriod(_challengePeriod *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.SetChallengePeriod(&_HopL1EthBridge.TransactOpts, _challengePeriod) } // SetChallengePeriod is a paid mutator transaction binding the contract method 0x5d475fdd. // // Solidity: function setChallengePeriod(uint256 _challengePeriod) returns() -func (_HopBridge *HopBridgeTransactorSession) SetChallengePeriod(_challengePeriod *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.SetChallengePeriod(&_HopBridge.TransactOpts, _challengePeriod) +func (_HopL1EthBridge *HopL1EthBridgeTransactorSession) SetChallengePeriod(_challengePeriod *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.SetChallengePeriod(&_HopL1EthBridge.TransactOpts, _challengePeriod) } // SetChallengeResolutionPeriod is a paid mutator transaction binding the contract method 0xeecd57e6. // // Solidity: function setChallengeResolutionPeriod(uint256 _challengeResolutionPeriod) returns() -func (_HopBridge *HopBridgeTransactor) SetChallengeResolutionPeriod(opts *bind.TransactOpts, _challengeResolutionPeriod *big.Int) (*types.Transaction, error) { - return _HopBridge.contract.Transact(opts, "setChallengeResolutionPeriod", _challengeResolutionPeriod) +func (_HopL1EthBridge *HopL1EthBridgeTransactor) SetChallengeResolutionPeriod(opts *bind.TransactOpts, _challengeResolutionPeriod *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.contract.Transact(opts, "setChallengeResolutionPeriod", _challengeResolutionPeriod) } // SetChallengeResolutionPeriod is a paid mutator transaction binding the contract method 0xeecd57e6. // // Solidity: function setChallengeResolutionPeriod(uint256 _challengeResolutionPeriod) returns() -func (_HopBridge *HopBridgeSession) SetChallengeResolutionPeriod(_challengeResolutionPeriod *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.SetChallengeResolutionPeriod(&_HopBridge.TransactOpts, _challengeResolutionPeriod) +func (_HopL1EthBridge *HopL1EthBridgeSession) SetChallengeResolutionPeriod(_challengeResolutionPeriod *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.SetChallengeResolutionPeriod(&_HopL1EthBridge.TransactOpts, _challengeResolutionPeriod) } // SetChallengeResolutionPeriod is a paid mutator transaction binding the contract method 0xeecd57e6. // // Solidity: function setChallengeResolutionPeriod(uint256 _challengeResolutionPeriod) returns() -func (_HopBridge *HopBridgeTransactorSession) SetChallengeResolutionPeriod(_challengeResolutionPeriod *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.SetChallengeResolutionPeriod(&_HopBridge.TransactOpts, _challengeResolutionPeriod) +func (_HopL1EthBridge *HopL1EthBridgeTransactorSession) SetChallengeResolutionPeriod(_challengeResolutionPeriod *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.SetChallengeResolutionPeriod(&_HopL1EthBridge.TransactOpts, _challengeResolutionPeriod) } // SetCrossDomainMessengerWrapper is a paid mutator transaction binding the contract method 0xd4448163. // // Solidity: function setCrossDomainMessengerWrapper(uint256 chainId, address _crossDomainMessengerWrapper) returns() -func (_HopBridge *HopBridgeTransactor) SetCrossDomainMessengerWrapper(opts *bind.TransactOpts, chainId *big.Int, _crossDomainMessengerWrapper common.Address) (*types.Transaction, error) { - return _HopBridge.contract.Transact(opts, "setCrossDomainMessengerWrapper", chainId, _crossDomainMessengerWrapper) +func (_HopL1EthBridge *HopL1EthBridgeTransactor) SetCrossDomainMessengerWrapper(opts *bind.TransactOpts, chainId *big.Int, _crossDomainMessengerWrapper common.Address) (*types.Transaction, error) { + return _HopL1EthBridge.contract.Transact(opts, "setCrossDomainMessengerWrapper", chainId, _crossDomainMessengerWrapper) } // SetCrossDomainMessengerWrapper is a paid mutator transaction binding the contract method 0xd4448163. // // Solidity: function setCrossDomainMessengerWrapper(uint256 chainId, address _crossDomainMessengerWrapper) returns() -func (_HopBridge *HopBridgeSession) SetCrossDomainMessengerWrapper(chainId *big.Int, _crossDomainMessengerWrapper common.Address) (*types.Transaction, error) { - return _HopBridge.Contract.SetCrossDomainMessengerWrapper(&_HopBridge.TransactOpts, chainId, _crossDomainMessengerWrapper) +func (_HopL1EthBridge *HopL1EthBridgeSession) SetCrossDomainMessengerWrapper(chainId *big.Int, _crossDomainMessengerWrapper common.Address) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.SetCrossDomainMessengerWrapper(&_HopL1EthBridge.TransactOpts, chainId, _crossDomainMessengerWrapper) } // SetCrossDomainMessengerWrapper is a paid mutator transaction binding the contract method 0xd4448163. // // Solidity: function setCrossDomainMessengerWrapper(uint256 chainId, address _crossDomainMessengerWrapper) returns() -func (_HopBridge *HopBridgeTransactorSession) SetCrossDomainMessengerWrapper(chainId *big.Int, _crossDomainMessengerWrapper common.Address) (*types.Transaction, error) { - return _HopBridge.Contract.SetCrossDomainMessengerWrapper(&_HopBridge.TransactOpts, chainId, _crossDomainMessengerWrapper) +func (_HopL1EthBridge *HopL1EthBridgeTransactorSession) SetCrossDomainMessengerWrapper(chainId *big.Int, _crossDomainMessengerWrapper common.Address) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.SetCrossDomainMessengerWrapper(&_HopL1EthBridge.TransactOpts, chainId, _crossDomainMessengerWrapper) } // SetGovernance is a paid mutator transaction binding the contract method 0xab033ea9. // // Solidity: function setGovernance(address _newGovernance) returns() -func (_HopBridge *HopBridgeTransactor) SetGovernance(opts *bind.TransactOpts, _newGovernance common.Address) (*types.Transaction, error) { - return _HopBridge.contract.Transact(opts, "setGovernance", _newGovernance) +func (_HopL1EthBridge *HopL1EthBridgeTransactor) SetGovernance(opts *bind.TransactOpts, _newGovernance common.Address) (*types.Transaction, error) { + return _HopL1EthBridge.contract.Transact(opts, "setGovernance", _newGovernance) } // SetGovernance is a paid mutator transaction binding the contract method 0xab033ea9. // // Solidity: function setGovernance(address _newGovernance) returns() -func (_HopBridge *HopBridgeSession) SetGovernance(_newGovernance common.Address) (*types.Transaction, error) { - return _HopBridge.Contract.SetGovernance(&_HopBridge.TransactOpts, _newGovernance) +func (_HopL1EthBridge *HopL1EthBridgeSession) SetGovernance(_newGovernance common.Address) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.SetGovernance(&_HopL1EthBridge.TransactOpts, _newGovernance) } // SetGovernance is a paid mutator transaction binding the contract method 0xab033ea9. // // Solidity: function setGovernance(address _newGovernance) returns() -func (_HopBridge *HopBridgeTransactorSession) SetGovernance(_newGovernance common.Address) (*types.Transaction, error) { - return _HopBridge.Contract.SetGovernance(&_HopBridge.TransactOpts, _newGovernance) +func (_HopL1EthBridge *HopL1EthBridgeTransactorSession) SetGovernance(_newGovernance common.Address) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.SetGovernance(&_HopL1EthBridge.TransactOpts, _newGovernance) } // SetMinTransferRootBondDelay is a paid mutator transaction binding the contract method 0x39ada669. // // Solidity: function setMinTransferRootBondDelay(uint256 _minTransferRootBondDelay) returns() -func (_HopBridge *HopBridgeTransactor) SetMinTransferRootBondDelay(opts *bind.TransactOpts, _minTransferRootBondDelay *big.Int) (*types.Transaction, error) { - return _HopBridge.contract.Transact(opts, "setMinTransferRootBondDelay", _minTransferRootBondDelay) +func (_HopL1EthBridge *HopL1EthBridgeTransactor) SetMinTransferRootBondDelay(opts *bind.TransactOpts, _minTransferRootBondDelay *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.contract.Transact(opts, "setMinTransferRootBondDelay", _minTransferRootBondDelay) } // SetMinTransferRootBondDelay is a paid mutator transaction binding the contract method 0x39ada669. // // Solidity: function setMinTransferRootBondDelay(uint256 _minTransferRootBondDelay) returns() -func (_HopBridge *HopBridgeSession) SetMinTransferRootBondDelay(_minTransferRootBondDelay *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.SetMinTransferRootBondDelay(&_HopBridge.TransactOpts, _minTransferRootBondDelay) +func (_HopL1EthBridge *HopL1EthBridgeSession) SetMinTransferRootBondDelay(_minTransferRootBondDelay *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.SetMinTransferRootBondDelay(&_HopL1EthBridge.TransactOpts, _minTransferRootBondDelay) } // SetMinTransferRootBondDelay is a paid mutator transaction binding the contract method 0x39ada669. // // Solidity: function setMinTransferRootBondDelay(uint256 _minTransferRootBondDelay) returns() -func (_HopBridge *HopBridgeTransactorSession) SetMinTransferRootBondDelay(_minTransferRootBondDelay *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.SetMinTransferRootBondDelay(&_HopBridge.TransactOpts, _minTransferRootBondDelay) +func (_HopL1EthBridge *HopL1EthBridgeTransactorSession) SetMinTransferRootBondDelay(_minTransferRootBondDelay *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.SetMinTransferRootBondDelay(&_HopL1EthBridge.TransactOpts, _minTransferRootBondDelay) } // SettleBondedWithdrawal is a paid mutator transaction binding the contract method 0xc7525dd3. // // Solidity: function settleBondedWithdrawal(address bonder, bytes32 transferId, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() -func (_HopBridge *HopBridgeTransactor) SettleBondedWithdrawal(opts *bind.TransactOpts, bonder common.Address, transferId [32]byte, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { - return _HopBridge.contract.Transact(opts, "settleBondedWithdrawal", bonder, transferId, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +func (_HopL1EthBridge *HopL1EthBridgeTransactor) SettleBondedWithdrawal(opts *bind.TransactOpts, bonder common.Address, transferId [32]byte, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.contract.Transact(opts, "settleBondedWithdrawal", bonder, transferId, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) } // SettleBondedWithdrawal is a paid mutator transaction binding the contract method 0xc7525dd3. // // Solidity: function settleBondedWithdrawal(address bonder, bytes32 transferId, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() -func (_HopBridge *HopBridgeSession) SettleBondedWithdrawal(bonder common.Address, transferId [32]byte, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.SettleBondedWithdrawal(&_HopBridge.TransactOpts, bonder, transferId, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +func (_HopL1EthBridge *HopL1EthBridgeSession) SettleBondedWithdrawal(bonder common.Address, transferId [32]byte, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.SettleBondedWithdrawal(&_HopL1EthBridge.TransactOpts, bonder, transferId, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) } // SettleBondedWithdrawal is a paid mutator transaction binding the contract method 0xc7525dd3. // // Solidity: function settleBondedWithdrawal(address bonder, bytes32 transferId, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() -func (_HopBridge *HopBridgeTransactorSession) SettleBondedWithdrawal(bonder common.Address, transferId [32]byte, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.SettleBondedWithdrawal(&_HopBridge.TransactOpts, bonder, transferId, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +func (_HopL1EthBridge *HopL1EthBridgeTransactorSession) SettleBondedWithdrawal(bonder common.Address, transferId [32]byte, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.SettleBondedWithdrawal(&_HopL1EthBridge.TransactOpts, bonder, transferId, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) } // SettleBondedWithdrawals is a paid mutator transaction binding the contract method 0xb162717e. // // Solidity: function settleBondedWithdrawals(address bonder, bytes32[] transferIds, uint256 totalAmount) returns() -func (_HopBridge *HopBridgeTransactor) SettleBondedWithdrawals(opts *bind.TransactOpts, bonder common.Address, transferIds [][32]byte, totalAmount *big.Int) (*types.Transaction, error) { - return _HopBridge.contract.Transact(opts, "settleBondedWithdrawals", bonder, transferIds, totalAmount) +func (_HopL1EthBridge *HopL1EthBridgeTransactor) SettleBondedWithdrawals(opts *bind.TransactOpts, bonder common.Address, transferIds [][32]byte, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.contract.Transact(opts, "settleBondedWithdrawals", bonder, transferIds, totalAmount) } // SettleBondedWithdrawals is a paid mutator transaction binding the contract method 0xb162717e. // // Solidity: function settleBondedWithdrawals(address bonder, bytes32[] transferIds, uint256 totalAmount) returns() -func (_HopBridge *HopBridgeSession) SettleBondedWithdrawals(bonder common.Address, transferIds [][32]byte, totalAmount *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.SettleBondedWithdrawals(&_HopBridge.TransactOpts, bonder, transferIds, totalAmount) +func (_HopL1EthBridge *HopL1EthBridgeSession) SettleBondedWithdrawals(bonder common.Address, transferIds [][32]byte, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.SettleBondedWithdrawals(&_HopL1EthBridge.TransactOpts, bonder, transferIds, totalAmount) } // SettleBondedWithdrawals is a paid mutator transaction binding the contract method 0xb162717e. // // Solidity: function settleBondedWithdrawals(address bonder, bytes32[] transferIds, uint256 totalAmount) returns() -func (_HopBridge *HopBridgeTransactorSession) SettleBondedWithdrawals(bonder common.Address, transferIds [][32]byte, totalAmount *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.SettleBondedWithdrawals(&_HopBridge.TransactOpts, bonder, transferIds, totalAmount) +func (_HopL1EthBridge *HopL1EthBridgeTransactorSession) SettleBondedWithdrawals(bonder common.Address, transferIds [][32]byte, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.SettleBondedWithdrawals(&_HopL1EthBridge.TransactOpts, bonder, transferIds, totalAmount) } // Stake is a paid mutator transaction binding the contract method 0xadc9772e. // // Solidity: function stake(address bonder, uint256 amount) payable returns() -func (_HopBridge *HopBridgeTransactor) Stake(opts *bind.TransactOpts, bonder common.Address, amount *big.Int) (*types.Transaction, error) { - return _HopBridge.contract.Transact(opts, "stake", bonder, amount) +func (_HopL1EthBridge *HopL1EthBridgeTransactor) Stake(opts *bind.TransactOpts, bonder common.Address, amount *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.contract.Transact(opts, "stake", bonder, amount) } // Stake is a paid mutator transaction binding the contract method 0xadc9772e. // // Solidity: function stake(address bonder, uint256 amount) payable returns() -func (_HopBridge *HopBridgeSession) Stake(bonder common.Address, amount *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.Stake(&_HopBridge.TransactOpts, bonder, amount) +func (_HopL1EthBridge *HopL1EthBridgeSession) Stake(bonder common.Address, amount *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.Stake(&_HopL1EthBridge.TransactOpts, bonder, amount) } // Stake is a paid mutator transaction binding the contract method 0xadc9772e. // // Solidity: function stake(address bonder, uint256 amount) payable returns() -func (_HopBridge *HopBridgeTransactorSession) Stake(bonder common.Address, amount *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.Stake(&_HopBridge.TransactOpts, bonder, amount) +func (_HopL1EthBridge *HopL1EthBridgeTransactorSession) Stake(bonder common.Address, amount *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.Stake(&_HopL1EthBridge.TransactOpts, bonder, amount) } // Unstake is a paid mutator transaction binding the contract method 0x2e17de78. // // Solidity: function unstake(uint256 amount) returns() -func (_HopBridge *HopBridgeTransactor) Unstake(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { - return _HopBridge.contract.Transact(opts, "unstake", amount) +func (_HopL1EthBridge *HopL1EthBridgeTransactor) Unstake(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.contract.Transact(opts, "unstake", amount) } // Unstake is a paid mutator transaction binding the contract method 0x2e17de78. // // Solidity: function unstake(uint256 amount) returns() -func (_HopBridge *HopBridgeSession) Unstake(amount *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.Unstake(&_HopBridge.TransactOpts, amount) +func (_HopL1EthBridge *HopL1EthBridgeSession) Unstake(amount *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.Unstake(&_HopL1EthBridge.TransactOpts, amount) } // Unstake is a paid mutator transaction binding the contract method 0x2e17de78. // // Solidity: function unstake(uint256 amount) returns() -func (_HopBridge *HopBridgeTransactorSession) Unstake(amount *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.Unstake(&_HopBridge.TransactOpts, amount) +func (_HopL1EthBridge *HopL1EthBridgeTransactorSession) Unstake(amount *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.Unstake(&_HopL1EthBridge.TransactOpts, amount) } // Withdraw is a paid mutator transaction binding the contract method 0x0f7aadb7. // // Solidity: function withdraw(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() -func (_HopBridge *HopBridgeTransactor) Withdraw(opts *bind.TransactOpts, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { - return _HopBridge.contract.Transact(opts, "withdraw", recipient, amount, transferNonce, bonderFee, amountOutMin, deadline, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +func (_HopL1EthBridge *HopL1EthBridgeTransactor) Withdraw(opts *bind.TransactOpts, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.contract.Transact(opts, "withdraw", recipient, amount, transferNonce, bonderFee, amountOutMin, deadline, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) } // Withdraw is a paid mutator transaction binding the contract method 0x0f7aadb7. // // Solidity: function withdraw(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() -func (_HopBridge *HopBridgeSession) Withdraw(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.Withdraw(&_HopBridge.TransactOpts, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +func (_HopL1EthBridge *HopL1EthBridgeSession) Withdraw(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.Withdraw(&_HopL1EthBridge.TransactOpts, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) } // Withdraw is a paid mutator transaction binding the contract method 0x0f7aadb7. // // Solidity: function withdraw(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() -func (_HopBridge *HopBridgeTransactorSession) Withdraw(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { - return _HopBridge.Contract.Withdraw(&_HopBridge.TransactOpts, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +func (_HopL1EthBridge *HopL1EthBridgeTransactorSession) Withdraw(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL1EthBridge.Contract.Withdraw(&_HopL1EthBridge.TransactOpts, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) } -// HopBridgeBonderAddedIterator is returned from FilterBonderAdded and is used to iterate over the raw logs and unpacked data for BonderAdded events raised by the HopBridge contract. -type HopBridgeBonderAddedIterator struct { - Event *HopBridgeBonderAdded // Event containing the contract specifics and raw log +// HopL1EthBridgeBonderAddedIterator is returned from FilterBonderAdded and is used to iterate over the raw logs and unpacked data for BonderAdded events raised by the HopL1EthBridge contract. +type HopL1EthBridgeBonderAddedIterator struct { + Event *HopL1EthBridgeBonderAdded // 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 @@ -1454,7 +1432,7 @@ type HopBridgeBonderAddedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *HopBridgeBonderAddedIterator) Next() bool { +func (it *HopL1EthBridgeBonderAddedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1463,7 +1441,7 @@ func (it *HopBridgeBonderAddedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(HopBridgeBonderAdded) + it.Event = new(HopL1EthBridgeBonderAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1478,7 +1456,7 @@ func (it *HopBridgeBonderAddedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(HopBridgeBonderAdded) + it.Event = new(HopL1EthBridgeBonderAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1494,19 +1472,19 @@ func (it *HopBridgeBonderAddedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *HopBridgeBonderAddedIterator) Error() error { +func (it *HopL1EthBridgeBonderAddedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *HopBridgeBonderAddedIterator) Close() error { +func (it *HopL1EthBridgeBonderAddedIterator) Close() error { it.sub.Unsubscribe() return nil } -// HopBridgeBonderAdded represents a BonderAdded event raised by the HopBridge contract. -type HopBridgeBonderAdded struct { +// HopL1EthBridgeBonderAdded represents a BonderAdded event raised by the HopL1EthBridge contract. +type HopL1EthBridgeBonderAdded struct { NewBonder common.Address Raw types.Log // Blockchain specific contextual infos } @@ -1514,31 +1492,31 @@ type HopBridgeBonderAdded struct { // FilterBonderAdded is a free log retrieval operation binding the contract event 0x2cec73b7434d3b91198ad1a618f63e6a0761ce281af5ec9ec76606d948d03e23. // // Solidity: event BonderAdded(address indexed newBonder) -func (_HopBridge *HopBridgeFilterer) FilterBonderAdded(opts *bind.FilterOpts, newBonder []common.Address) (*HopBridgeBonderAddedIterator, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) FilterBonderAdded(opts *bind.FilterOpts, newBonder []common.Address) (*HopL1EthBridgeBonderAddedIterator, error) { var newBonderRule []interface{} for _, newBonderItem := range newBonder { newBonderRule = append(newBonderRule, newBonderItem) } - logs, sub, err := _HopBridge.contract.FilterLogs(opts, "BonderAdded", newBonderRule) + logs, sub, err := _HopL1EthBridge.contract.FilterLogs(opts, "BonderAdded", newBonderRule) if err != nil { return nil, err } - return &HopBridgeBonderAddedIterator{contract: _HopBridge.contract, event: "BonderAdded", logs: logs, sub: sub}, nil + return &HopL1EthBridgeBonderAddedIterator{contract: _HopL1EthBridge.contract, event: "BonderAdded", logs: logs, sub: sub}, nil } // WatchBonderAdded is a free log subscription operation binding the contract event 0x2cec73b7434d3b91198ad1a618f63e6a0761ce281af5ec9ec76606d948d03e23. // // Solidity: event BonderAdded(address indexed newBonder) -func (_HopBridge *HopBridgeFilterer) WatchBonderAdded(opts *bind.WatchOpts, sink chan<- *HopBridgeBonderAdded, newBonder []common.Address) (event.Subscription, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) WatchBonderAdded(opts *bind.WatchOpts, sink chan<- *HopL1EthBridgeBonderAdded, newBonder []common.Address) (event.Subscription, error) { var newBonderRule []interface{} for _, newBonderItem := range newBonder { newBonderRule = append(newBonderRule, newBonderItem) } - logs, sub, err := _HopBridge.contract.WatchLogs(opts, "BonderAdded", newBonderRule) + logs, sub, err := _HopL1EthBridge.contract.WatchLogs(opts, "BonderAdded", newBonderRule) if err != nil { return nil, err } @@ -1548,8 +1526,8 @@ func (_HopBridge *HopBridgeFilterer) WatchBonderAdded(opts *bind.WatchOpts, sink select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(HopBridgeBonderAdded) - if err := _HopBridge.contract.UnpackLog(event, "BonderAdded", log); err != nil { + event := new(HopL1EthBridgeBonderAdded) + if err := _HopL1EthBridge.contract.UnpackLog(event, "BonderAdded", log); err != nil { return err } event.Raw = log @@ -1573,18 +1551,18 @@ func (_HopBridge *HopBridgeFilterer) WatchBonderAdded(opts *bind.WatchOpts, sink // ParseBonderAdded is a log parse operation binding the contract event 0x2cec73b7434d3b91198ad1a618f63e6a0761ce281af5ec9ec76606d948d03e23. // // Solidity: event BonderAdded(address indexed newBonder) -func (_HopBridge *HopBridgeFilterer) ParseBonderAdded(log types.Log) (*HopBridgeBonderAdded, error) { - event := new(HopBridgeBonderAdded) - if err := _HopBridge.contract.UnpackLog(event, "BonderAdded", log); err != nil { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) ParseBonderAdded(log types.Log) (*HopL1EthBridgeBonderAdded, error) { + event := new(HopL1EthBridgeBonderAdded) + if err := _HopL1EthBridge.contract.UnpackLog(event, "BonderAdded", log); err != nil { return nil, err } event.Raw = log return event, nil } -// HopBridgeBonderRemovedIterator is returned from FilterBonderRemoved and is used to iterate over the raw logs and unpacked data for BonderRemoved events raised by the HopBridge contract. -type HopBridgeBonderRemovedIterator struct { - Event *HopBridgeBonderRemoved // Event containing the contract specifics and raw log +// HopL1EthBridgeBonderRemovedIterator is returned from FilterBonderRemoved and is used to iterate over the raw logs and unpacked data for BonderRemoved events raised by the HopL1EthBridge contract. +type HopL1EthBridgeBonderRemovedIterator struct { + Event *HopL1EthBridgeBonderRemoved // 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 @@ -1598,7 +1576,7 @@ type HopBridgeBonderRemovedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *HopBridgeBonderRemovedIterator) Next() bool { +func (it *HopL1EthBridgeBonderRemovedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1607,7 +1585,7 @@ func (it *HopBridgeBonderRemovedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(HopBridgeBonderRemoved) + it.Event = new(HopL1EthBridgeBonderRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1622,7 +1600,7 @@ func (it *HopBridgeBonderRemovedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(HopBridgeBonderRemoved) + it.Event = new(HopL1EthBridgeBonderRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1638,19 +1616,19 @@ func (it *HopBridgeBonderRemovedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *HopBridgeBonderRemovedIterator) Error() error { +func (it *HopL1EthBridgeBonderRemovedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *HopBridgeBonderRemovedIterator) Close() error { +func (it *HopL1EthBridgeBonderRemovedIterator) Close() error { it.sub.Unsubscribe() return nil } -// HopBridgeBonderRemoved represents a BonderRemoved event raised by the HopBridge contract. -type HopBridgeBonderRemoved struct { +// HopL1EthBridgeBonderRemoved represents a BonderRemoved event raised by the HopL1EthBridge contract. +type HopL1EthBridgeBonderRemoved struct { PreviousBonder common.Address Raw types.Log // Blockchain specific contextual infos } @@ -1658,31 +1636,31 @@ type HopBridgeBonderRemoved struct { // FilterBonderRemoved is a free log retrieval operation binding the contract event 0x4234ba611d325b3ba434c4e1b037967b955b1274d4185ee9847b7491111a48ff. // // Solidity: event BonderRemoved(address indexed previousBonder) -func (_HopBridge *HopBridgeFilterer) FilterBonderRemoved(opts *bind.FilterOpts, previousBonder []common.Address) (*HopBridgeBonderRemovedIterator, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) FilterBonderRemoved(opts *bind.FilterOpts, previousBonder []common.Address) (*HopL1EthBridgeBonderRemovedIterator, error) { var previousBonderRule []interface{} for _, previousBonderItem := range previousBonder { previousBonderRule = append(previousBonderRule, previousBonderItem) } - logs, sub, err := _HopBridge.contract.FilterLogs(opts, "BonderRemoved", previousBonderRule) + logs, sub, err := _HopL1EthBridge.contract.FilterLogs(opts, "BonderRemoved", previousBonderRule) if err != nil { return nil, err } - return &HopBridgeBonderRemovedIterator{contract: _HopBridge.contract, event: "BonderRemoved", logs: logs, sub: sub}, nil + return &HopL1EthBridgeBonderRemovedIterator{contract: _HopL1EthBridge.contract, event: "BonderRemoved", logs: logs, sub: sub}, nil } // WatchBonderRemoved is a free log subscription operation binding the contract event 0x4234ba611d325b3ba434c4e1b037967b955b1274d4185ee9847b7491111a48ff. // // Solidity: event BonderRemoved(address indexed previousBonder) -func (_HopBridge *HopBridgeFilterer) WatchBonderRemoved(opts *bind.WatchOpts, sink chan<- *HopBridgeBonderRemoved, previousBonder []common.Address) (event.Subscription, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) WatchBonderRemoved(opts *bind.WatchOpts, sink chan<- *HopL1EthBridgeBonderRemoved, previousBonder []common.Address) (event.Subscription, error) { var previousBonderRule []interface{} for _, previousBonderItem := range previousBonder { previousBonderRule = append(previousBonderRule, previousBonderItem) } - logs, sub, err := _HopBridge.contract.WatchLogs(opts, "BonderRemoved", previousBonderRule) + logs, sub, err := _HopL1EthBridge.contract.WatchLogs(opts, "BonderRemoved", previousBonderRule) if err != nil { return nil, err } @@ -1692,8 +1670,8 @@ func (_HopBridge *HopBridgeFilterer) WatchBonderRemoved(opts *bind.WatchOpts, si select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(HopBridgeBonderRemoved) - if err := _HopBridge.contract.UnpackLog(event, "BonderRemoved", log); err != nil { + event := new(HopL1EthBridgeBonderRemoved) + if err := _HopL1EthBridge.contract.UnpackLog(event, "BonderRemoved", log); err != nil { return err } event.Raw = log @@ -1717,18 +1695,18 @@ func (_HopBridge *HopBridgeFilterer) WatchBonderRemoved(opts *bind.WatchOpts, si // ParseBonderRemoved is a log parse operation binding the contract event 0x4234ba611d325b3ba434c4e1b037967b955b1274d4185ee9847b7491111a48ff. // // Solidity: event BonderRemoved(address indexed previousBonder) -func (_HopBridge *HopBridgeFilterer) ParseBonderRemoved(log types.Log) (*HopBridgeBonderRemoved, error) { - event := new(HopBridgeBonderRemoved) - if err := _HopBridge.contract.UnpackLog(event, "BonderRemoved", log); err != nil { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) ParseBonderRemoved(log types.Log) (*HopL1EthBridgeBonderRemoved, error) { + event := new(HopL1EthBridgeBonderRemoved) + if err := _HopL1EthBridge.contract.UnpackLog(event, "BonderRemoved", log); err != nil { return nil, err } event.Raw = log return event, nil } -// HopBridgeChallengeResolvedIterator is returned from FilterChallengeResolved and is used to iterate over the raw logs and unpacked data for ChallengeResolved events raised by the HopBridge contract. -type HopBridgeChallengeResolvedIterator struct { - Event *HopBridgeChallengeResolved // Event containing the contract specifics and raw log +// HopL1EthBridgeChallengeResolvedIterator is returned from FilterChallengeResolved and is used to iterate over the raw logs and unpacked data for ChallengeResolved events raised by the HopL1EthBridge contract. +type HopL1EthBridgeChallengeResolvedIterator struct { + Event *HopL1EthBridgeChallengeResolved // 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 @@ -1742,7 +1720,7 @@ type HopBridgeChallengeResolvedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *HopBridgeChallengeResolvedIterator) Next() bool { +func (it *HopL1EthBridgeChallengeResolvedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1751,7 +1729,7 @@ func (it *HopBridgeChallengeResolvedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(HopBridgeChallengeResolved) + it.Event = new(HopL1EthBridgeChallengeResolved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1766,7 +1744,7 @@ func (it *HopBridgeChallengeResolvedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(HopBridgeChallengeResolved) + it.Event = new(HopL1EthBridgeChallengeResolved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1782,19 +1760,19 @@ func (it *HopBridgeChallengeResolvedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *HopBridgeChallengeResolvedIterator) Error() error { +func (it *HopL1EthBridgeChallengeResolvedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *HopBridgeChallengeResolvedIterator) Close() error { +func (it *HopL1EthBridgeChallengeResolvedIterator) Close() error { it.sub.Unsubscribe() return nil } -// HopBridgeChallengeResolved represents a ChallengeResolved event raised by the HopBridge contract. -type HopBridgeChallengeResolved struct { +// HopL1EthBridgeChallengeResolved represents a ChallengeResolved event raised by the HopL1EthBridge contract. +type HopL1EthBridgeChallengeResolved struct { TransferRootId [32]byte RootHash [32]byte OriginalAmount *big.Int @@ -1804,7 +1782,7 @@ type HopBridgeChallengeResolved struct { // FilterChallengeResolved is a free log retrieval operation binding the contract event 0x4a99228a8a6d774d261be57ab0ed833bb1bae1f22bbbd3d4767b75ad03fdddf7. // // Solidity: event ChallengeResolved(bytes32 indexed transferRootId, bytes32 indexed rootHash, uint256 originalAmount) -func (_HopBridge *HopBridgeFilterer) FilterChallengeResolved(opts *bind.FilterOpts, transferRootId [][32]byte, rootHash [][32]byte) (*HopBridgeChallengeResolvedIterator, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) FilterChallengeResolved(opts *bind.FilterOpts, transferRootId [][32]byte, rootHash [][32]byte) (*HopL1EthBridgeChallengeResolvedIterator, error) { var transferRootIdRule []interface{} for _, transferRootIdItem := range transferRootId { @@ -1815,17 +1793,17 @@ func (_HopBridge *HopBridgeFilterer) FilterChallengeResolved(opts *bind.FilterOp rootHashRule = append(rootHashRule, rootHashItem) } - logs, sub, err := _HopBridge.contract.FilterLogs(opts, "ChallengeResolved", transferRootIdRule, rootHashRule) + logs, sub, err := _HopL1EthBridge.contract.FilterLogs(opts, "ChallengeResolved", transferRootIdRule, rootHashRule) if err != nil { return nil, err } - return &HopBridgeChallengeResolvedIterator{contract: _HopBridge.contract, event: "ChallengeResolved", logs: logs, sub: sub}, nil + return &HopL1EthBridgeChallengeResolvedIterator{contract: _HopL1EthBridge.contract, event: "ChallengeResolved", logs: logs, sub: sub}, nil } // WatchChallengeResolved is a free log subscription operation binding the contract event 0x4a99228a8a6d774d261be57ab0ed833bb1bae1f22bbbd3d4767b75ad03fdddf7. // // Solidity: event ChallengeResolved(bytes32 indexed transferRootId, bytes32 indexed rootHash, uint256 originalAmount) -func (_HopBridge *HopBridgeFilterer) WatchChallengeResolved(opts *bind.WatchOpts, sink chan<- *HopBridgeChallengeResolved, transferRootId [][32]byte, rootHash [][32]byte) (event.Subscription, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) WatchChallengeResolved(opts *bind.WatchOpts, sink chan<- *HopL1EthBridgeChallengeResolved, transferRootId [][32]byte, rootHash [][32]byte) (event.Subscription, error) { var transferRootIdRule []interface{} for _, transferRootIdItem := range transferRootId { @@ -1836,7 +1814,7 @@ func (_HopBridge *HopBridgeFilterer) WatchChallengeResolved(opts *bind.WatchOpts rootHashRule = append(rootHashRule, rootHashItem) } - logs, sub, err := _HopBridge.contract.WatchLogs(opts, "ChallengeResolved", transferRootIdRule, rootHashRule) + logs, sub, err := _HopL1EthBridge.contract.WatchLogs(opts, "ChallengeResolved", transferRootIdRule, rootHashRule) if err != nil { return nil, err } @@ -1846,8 +1824,8 @@ func (_HopBridge *HopBridgeFilterer) WatchChallengeResolved(opts *bind.WatchOpts select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(HopBridgeChallengeResolved) - if err := _HopBridge.contract.UnpackLog(event, "ChallengeResolved", log); err != nil { + event := new(HopL1EthBridgeChallengeResolved) + if err := _HopL1EthBridge.contract.UnpackLog(event, "ChallengeResolved", log); err != nil { return err } event.Raw = log @@ -1871,18 +1849,18 @@ func (_HopBridge *HopBridgeFilterer) WatchChallengeResolved(opts *bind.WatchOpts // ParseChallengeResolved is a log parse operation binding the contract event 0x4a99228a8a6d774d261be57ab0ed833bb1bae1f22bbbd3d4767b75ad03fdddf7. // // Solidity: event ChallengeResolved(bytes32 indexed transferRootId, bytes32 indexed rootHash, uint256 originalAmount) -func (_HopBridge *HopBridgeFilterer) ParseChallengeResolved(log types.Log) (*HopBridgeChallengeResolved, error) { - event := new(HopBridgeChallengeResolved) - if err := _HopBridge.contract.UnpackLog(event, "ChallengeResolved", log); err != nil { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) ParseChallengeResolved(log types.Log) (*HopL1EthBridgeChallengeResolved, error) { + event := new(HopL1EthBridgeChallengeResolved) + if err := _HopL1EthBridge.contract.UnpackLog(event, "ChallengeResolved", log); err != nil { return nil, err } event.Raw = log return event, nil } -// HopBridgeMultipleWithdrawalsSettledIterator is returned from FilterMultipleWithdrawalsSettled and is used to iterate over the raw logs and unpacked data for MultipleWithdrawalsSettled events raised by the HopBridge contract. -type HopBridgeMultipleWithdrawalsSettledIterator struct { - Event *HopBridgeMultipleWithdrawalsSettled // Event containing the contract specifics and raw log +// HopL1EthBridgeMultipleWithdrawalsSettledIterator is returned from FilterMultipleWithdrawalsSettled and is used to iterate over the raw logs and unpacked data for MultipleWithdrawalsSettled events raised by the HopL1EthBridge contract. +type HopL1EthBridgeMultipleWithdrawalsSettledIterator struct { + Event *HopL1EthBridgeMultipleWithdrawalsSettled // 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 @@ -1896,7 +1874,7 @@ type HopBridgeMultipleWithdrawalsSettledIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *HopBridgeMultipleWithdrawalsSettledIterator) Next() bool { +func (it *HopL1EthBridgeMultipleWithdrawalsSettledIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1905,7 +1883,7 @@ func (it *HopBridgeMultipleWithdrawalsSettledIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(HopBridgeMultipleWithdrawalsSettled) + it.Event = new(HopL1EthBridgeMultipleWithdrawalsSettled) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1920,7 +1898,7 @@ func (it *HopBridgeMultipleWithdrawalsSettledIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(HopBridgeMultipleWithdrawalsSettled) + it.Event = new(HopL1EthBridgeMultipleWithdrawalsSettled) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1936,19 +1914,19 @@ func (it *HopBridgeMultipleWithdrawalsSettledIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *HopBridgeMultipleWithdrawalsSettledIterator) Error() error { +func (it *HopL1EthBridgeMultipleWithdrawalsSettledIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *HopBridgeMultipleWithdrawalsSettledIterator) Close() error { +func (it *HopL1EthBridgeMultipleWithdrawalsSettledIterator) Close() error { it.sub.Unsubscribe() return nil } -// HopBridgeMultipleWithdrawalsSettled represents a MultipleWithdrawalsSettled event raised by the HopBridge contract. -type HopBridgeMultipleWithdrawalsSettled struct { +// HopL1EthBridgeMultipleWithdrawalsSettled represents a MultipleWithdrawalsSettled event raised by the HopL1EthBridge contract. +type HopL1EthBridgeMultipleWithdrawalsSettled struct { Bonder common.Address RootHash [32]byte TotalBondsSettled *big.Int @@ -1958,7 +1936,7 @@ type HopBridgeMultipleWithdrawalsSettled struct { // FilterMultipleWithdrawalsSettled is a free log retrieval operation binding the contract event 0x78e830d08be9d5f957414c84d685c061ecbd8467be98b42ebb64f0118b57d2ff. // // Solidity: event MultipleWithdrawalsSettled(address indexed bonder, bytes32 indexed rootHash, uint256 totalBondsSettled) -func (_HopBridge *HopBridgeFilterer) FilterMultipleWithdrawalsSettled(opts *bind.FilterOpts, bonder []common.Address, rootHash [][32]byte) (*HopBridgeMultipleWithdrawalsSettledIterator, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) FilterMultipleWithdrawalsSettled(opts *bind.FilterOpts, bonder []common.Address, rootHash [][32]byte) (*HopL1EthBridgeMultipleWithdrawalsSettledIterator, error) { var bonderRule []interface{} for _, bonderItem := range bonder { @@ -1969,17 +1947,17 @@ func (_HopBridge *HopBridgeFilterer) FilterMultipleWithdrawalsSettled(opts *bind rootHashRule = append(rootHashRule, rootHashItem) } - logs, sub, err := _HopBridge.contract.FilterLogs(opts, "MultipleWithdrawalsSettled", bonderRule, rootHashRule) + logs, sub, err := _HopL1EthBridge.contract.FilterLogs(opts, "MultipleWithdrawalsSettled", bonderRule, rootHashRule) if err != nil { return nil, err } - return &HopBridgeMultipleWithdrawalsSettledIterator{contract: _HopBridge.contract, event: "MultipleWithdrawalsSettled", logs: logs, sub: sub}, nil + return &HopL1EthBridgeMultipleWithdrawalsSettledIterator{contract: _HopL1EthBridge.contract, event: "MultipleWithdrawalsSettled", logs: logs, sub: sub}, nil } // WatchMultipleWithdrawalsSettled is a free log subscription operation binding the contract event 0x78e830d08be9d5f957414c84d685c061ecbd8467be98b42ebb64f0118b57d2ff. // // Solidity: event MultipleWithdrawalsSettled(address indexed bonder, bytes32 indexed rootHash, uint256 totalBondsSettled) -func (_HopBridge *HopBridgeFilterer) WatchMultipleWithdrawalsSettled(opts *bind.WatchOpts, sink chan<- *HopBridgeMultipleWithdrawalsSettled, bonder []common.Address, rootHash [][32]byte) (event.Subscription, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) WatchMultipleWithdrawalsSettled(opts *bind.WatchOpts, sink chan<- *HopL1EthBridgeMultipleWithdrawalsSettled, bonder []common.Address, rootHash [][32]byte) (event.Subscription, error) { var bonderRule []interface{} for _, bonderItem := range bonder { @@ -1990,7 +1968,7 @@ func (_HopBridge *HopBridgeFilterer) WatchMultipleWithdrawalsSettled(opts *bind. rootHashRule = append(rootHashRule, rootHashItem) } - logs, sub, err := _HopBridge.contract.WatchLogs(opts, "MultipleWithdrawalsSettled", bonderRule, rootHashRule) + logs, sub, err := _HopL1EthBridge.contract.WatchLogs(opts, "MultipleWithdrawalsSettled", bonderRule, rootHashRule) if err != nil { return nil, err } @@ -2000,8 +1978,8 @@ func (_HopBridge *HopBridgeFilterer) WatchMultipleWithdrawalsSettled(opts *bind. select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(HopBridgeMultipleWithdrawalsSettled) - if err := _HopBridge.contract.UnpackLog(event, "MultipleWithdrawalsSettled", log); err != nil { + event := new(HopL1EthBridgeMultipleWithdrawalsSettled) + if err := _HopL1EthBridge.contract.UnpackLog(event, "MultipleWithdrawalsSettled", log); err != nil { return err } event.Raw = log @@ -2025,18 +2003,18 @@ func (_HopBridge *HopBridgeFilterer) WatchMultipleWithdrawalsSettled(opts *bind. // ParseMultipleWithdrawalsSettled is a log parse operation binding the contract event 0x78e830d08be9d5f957414c84d685c061ecbd8467be98b42ebb64f0118b57d2ff. // // Solidity: event MultipleWithdrawalsSettled(address indexed bonder, bytes32 indexed rootHash, uint256 totalBondsSettled) -func (_HopBridge *HopBridgeFilterer) ParseMultipleWithdrawalsSettled(log types.Log) (*HopBridgeMultipleWithdrawalsSettled, error) { - event := new(HopBridgeMultipleWithdrawalsSettled) - if err := _HopBridge.contract.UnpackLog(event, "MultipleWithdrawalsSettled", log); err != nil { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) ParseMultipleWithdrawalsSettled(log types.Log) (*HopL1EthBridgeMultipleWithdrawalsSettled, error) { + event := new(HopL1EthBridgeMultipleWithdrawalsSettled) + if err := _HopL1EthBridge.contract.UnpackLog(event, "MultipleWithdrawalsSettled", log); err != nil { return nil, err } event.Raw = log return event, nil } -// HopBridgeStakeIterator is returned from FilterStake and is used to iterate over the raw logs and unpacked data for Stake events raised by the HopBridge contract. -type HopBridgeStakeIterator struct { - Event *HopBridgeStake // Event containing the contract specifics and raw log +// HopL1EthBridgeStakeIterator is returned from FilterStake and is used to iterate over the raw logs and unpacked data for Stake events raised by the HopL1EthBridge contract. +type HopL1EthBridgeStakeIterator struct { + Event *HopL1EthBridgeStake // 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 @@ -2050,7 +2028,7 @@ type HopBridgeStakeIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *HopBridgeStakeIterator) Next() bool { +func (it *HopL1EthBridgeStakeIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -2059,7 +2037,7 @@ func (it *HopBridgeStakeIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(HopBridgeStake) + it.Event = new(HopL1EthBridgeStake) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2074,7 +2052,7 @@ func (it *HopBridgeStakeIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(HopBridgeStake) + it.Event = new(HopL1EthBridgeStake) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2090,19 +2068,19 @@ func (it *HopBridgeStakeIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *HopBridgeStakeIterator) Error() error { +func (it *HopL1EthBridgeStakeIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *HopBridgeStakeIterator) Close() error { +func (it *HopL1EthBridgeStakeIterator) Close() error { it.sub.Unsubscribe() return nil } -// HopBridgeStake represents a Stake event raised by the HopBridge contract. -type HopBridgeStake struct { +// HopL1EthBridgeStake represents a Stake event raised by the HopL1EthBridge contract. +type HopL1EthBridgeStake struct { Account common.Address Amount *big.Int Raw types.Log // Blockchain specific contextual infos @@ -2111,31 +2089,31 @@ type HopBridgeStake struct { // FilterStake is a free log retrieval operation binding the contract event 0xebedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a. // // Solidity: event Stake(address indexed account, uint256 amount) -func (_HopBridge *HopBridgeFilterer) FilterStake(opts *bind.FilterOpts, account []common.Address) (*HopBridgeStakeIterator, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) FilterStake(opts *bind.FilterOpts, account []common.Address) (*HopL1EthBridgeStakeIterator, error) { var accountRule []interface{} for _, accountItem := range account { accountRule = append(accountRule, accountItem) } - logs, sub, err := _HopBridge.contract.FilterLogs(opts, "Stake", accountRule) + logs, sub, err := _HopL1EthBridge.contract.FilterLogs(opts, "Stake", accountRule) if err != nil { return nil, err } - return &HopBridgeStakeIterator{contract: _HopBridge.contract, event: "Stake", logs: logs, sub: sub}, nil + return &HopL1EthBridgeStakeIterator{contract: _HopL1EthBridge.contract, event: "Stake", logs: logs, sub: sub}, nil } // WatchStake is a free log subscription operation binding the contract event 0xebedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a. // // Solidity: event Stake(address indexed account, uint256 amount) -func (_HopBridge *HopBridgeFilterer) WatchStake(opts *bind.WatchOpts, sink chan<- *HopBridgeStake, account []common.Address) (event.Subscription, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) WatchStake(opts *bind.WatchOpts, sink chan<- *HopL1EthBridgeStake, account []common.Address) (event.Subscription, error) { var accountRule []interface{} for _, accountItem := range account { accountRule = append(accountRule, accountItem) } - logs, sub, err := _HopBridge.contract.WatchLogs(opts, "Stake", accountRule) + logs, sub, err := _HopL1EthBridge.contract.WatchLogs(opts, "Stake", accountRule) if err != nil { return nil, err } @@ -2145,8 +2123,8 @@ func (_HopBridge *HopBridgeFilterer) WatchStake(opts *bind.WatchOpts, sink chan< select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(HopBridgeStake) - if err := _HopBridge.contract.UnpackLog(event, "Stake", log); err != nil { + event := new(HopL1EthBridgeStake) + if err := _HopL1EthBridge.contract.UnpackLog(event, "Stake", log); err != nil { return err } event.Raw = log @@ -2170,18 +2148,18 @@ func (_HopBridge *HopBridgeFilterer) WatchStake(opts *bind.WatchOpts, sink chan< // ParseStake is a log parse operation binding the contract event 0xebedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a. // // Solidity: event Stake(address indexed account, uint256 amount) -func (_HopBridge *HopBridgeFilterer) ParseStake(log types.Log) (*HopBridgeStake, error) { - event := new(HopBridgeStake) - if err := _HopBridge.contract.UnpackLog(event, "Stake", log); err != nil { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) ParseStake(log types.Log) (*HopL1EthBridgeStake, error) { + event := new(HopL1EthBridgeStake) + if err := _HopL1EthBridge.contract.UnpackLog(event, "Stake", log); err != nil { return nil, err } event.Raw = log return event, nil } -// HopBridgeTransferBondChallengedIterator is returned from FilterTransferBondChallenged and is used to iterate over the raw logs and unpacked data for TransferBondChallenged events raised by the HopBridge contract. -type HopBridgeTransferBondChallengedIterator struct { - Event *HopBridgeTransferBondChallenged // Event containing the contract specifics and raw log +// HopL1EthBridgeTransferBondChallengedIterator is returned from FilterTransferBondChallenged and is used to iterate over the raw logs and unpacked data for TransferBondChallenged events raised by the HopL1EthBridge contract. +type HopL1EthBridgeTransferBondChallengedIterator struct { + Event *HopL1EthBridgeTransferBondChallenged // 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 @@ -2195,7 +2173,7 @@ type HopBridgeTransferBondChallengedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *HopBridgeTransferBondChallengedIterator) Next() bool { +func (it *HopL1EthBridgeTransferBondChallengedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -2204,7 +2182,7 @@ func (it *HopBridgeTransferBondChallengedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(HopBridgeTransferBondChallenged) + it.Event = new(HopL1EthBridgeTransferBondChallenged) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2219,7 +2197,7 @@ func (it *HopBridgeTransferBondChallengedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(HopBridgeTransferBondChallenged) + it.Event = new(HopL1EthBridgeTransferBondChallenged) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2235,19 +2213,19 @@ func (it *HopBridgeTransferBondChallengedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *HopBridgeTransferBondChallengedIterator) Error() error { +func (it *HopL1EthBridgeTransferBondChallengedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *HopBridgeTransferBondChallengedIterator) Close() error { +func (it *HopL1EthBridgeTransferBondChallengedIterator) Close() error { it.sub.Unsubscribe() return nil } -// HopBridgeTransferBondChallenged represents a TransferBondChallenged event raised by the HopBridge contract. -type HopBridgeTransferBondChallenged struct { +// HopL1EthBridgeTransferBondChallenged represents a TransferBondChallenged event raised by the HopL1EthBridge contract. +type HopL1EthBridgeTransferBondChallenged struct { TransferRootId [32]byte RootHash [32]byte OriginalAmount *big.Int @@ -2257,7 +2235,7 @@ type HopBridgeTransferBondChallenged struct { // FilterTransferBondChallenged is a free log retrieval operation binding the contract event 0xec2697dcba539a0ac947cdf1f6d0b6314c065429eca8be2435859b10209d4c27. // // Solidity: event TransferBondChallenged(bytes32 indexed transferRootId, bytes32 indexed rootHash, uint256 originalAmount) -func (_HopBridge *HopBridgeFilterer) FilterTransferBondChallenged(opts *bind.FilterOpts, transferRootId [][32]byte, rootHash [][32]byte) (*HopBridgeTransferBondChallengedIterator, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) FilterTransferBondChallenged(opts *bind.FilterOpts, transferRootId [][32]byte, rootHash [][32]byte) (*HopL1EthBridgeTransferBondChallengedIterator, error) { var transferRootIdRule []interface{} for _, transferRootIdItem := range transferRootId { @@ -2268,17 +2246,17 @@ func (_HopBridge *HopBridgeFilterer) FilterTransferBondChallenged(opts *bind.Fil rootHashRule = append(rootHashRule, rootHashItem) } - logs, sub, err := _HopBridge.contract.FilterLogs(opts, "TransferBondChallenged", transferRootIdRule, rootHashRule) + logs, sub, err := _HopL1EthBridge.contract.FilterLogs(opts, "TransferBondChallenged", transferRootIdRule, rootHashRule) if err != nil { return nil, err } - return &HopBridgeTransferBondChallengedIterator{contract: _HopBridge.contract, event: "TransferBondChallenged", logs: logs, sub: sub}, nil + return &HopL1EthBridgeTransferBondChallengedIterator{contract: _HopL1EthBridge.contract, event: "TransferBondChallenged", logs: logs, sub: sub}, nil } // WatchTransferBondChallenged is a free log subscription operation binding the contract event 0xec2697dcba539a0ac947cdf1f6d0b6314c065429eca8be2435859b10209d4c27. // // Solidity: event TransferBondChallenged(bytes32 indexed transferRootId, bytes32 indexed rootHash, uint256 originalAmount) -func (_HopBridge *HopBridgeFilterer) WatchTransferBondChallenged(opts *bind.WatchOpts, sink chan<- *HopBridgeTransferBondChallenged, transferRootId [][32]byte, rootHash [][32]byte) (event.Subscription, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) WatchTransferBondChallenged(opts *bind.WatchOpts, sink chan<- *HopL1EthBridgeTransferBondChallenged, transferRootId [][32]byte, rootHash [][32]byte) (event.Subscription, error) { var transferRootIdRule []interface{} for _, transferRootIdItem := range transferRootId { @@ -2289,7 +2267,7 @@ func (_HopBridge *HopBridgeFilterer) WatchTransferBondChallenged(opts *bind.Watc rootHashRule = append(rootHashRule, rootHashItem) } - logs, sub, err := _HopBridge.contract.WatchLogs(opts, "TransferBondChallenged", transferRootIdRule, rootHashRule) + logs, sub, err := _HopL1EthBridge.contract.WatchLogs(opts, "TransferBondChallenged", transferRootIdRule, rootHashRule) if err != nil { return nil, err } @@ -2299,8 +2277,8 @@ func (_HopBridge *HopBridgeFilterer) WatchTransferBondChallenged(opts *bind.Watc select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(HopBridgeTransferBondChallenged) - if err := _HopBridge.contract.UnpackLog(event, "TransferBondChallenged", log); err != nil { + event := new(HopL1EthBridgeTransferBondChallenged) + if err := _HopL1EthBridge.contract.UnpackLog(event, "TransferBondChallenged", log); err != nil { return err } event.Raw = log @@ -2324,18 +2302,18 @@ func (_HopBridge *HopBridgeFilterer) WatchTransferBondChallenged(opts *bind.Watc // ParseTransferBondChallenged is a log parse operation binding the contract event 0xec2697dcba539a0ac947cdf1f6d0b6314c065429eca8be2435859b10209d4c27. // // Solidity: event TransferBondChallenged(bytes32 indexed transferRootId, bytes32 indexed rootHash, uint256 originalAmount) -func (_HopBridge *HopBridgeFilterer) ParseTransferBondChallenged(log types.Log) (*HopBridgeTransferBondChallenged, error) { - event := new(HopBridgeTransferBondChallenged) - if err := _HopBridge.contract.UnpackLog(event, "TransferBondChallenged", log); err != nil { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) ParseTransferBondChallenged(log types.Log) (*HopL1EthBridgeTransferBondChallenged, error) { + event := new(HopL1EthBridgeTransferBondChallenged) + if err := _HopL1EthBridge.contract.UnpackLog(event, "TransferBondChallenged", log); err != nil { return nil, err } event.Raw = log return event, nil } -// HopBridgeTransferRootBondedIterator is returned from FilterTransferRootBonded and is used to iterate over the raw logs and unpacked data for TransferRootBonded events raised by the HopBridge contract. -type HopBridgeTransferRootBondedIterator struct { - Event *HopBridgeTransferRootBonded // Event containing the contract specifics and raw log +// HopL1EthBridgeTransferRootBondedIterator is returned from FilterTransferRootBonded and is used to iterate over the raw logs and unpacked data for TransferRootBonded events raised by the HopL1EthBridge contract. +type HopL1EthBridgeTransferRootBondedIterator struct { + Event *HopL1EthBridgeTransferRootBonded // 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 @@ -2349,7 +2327,7 @@ type HopBridgeTransferRootBondedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *HopBridgeTransferRootBondedIterator) Next() bool { +func (it *HopL1EthBridgeTransferRootBondedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -2358,7 +2336,7 @@ func (it *HopBridgeTransferRootBondedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(HopBridgeTransferRootBonded) + it.Event = new(HopL1EthBridgeTransferRootBonded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2373,7 +2351,7 @@ func (it *HopBridgeTransferRootBondedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(HopBridgeTransferRootBonded) + it.Event = new(HopL1EthBridgeTransferRootBonded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2389,19 +2367,19 @@ func (it *HopBridgeTransferRootBondedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *HopBridgeTransferRootBondedIterator) Error() error { +func (it *HopL1EthBridgeTransferRootBondedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *HopBridgeTransferRootBondedIterator) Close() error { +func (it *HopL1EthBridgeTransferRootBondedIterator) Close() error { it.sub.Unsubscribe() return nil } -// HopBridgeTransferRootBonded represents a TransferRootBonded event raised by the HopBridge contract. -type HopBridgeTransferRootBonded struct { +// HopL1EthBridgeTransferRootBonded represents a TransferRootBonded event raised by the HopL1EthBridge contract. +type HopL1EthBridgeTransferRootBonded struct { Root [32]byte Amount *big.Int Raw types.Log // Blockchain specific contextual infos @@ -2410,31 +2388,31 @@ type HopBridgeTransferRootBonded struct { // FilterTransferRootBonded is a free log retrieval operation binding the contract event 0xa57b3e1f3af9eca02201028629700658608222c365064584cfe65d9630ef4f7b. // // Solidity: event TransferRootBonded(bytes32 indexed root, uint256 amount) -func (_HopBridge *HopBridgeFilterer) FilterTransferRootBonded(opts *bind.FilterOpts, root [][32]byte) (*HopBridgeTransferRootBondedIterator, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) FilterTransferRootBonded(opts *bind.FilterOpts, root [][32]byte) (*HopL1EthBridgeTransferRootBondedIterator, error) { var rootRule []interface{} for _, rootItem := range root { rootRule = append(rootRule, rootItem) } - logs, sub, err := _HopBridge.contract.FilterLogs(opts, "TransferRootBonded", rootRule) + logs, sub, err := _HopL1EthBridge.contract.FilterLogs(opts, "TransferRootBonded", rootRule) if err != nil { return nil, err } - return &HopBridgeTransferRootBondedIterator{contract: _HopBridge.contract, event: "TransferRootBonded", logs: logs, sub: sub}, nil + return &HopL1EthBridgeTransferRootBondedIterator{contract: _HopL1EthBridge.contract, event: "TransferRootBonded", logs: logs, sub: sub}, nil } // WatchTransferRootBonded is a free log subscription operation binding the contract event 0xa57b3e1f3af9eca02201028629700658608222c365064584cfe65d9630ef4f7b. // // Solidity: event TransferRootBonded(bytes32 indexed root, uint256 amount) -func (_HopBridge *HopBridgeFilterer) WatchTransferRootBonded(opts *bind.WatchOpts, sink chan<- *HopBridgeTransferRootBonded, root [][32]byte) (event.Subscription, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) WatchTransferRootBonded(opts *bind.WatchOpts, sink chan<- *HopL1EthBridgeTransferRootBonded, root [][32]byte) (event.Subscription, error) { var rootRule []interface{} for _, rootItem := range root { rootRule = append(rootRule, rootItem) } - logs, sub, err := _HopBridge.contract.WatchLogs(opts, "TransferRootBonded", rootRule) + logs, sub, err := _HopL1EthBridge.contract.WatchLogs(opts, "TransferRootBonded", rootRule) if err != nil { return nil, err } @@ -2444,8 +2422,8 @@ func (_HopBridge *HopBridgeFilterer) WatchTransferRootBonded(opts *bind.WatchOpt select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(HopBridgeTransferRootBonded) - if err := _HopBridge.contract.UnpackLog(event, "TransferRootBonded", log); err != nil { + event := new(HopL1EthBridgeTransferRootBonded) + if err := _HopL1EthBridge.contract.UnpackLog(event, "TransferRootBonded", log); err != nil { return err } event.Raw = log @@ -2469,18 +2447,18 @@ func (_HopBridge *HopBridgeFilterer) WatchTransferRootBonded(opts *bind.WatchOpt // ParseTransferRootBonded is a log parse operation binding the contract event 0xa57b3e1f3af9eca02201028629700658608222c365064584cfe65d9630ef4f7b. // // Solidity: event TransferRootBonded(bytes32 indexed root, uint256 amount) -func (_HopBridge *HopBridgeFilterer) ParseTransferRootBonded(log types.Log) (*HopBridgeTransferRootBonded, error) { - event := new(HopBridgeTransferRootBonded) - if err := _HopBridge.contract.UnpackLog(event, "TransferRootBonded", log); err != nil { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) ParseTransferRootBonded(log types.Log) (*HopL1EthBridgeTransferRootBonded, error) { + event := new(HopL1EthBridgeTransferRootBonded) + if err := _HopL1EthBridge.contract.UnpackLog(event, "TransferRootBonded", log); err != nil { return nil, err } event.Raw = log return event, nil } -// HopBridgeTransferRootConfirmedIterator is returned from FilterTransferRootConfirmed and is used to iterate over the raw logs and unpacked data for TransferRootConfirmed events raised by the HopBridge contract. -type HopBridgeTransferRootConfirmedIterator struct { - Event *HopBridgeTransferRootConfirmed // Event containing the contract specifics and raw log +// HopL1EthBridgeTransferRootConfirmedIterator is returned from FilterTransferRootConfirmed and is used to iterate over the raw logs and unpacked data for TransferRootConfirmed events raised by the HopL1EthBridge contract. +type HopL1EthBridgeTransferRootConfirmedIterator struct { + Event *HopL1EthBridgeTransferRootConfirmed // 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 @@ -2494,7 +2472,7 @@ type HopBridgeTransferRootConfirmedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *HopBridgeTransferRootConfirmedIterator) Next() bool { +func (it *HopL1EthBridgeTransferRootConfirmedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -2503,7 +2481,7 @@ func (it *HopBridgeTransferRootConfirmedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(HopBridgeTransferRootConfirmed) + it.Event = new(HopL1EthBridgeTransferRootConfirmed) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2518,7 +2496,7 @@ func (it *HopBridgeTransferRootConfirmedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(HopBridgeTransferRootConfirmed) + it.Event = new(HopL1EthBridgeTransferRootConfirmed) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2534,19 +2512,19 @@ func (it *HopBridgeTransferRootConfirmedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *HopBridgeTransferRootConfirmedIterator) Error() error { +func (it *HopL1EthBridgeTransferRootConfirmedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *HopBridgeTransferRootConfirmedIterator) Close() error { +func (it *HopL1EthBridgeTransferRootConfirmedIterator) Close() error { it.sub.Unsubscribe() return nil } -// HopBridgeTransferRootConfirmed represents a TransferRootConfirmed event raised by the HopBridge contract. -type HopBridgeTransferRootConfirmed struct { +// HopL1EthBridgeTransferRootConfirmed represents a TransferRootConfirmed event raised by the HopL1EthBridge contract. +type HopL1EthBridgeTransferRootConfirmed struct { OriginChainId *big.Int DestinationChainId *big.Int RootHash [32]byte @@ -2557,7 +2535,7 @@ type HopBridgeTransferRootConfirmed struct { // FilterTransferRootConfirmed is a free log retrieval operation binding the contract event 0xfdfb0eefa96935b8a8c0edf528e125dc6f3934fdbbfce31b38967e8ff413dccd. // // Solidity: event TransferRootConfirmed(uint256 indexed originChainId, uint256 indexed destinationChainId, bytes32 indexed rootHash, uint256 totalAmount) -func (_HopBridge *HopBridgeFilterer) FilterTransferRootConfirmed(opts *bind.FilterOpts, originChainId []*big.Int, destinationChainId []*big.Int, rootHash [][32]byte) (*HopBridgeTransferRootConfirmedIterator, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) FilterTransferRootConfirmed(opts *bind.FilterOpts, originChainId []*big.Int, destinationChainId []*big.Int, rootHash [][32]byte) (*HopL1EthBridgeTransferRootConfirmedIterator, error) { var originChainIdRule []interface{} for _, originChainIdItem := range originChainId { @@ -2572,17 +2550,17 @@ func (_HopBridge *HopBridgeFilterer) FilterTransferRootConfirmed(opts *bind.Filt rootHashRule = append(rootHashRule, rootHashItem) } - logs, sub, err := _HopBridge.contract.FilterLogs(opts, "TransferRootConfirmed", originChainIdRule, destinationChainIdRule, rootHashRule) + logs, sub, err := _HopL1EthBridge.contract.FilterLogs(opts, "TransferRootConfirmed", originChainIdRule, destinationChainIdRule, rootHashRule) if err != nil { return nil, err } - return &HopBridgeTransferRootConfirmedIterator{contract: _HopBridge.contract, event: "TransferRootConfirmed", logs: logs, sub: sub}, nil + return &HopL1EthBridgeTransferRootConfirmedIterator{contract: _HopL1EthBridge.contract, event: "TransferRootConfirmed", logs: logs, sub: sub}, nil } // WatchTransferRootConfirmed is a free log subscription operation binding the contract event 0xfdfb0eefa96935b8a8c0edf528e125dc6f3934fdbbfce31b38967e8ff413dccd. // // Solidity: event TransferRootConfirmed(uint256 indexed originChainId, uint256 indexed destinationChainId, bytes32 indexed rootHash, uint256 totalAmount) -func (_HopBridge *HopBridgeFilterer) WatchTransferRootConfirmed(opts *bind.WatchOpts, sink chan<- *HopBridgeTransferRootConfirmed, originChainId []*big.Int, destinationChainId []*big.Int, rootHash [][32]byte) (event.Subscription, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) WatchTransferRootConfirmed(opts *bind.WatchOpts, sink chan<- *HopL1EthBridgeTransferRootConfirmed, originChainId []*big.Int, destinationChainId []*big.Int, rootHash [][32]byte) (event.Subscription, error) { var originChainIdRule []interface{} for _, originChainIdItem := range originChainId { @@ -2597,7 +2575,7 @@ func (_HopBridge *HopBridgeFilterer) WatchTransferRootConfirmed(opts *bind.Watch rootHashRule = append(rootHashRule, rootHashItem) } - logs, sub, err := _HopBridge.contract.WatchLogs(opts, "TransferRootConfirmed", originChainIdRule, destinationChainIdRule, rootHashRule) + logs, sub, err := _HopL1EthBridge.contract.WatchLogs(opts, "TransferRootConfirmed", originChainIdRule, destinationChainIdRule, rootHashRule) if err != nil { return nil, err } @@ -2607,8 +2585,8 @@ func (_HopBridge *HopBridgeFilterer) WatchTransferRootConfirmed(opts *bind.Watch select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(HopBridgeTransferRootConfirmed) - if err := _HopBridge.contract.UnpackLog(event, "TransferRootConfirmed", log); err != nil { + event := new(HopL1EthBridgeTransferRootConfirmed) + if err := _HopL1EthBridge.contract.UnpackLog(event, "TransferRootConfirmed", log); err != nil { return err } event.Raw = log @@ -2632,18 +2610,18 @@ func (_HopBridge *HopBridgeFilterer) WatchTransferRootConfirmed(opts *bind.Watch // ParseTransferRootConfirmed is a log parse operation binding the contract event 0xfdfb0eefa96935b8a8c0edf528e125dc6f3934fdbbfce31b38967e8ff413dccd. // // Solidity: event TransferRootConfirmed(uint256 indexed originChainId, uint256 indexed destinationChainId, bytes32 indexed rootHash, uint256 totalAmount) -func (_HopBridge *HopBridgeFilterer) ParseTransferRootConfirmed(log types.Log) (*HopBridgeTransferRootConfirmed, error) { - event := new(HopBridgeTransferRootConfirmed) - if err := _HopBridge.contract.UnpackLog(event, "TransferRootConfirmed", log); err != nil { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) ParseTransferRootConfirmed(log types.Log) (*HopL1EthBridgeTransferRootConfirmed, error) { + event := new(HopL1EthBridgeTransferRootConfirmed) + if err := _HopL1EthBridge.contract.UnpackLog(event, "TransferRootConfirmed", log); err != nil { return nil, err } event.Raw = log return event, nil } -// HopBridgeTransferRootSetIterator is returned from FilterTransferRootSet and is used to iterate over the raw logs and unpacked data for TransferRootSet events raised by the HopBridge contract. -type HopBridgeTransferRootSetIterator struct { - Event *HopBridgeTransferRootSet // Event containing the contract specifics and raw log +// HopL1EthBridgeTransferRootSetIterator is returned from FilterTransferRootSet and is used to iterate over the raw logs and unpacked data for TransferRootSet events raised by the HopL1EthBridge contract. +type HopL1EthBridgeTransferRootSetIterator struct { + Event *HopL1EthBridgeTransferRootSet // 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 @@ -2657,7 +2635,7 @@ type HopBridgeTransferRootSetIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *HopBridgeTransferRootSetIterator) Next() bool { +func (it *HopL1EthBridgeTransferRootSetIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -2666,7 +2644,7 @@ func (it *HopBridgeTransferRootSetIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(HopBridgeTransferRootSet) + it.Event = new(HopL1EthBridgeTransferRootSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2681,7 +2659,7 @@ func (it *HopBridgeTransferRootSetIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(HopBridgeTransferRootSet) + it.Event = new(HopL1EthBridgeTransferRootSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2697,19 +2675,19 @@ func (it *HopBridgeTransferRootSetIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *HopBridgeTransferRootSetIterator) Error() error { +func (it *HopL1EthBridgeTransferRootSetIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *HopBridgeTransferRootSetIterator) Close() error { +func (it *HopL1EthBridgeTransferRootSetIterator) Close() error { it.sub.Unsubscribe() return nil } -// HopBridgeTransferRootSet represents a TransferRootSet event raised by the HopBridge contract. -type HopBridgeTransferRootSet struct { +// HopL1EthBridgeTransferRootSet represents a TransferRootSet event raised by the HopL1EthBridge contract. +type HopL1EthBridgeTransferRootSet struct { RootHash [32]byte TotalAmount *big.Int Raw types.Log // Blockchain specific contextual infos @@ -2718,31 +2696,31 @@ type HopBridgeTransferRootSet struct { // FilterTransferRootSet is a free log retrieval operation binding the contract event 0xb33d2162aead99dab59e77a7a67ea025b776bf8ca8079e132afdf9b23e03bd42. // // Solidity: event TransferRootSet(bytes32 indexed rootHash, uint256 totalAmount) -func (_HopBridge *HopBridgeFilterer) FilterTransferRootSet(opts *bind.FilterOpts, rootHash [][32]byte) (*HopBridgeTransferRootSetIterator, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) FilterTransferRootSet(opts *bind.FilterOpts, rootHash [][32]byte) (*HopL1EthBridgeTransferRootSetIterator, error) { var rootHashRule []interface{} for _, rootHashItem := range rootHash { rootHashRule = append(rootHashRule, rootHashItem) } - logs, sub, err := _HopBridge.contract.FilterLogs(opts, "TransferRootSet", rootHashRule) + logs, sub, err := _HopL1EthBridge.contract.FilterLogs(opts, "TransferRootSet", rootHashRule) if err != nil { return nil, err } - return &HopBridgeTransferRootSetIterator{contract: _HopBridge.contract, event: "TransferRootSet", logs: logs, sub: sub}, nil + return &HopL1EthBridgeTransferRootSetIterator{contract: _HopL1EthBridge.contract, event: "TransferRootSet", logs: logs, sub: sub}, nil } // WatchTransferRootSet is a free log subscription operation binding the contract event 0xb33d2162aead99dab59e77a7a67ea025b776bf8ca8079e132afdf9b23e03bd42. // // Solidity: event TransferRootSet(bytes32 indexed rootHash, uint256 totalAmount) -func (_HopBridge *HopBridgeFilterer) WatchTransferRootSet(opts *bind.WatchOpts, sink chan<- *HopBridgeTransferRootSet, rootHash [][32]byte) (event.Subscription, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) WatchTransferRootSet(opts *bind.WatchOpts, sink chan<- *HopL1EthBridgeTransferRootSet, rootHash [][32]byte) (event.Subscription, error) { var rootHashRule []interface{} for _, rootHashItem := range rootHash { rootHashRule = append(rootHashRule, rootHashItem) } - logs, sub, err := _HopBridge.contract.WatchLogs(opts, "TransferRootSet", rootHashRule) + logs, sub, err := _HopL1EthBridge.contract.WatchLogs(opts, "TransferRootSet", rootHashRule) if err != nil { return nil, err } @@ -2752,8 +2730,8 @@ func (_HopBridge *HopBridgeFilterer) WatchTransferRootSet(opts *bind.WatchOpts, select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(HopBridgeTransferRootSet) - if err := _HopBridge.contract.UnpackLog(event, "TransferRootSet", log); err != nil { + event := new(HopL1EthBridgeTransferRootSet) + if err := _HopL1EthBridge.contract.UnpackLog(event, "TransferRootSet", log); err != nil { return err } event.Raw = log @@ -2777,18 +2755,18 @@ func (_HopBridge *HopBridgeFilterer) WatchTransferRootSet(opts *bind.WatchOpts, // ParseTransferRootSet is a log parse operation binding the contract event 0xb33d2162aead99dab59e77a7a67ea025b776bf8ca8079e132afdf9b23e03bd42. // // Solidity: event TransferRootSet(bytes32 indexed rootHash, uint256 totalAmount) -func (_HopBridge *HopBridgeFilterer) ParseTransferRootSet(log types.Log) (*HopBridgeTransferRootSet, error) { - event := new(HopBridgeTransferRootSet) - if err := _HopBridge.contract.UnpackLog(event, "TransferRootSet", log); err != nil { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) ParseTransferRootSet(log types.Log) (*HopL1EthBridgeTransferRootSet, error) { + event := new(HopL1EthBridgeTransferRootSet) + if err := _HopL1EthBridge.contract.UnpackLog(event, "TransferRootSet", log); err != nil { return nil, err } event.Raw = log return event, nil } -// HopBridgeTransferSentToL2Iterator is returned from FilterTransferSentToL2 and is used to iterate over the raw logs and unpacked data for TransferSentToL2 events raised by the HopBridge contract. -type HopBridgeTransferSentToL2Iterator struct { - Event *HopBridgeTransferSentToL2 // Event containing the contract specifics and raw log +// HopL1EthBridgeTransferSentToL2Iterator is returned from FilterTransferSentToL2 and is used to iterate over the raw logs and unpacked data for TransferSentToL2 events raised by the HopL1EthBridge contract. +type HopL1EthBridgeTransferSentToL2Iterator struct { + Event *HopL1EthBridgeTransferSentToL2 // 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 @@ -2802,7 +2780,7 @@ type HopBridgeTransferSentToL2Iterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *HopBridgeTransferSentToL2Iterator) Next() bool { +func (it *HopL1EthBridgeTransferSentToL2Iterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -2811,7 +2789,7 @@ func (it *HopBridgeTransferSentToL2Iterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(HopBridgeTransferSentToL2) + it.Event = new(HopL1EthBridgeTransferSentToL2) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2826,7 +2804,7 @@ func (it *HopBridgeTransferSentToL2Iterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(HopBridgeTransferSentToL2) + it.Event = new(HopL1EthBridgeTransferSentToL2) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2842,19 +2820,19 @@ func (it *HopBridgeTransferSentToL2Iterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *HopBridgeTransferSentToL2Iterator) Error() error { +func (it *HopL1EthBridgeTransferSentToL2Iterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *HopBridgeTransferSentToL2Iterator) Close() error { +func (it *HopL1EthBridgeTransferSentToL2Iterator) Close() error { it.sub.Unsubscribe() return nil } -// HopBridgeTransferSentToL2 represents a TransferSentToL2 event raised by the HopBridge contract. -type HopBridgeTransferSentToL2 struct { +// HopL1EthBridgeTransferSentToL2 represents a TransferSentToL2 event raised by the HopL1EthBridge contract. +type HopL1EthBridgeTransferSentToL2 struct { ChainId *big.Int Recipient common.Address Amount *big.Int @@ -2868,7 +2846,7 @@ type HopBridgeTransferSentToL2 struct { // FilterTransferSentToL2 is a free log retrieval operation binding the contract event 0x0a0607688c86ec1775abcdbab7b33a3a35a6c9cde677c9be880150c231cc6b0b. // // Solidity: event TransferSentToL2(uint256 indexed chainId, address indexed recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address indexed relayer, uint256 relayerFee) -func (_HopBridge *HopBridgeFilterer) FilterTransferSentToL2(opts *bind.FilterOpts, chainId []*big.Int, recipient []common.Address, relayer []common.Address) (*HopBridgeTransferSentToL2Iterator, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) FilterTransferSentToL2(opts *bind.FilterOpts, chainId []*big.Int, recipient []common.Address, relayer []common.Address) (*HopL1EthBridgeTransferSentToL2Iterator, error) { var chainIdRule []interface{} for _, chainIdItem := range chainId { @@ -2884,17 +2862,17 @@ func (_HopBridge *HopBridgeFilterer) FilterTransferSentToL2(opts *bind.FilterOpt relayerRule = append(relayerRule, relayerItem) } - logs, sub, err := _HopBridge.contract.FilterLogs(opts, "TransferSentToL2", chainIdRule, recipientRule, relayerRule) + logs, sub, err := _HopL1EthBridge.contract.FilterLogs(opts, "TransferSentToL2", chainIdRule, recipientRule, relayerRule) if err != nil { return nil, err } - return &HopBridgeTransferSentToL2Iterator{contract: _HopBridge.contract, event: "TransferSentToL2", logs: logs, sub: sub}, nil + return &HopL1EthBridgeTransferSentToL2Iterator{contract: _HopL1EthBridge.contract, event: "TransferSentToL2", logs: logs, sub: sub}, nil } // WatchTransferSentToL2 is a free log subscription operation binding the contract event 0x0a0607688c86ec1775abcdbab7b33a3a35a6c9cde677c9be880150c231cc6b0b. // // Solidity: event TransferSentToL2(uint256 indexed chainId, address indexed recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address indexed relayer, uint256 relayerFee) -func (_HopBridge *HopBridgeFilterer) WatchTransferSentToL2(opts *bind.WatchOpts, sink chan<- *HopBridgeTransferSentToL2, chainId []*big.Int, recipient []common.Address, relayer []common.Address) (event.Subscription, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) WatchTransferSentToL2(opts *bind.WatchOpts, sink chan<- *HopL1EthBridgeTransferSentToL2, chainId []*big.Int, recipient []common.Address, relayer []common.Address) (event.Subscription, error) { var chainIdRule []interface{} for _, chainIdItem := range chainId { @@ -2910,7 +2888,7 @@ func (_HopBridge *HopBridgeFilterer) WatchTransferSentToL2(opts *bind.WatchOpts, relayerRule = append(relayerRule, relayerItem) } - logs, sub, err := _HopBridge.contract.WatchLogs(opts, "TransferSentToL2", chainIdRule, recipientRule, relayerRule) + logs, sub, err := _HopL1EthBridge.contract.WatchLogs(opts, "TransferSentToL2", chainIdRule, recipientRule, relayerRule) if err != nil { return nil, err } @@ -2920,8 +2898,8 @@ func (_HopBridge *HopBridgeFilterer) WatchTransferSentToL2(opts *bind.WatchOpts, select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(HopBridgeTransferSentToL2) - if err := _HopBridge.contract.UnpackLog(event, "TransferSentToL2", log); err != nil { + event := new(HopL1EthBridgeTransferSentToL2) + if err := _HopL1EthBridge.contract.UnpackLog(event, "TransferSentToL2", log); err != nil { return err } event.Raw = log @@ -2945,18 +2923,18 @@ func (_HopBridge *HopBridgeFilterer) WatchTransferSentToL2(opts *bind.WatchOpts, // ParseTransferSentToL2 is a log parse operation binding the contract event 0x0a0607688c86ec1775abcdbab7b33a3a35a6c9cde677c9be880150c231cc6b0b. // // Solidity: event TransferSentToL2(uint256 indexed chainId, address indexed recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address indexed relayer, uint256 relayerFee) -func (_HopBridge *HopBridgeFilterer) ParseTransferSentToL2(log types.Log) (*HopBridgeTransferSentToL2, error) { - event := new(HopBridgeTransferSentToL2) - if err := _HopBridge.contract.UnpackLog(event, "TransferSentToL2", log); err != nil { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) ParseTransferSentToL2(log types.Log) (*HopL1EthBridgeTransferSentToL2, error) { + event := new(HopL1EthBridgeTransferSentToL2) + if err := _HopL1EthBridge.contract.UnpackLog(event, "TransferSentToL2", log); err != nil { return nil, err } event.Raw = log return event, nil } -// HopBridgeUnstakeIterator is returned from FilterUnstake and is used to iterate over the raw logs and unpacked data for Unstake events raised by the HopBridge contract. -type HopBridgeUnstakeIterator struct { - Event *HopBridgeUnstake // Event containing the contract specifics and raw log +// HopL1EthBridgeUnstakeIterator is returned from FilterUnstake and is used to iterate over the raw logs and unpacked data for Unstake events raised by the HopL1EthBridge contract. +type HopL1EthBridgeUnstakeIterator struct { + Event *HopL1EthBridgeUnstake // 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 @@ -2970,7 +2948,7 @@ type HopBridgeUnstakeIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *HopBridgeUnstakeIterator) Next() bool { +func (it *HopL1EthBridgeUnstakeIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -2979,7 +2957,7 @@ func (it *HopBridgeUnstakeIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(HopBridgeUnstake) + it.Event = new(HopL1EthBridgeUnstake) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2994,7 +2972,7 @@ func (it *HopBridgeUnstakeIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(HopBridgeUnstake) + it.Event = new(HopL1EthBridgeUnstake) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3010,19 +2988,19 @@ func (it *HopBridgeUnstakeIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *HopBridgeUnstakeIterator) Error() error { +func (it *HopL1EthBridgeUnstakeIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *HopBridgeUnstakeIterator) Close() error { +func (it *HopL1EthBridgeUnstakeIterator) Close() error { it.sub.Unsubscribe() return nil } -// HopBridgeUnstake represents a Unstake event raised by the HopBridge contract. -type HopBridgeUnstake struct { +// HopL1EthBridgeUnstake represents a Unstake event raised by the HopL1EthBridge contract. +type HopL1EthBridgeUnstake struct { Account common.Address Amount *big.Int Raw types.Log // Blockchain specific contextual infos @@ -3031,31 +3009,31 @@ type HopBridgeUnstake struct { // FilterUnstake is a free log retrieval operation binding the contract event 0x85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd. // // Solidity: event Unstake(address indexed account, uint256 amount) -func (_HopBridge *HopBridgeFilterer) FilterUnstake(opts *bind.FilterOpts, account []common.Address) (*HopBridgeUnstakeIterator, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) FilterUnstake(opts *bind.FilterOpts, account []common.Address) (*HopL1EthBridgeUnstakeIterator, error) { var accountRule []interface{} for _, accountItem := range account { accountRule = append(accountRule, accountItem) } - logs, sub, err := _HopBridge.contract.FilterLogs(opts, "Unstake", accountRule) + logs, sub, err := _HopL1EthBridge.contract.FilterLogs(opts, "Unstake", accountRule) if err != nil { return nil, err } - return &HopBridgeUnstakeIterator{contract: _HopBridge.contract, event: "Unstake", logs: logs, sub: sub}, nil + return &HopL1EthBridgeUnstakeIterator{contract: _HopL1EthBridge.contract, event: "Unstake", logs: logs, sub: sub}, nil } // WatchUnstake is a free log subscription operation binding the contract event 0x85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd. // // Solidity: event Unstake(address indexed account, uint256 amount) -func (_HopBridge *HopBridgeFilterer) WatchUnstake(opts *bind.WatchOpts, sink chan<- *HopBridgeUnstake, account []common.Address) (event.Subscription, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) WatchUnstake(opts *bind.WatchOpts, sink chan<- *HopL1EthBridgeUnstake, account []common.Address) (event.Subscription, error) { var accountRule []interface{} for _, accountItem := range account { accountRule = append(accountRule, accountItem) } - logs, sub, err := _HopBridge.contract.WatchLogs(opts, "Unstake", accountRule) + logs, sub, err := _HopL1EthBridge.contract.WatchLogs(opts, "Unstake", accountRule) if err != nil { return nil, err } @@ -3065,8 +3043,8 @@ func (_HopBridge *HopBridgeFilterer) WatchUnstake(opts *bind.WatchOpts, sink cha select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(HopBridgeUnstake) - if err := _HopBridge.contract.UnpackLog(event, "Unstake", log); err != nil { + event := new(HopL1EthBridgeUnstake) + if err := _HopL1EthBridge.contract.UnpackLog(event, "Unstake", log); err != nil { return err } event.Raw = log @@ -3090,18 +3068,18 @@ func (_HopBridge *HopBridgeFilterer) WatchUnstake(opts *bind.WatchOpts, sink cha // ParseUnstake is a log parse operation binding the contract event 0x85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd. // // Solidity: event Unstake(address indexed account, uint256 amount) -func (_HopBridge *HopBridgeFilterer) ParseUnstake(log types.Log) (*HopBridgeUnstake, error) { - event := new(HopBridgeUnstake) - if err := _HopBridge.contract.UnpackLog(event, "Unstake", log); err != nil { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) ParseUnstake(log types.Log) (*HopL1EthBridgeUnstake, error) { + event := new(HopL1EthBridgeUnstake) + if err := _HopL1EthBridge.contract.UnpackLog(event, "Unstake", log); err != nil { return nil, err } event.Raw = log return event, nil } -// HopBridgeWithdrawalBondSettledIterator is returned from FilterWithdrawalBondSettled and is used to iterate over the raw logs and unpacked data for WithdrawalBondSettled events raised by the HopBridge contract. -type HopBridgeWithdrawalBondSettledIterator struct { - Event *HopBridgeWithdrawalBondSettled // Event containing the contract specifics and raw log +// HopL1EthBridgeWithdrawalBondSettledIterator is returned from FilterWithdrawalBondSettled and is used to iterate over the raw logs and unpacked data for WithdrawalBondSettled events raised by the HopL1EthBridge contract. +type HopL1EthBridgeWithdrawalBondSettledIterator struct { + Event *HopL1EthBridgeWithdrawalBondSettled // 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 @@ -3115,7 +3093,7 @@ type HopBridgeWithdrawalBondSettledIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *HopBridgeWithdrawalBondSettledIterator) Next() bool { +func (it *HopL1EthBridgeWithdrawalBondSettledIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -3124,7 +3102,7 @@ func (it *HopBridgeWithdrawalBondSettledIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(HopBridgeWithdrawalBondSettled) + it.Event = new(HopL1EthBridgeWithdrawalBondSettled) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3139,7 +3117,7 @@ func (it *HopBridgeWithdrawalBondSettledIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(HopBridgeWithdrawalBondSettled) + it.Event = new(HopL1EthBridgeWithdrawalBondSettled) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3155,19 +3133,19 @@ func (it *HopBridgeWithdrawalBondSettledIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *HopBridgeWithdrawalBondSettledIterator) Error() error { +func (it *HopL1EthBridgeWithdrawalBondSettledIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *HopBridgeWithdrawalBondSettledIterator) Close() error { +func (it *HopL1EthBridgeWithdrawalBondSettledIterator) Close() error { it.sub.Unsubscribe() return nil } -// HopBridgeWithdrawalBondSettled represents a WithdrawalBondSettled event raised by the HopBridge contract. -type HopBridgeWithdrawalBondSettled struct { +// HopL1EthBridgeWithdrawalBondSettled represents a WithdrawalBondSettled event raised by the HopL1EthBridge contract. +type HopL1EthBridgeWithdrawalBondSettled struct { Bonder common.Address TransferId [32]byte RootHash [32]byte @@ -3177,7 +3155,7 @@ type HopBridgeWithdrawalBondSettled struct { // FilterWithdrawalBondSettled is a free log retrieval operation binding the contract event 0x84eb21b24c31b27a3bc67dde4a598aad06db6e9415cd66544492b9616996143c. // // Solidity: event WithdrawalBondSettled(address indexed bonder, bytes32 indexed transferId, bytes32 indexed rootHash) -func (_HopBridge *HopBridgeFilterer) FilterWithdrawalBondSettled(opts *bind.FilterOpts, bonder []common.Address, transferId [][32]byte, rootHash [][32]byte) (*HopBridgeWithdrawalBondSettledIterator, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) FilterWithdrawalBondSettled(opts *bind.FilterOpts, bonder []common.Address, transferId [][32]byte, rootHash [][32]byte) (*HopL1EthBridgeWithdrawalBondSettledIterator, error) { var bonderRule []interface{} for _, bonderItem := range bonder { @@ -3192,17 +3170,17 @@ func (_HopBridge *HopBridgeFilterer) FilterWithdrawalBondSettled(opts *bind.Filt rootHashRule = append(rootHashRule, rootHashItem) } - logs, sub, err := _HopBridge.contract.FilterLogs(opts, "WithdrawalBondSettled", bonderRule, transferIdRule, rootHashRule) + logs, sub, err := _HopL1EthBridge.contract.FilterLogs(opts, "WithdrawalBondSettled", bonderRule, transferIdRule, rootHashRule) if err != nil { return nil, err } - return &HopBridgeWithdrawalBondSettledIterator{contract: _HopBridge.contract, event: "WithdrawalBondSettled", logs: logs, sub: sub}, nil + return &HopL1EthBridgeWithdrawalBondSettledIterator{contract: _HopL1EthBridge.contract, event: "WithdrawalBondSettled", logs: logs, sub: sub}, nil } // WatchWithdrawalBondSettled is a free log subscription operation binding the contract event 0x84eb21b24c31b27a3bc67dde4a598aad06db6e9415cd66544492b9616996143c. // // Solidity: event WithdrawalBondSettled(address indexed bonder, bytes32 indexed transferId, bytes32 indexed rootHash) -func (_HopBridge *HopBridgeFilterer) WatchWithdrawalBondSettled(opts *bind.WatchOpts, sink chan<- *HopBridgeWithdrawalBondSettled, bonder []common.Address, transferId [][32]byte, rootHash [][32]byte) (event.Subscription, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) WatchWithdrawalBondSettled(opts *bind.WatchOpts, sink chan<- *HopL1EthBridgeWithdrawalBondSettled, bonder []common.Address, transferId [][32]byte, rootHash [][32]byte) (event.Subscription, error) { var bonderRule []interface{} for _, bonderItem := range bonder { @@ -3217,7 +3195,7 @@ func (_HopBridge *HopBridgeFilterer) WatchWithdrawalBondSettled(opts *bind.Watch rootHashRule = append(rootHashRule, rootHashItem) } - logs, sub, err := _HopBridge.contract.WatchLogs(opts, "WithdrawalBondSettled", bonderRule, transferIdRule, rootHashRule) + logs, sub, err := _HopL1EthBridge.contract.WatchLogs(opts, "WithdrawalBondSettled", bonderRule, transferIdRule, rootHashRule) if err != nil { return nil, err } @@ -3227,8 +3205,8 @@ func (_HopBridge *HopBridgeFilterer) WatchWithdrawalBondSettled(opts *bind.Watch select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(HopBridgeWithdrawalBondSettled) - if err := _HopBridge.contract.UnpackLog(event, "WithdrawalBondSettled", log); err != nil { + event := new(HopL1EthBridgeWithdrawalBondSettled) + if err := _HopL1EthBridge.contract.UnpackLog(event, "WithdrawalBondSettled", log); err != nil { return err } event.Raw = log @@ -3252,18 +3230,18 @@ func (_HopBridge *HopBridgeFilterer) WatchWithdrawalBondSettled(opts *bind.Watch // ParseWithdrawalBondSettled is a log parse operation binding the contract event 0x84eb21b24c31b27a3bc67dde4a598aad06db6e9415cd66544492b9616996143c. // // Solidity: event WithdrawalBondSettled(address indexed bonder, bytes32 indexed transferId, bytes32 indexed rootHash) -func (_HopBridge *HopBridgeFilterer) ParseWithdrawalBondSettled(log types.Log) (*HopBridgeWithdrawalBondSettled, error) { - event := new(HopBridgeWithdrawalBondSettled) - if err := _HopBridge.contract.UnpackLog(event, "WithdrawalBondSettled", log); err != nil { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) ParseWithdrawalBondSettled(log types.Log) (*HopL1EthBridgeWithdrawalBondSettled, error) { + event := new(HopL1EthBridgeWithdrawalBondSettled) + if err := _HopL1EthBridge.contract.UnpackLog(event, "WithdrawalBondSettled", log); err != nil { return nil, err } event.Raw = log return event, nil } -// HopBridgeWithdrawalBondedIterator is returned from FilterWithdrawalBonded and is used to iterate over the raw logs and unpacked data for WithdrawalBonded events raised by the HopBridge contract. -type HopBridgeWithdrawalBondedIterator struct { - Event *HopBridgeWithdrawalBonded // Event containing the contract specifics and raw log +// HopL1EthBridgeWithdrawalBondedIterator is returned from FilterWithdrawalBonded and is used to iterate over the raw logs and unpacked data for WithdrawalBonded events raised by the HopL1EthBridge contract. +type HopL1EthBridgeWithdrawalBondedIterator struct { + Event *HopL1EthBridgeWithdrawalBonded // 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 @@ -3277,7 +3255,7 @@ type HopBridgeWithdrawalBondedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *HopBridgeWithdrawalBondedIterator) Next() bool { +func (it *HopL1EthBridgeWithdrawalBondedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -3286,7 +3264,7 @@ func (it *HopBridgeWithdrawalBondedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(HopBridgeWithdrawalBonded) + it.Event = new(HopL1EthBridgeWithdrawalBonded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3301,7 +3279,7 @@ func (it *HopBridgeWithdrawalBondedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(HopBridgeWithdrawalBonded) + it.Event = new(HopL1EthBridgeWithdrawalBonded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3317,19 +3295,19 @@ func (it *HopBridgeWithdrawalBondedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *HopBridgeWithdrawalBondedIterator) Error() error { +func (it *HopL1EthBridgeWithdrawalBondedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *HopBridgeWithdrawalBondedIterator) Close() error { +func (it *HopL1EthBridgeWithdrawalBondedIterator) Close() error { it.sub.Unsubscribe() return nil } -// HopBridgeWithdrawalBonded represents a WithdrawalBonded event raised by the HopBridge contract. -type HopBridgeWithdrawalBonded struct { +// HopL1EthBridgeWithdrawalBonded represents a WithdrawalBonded event raised by the HopL1EthBridge contract. +type HopL1EthBridgeWithdrawalBonded struct { TransferId [32]byte Amount *big.Int Raw types.Log // Blockchain specific contextual infos @@ -3338,31 +3316,31 @@ type HopBridgeWithdrawalBonded struct { // FilterWithdrawalBonded is a free log retrieval operation binding the contract event 0x0c3d250c7831051e78aa6a56679e590374c7c424415ffe4aa474491def2fe705. // // Solidity: event WithdrawalBonded(bytes32 indexed transferId, uint256 amount) -func (_HopBridge *HopBridgeFilterer) FilterWithdrawalBonded(opts *bind.FilterOpts, transferId [][32]byte) (*HopBridgeWithdrawalBondedIterator, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) FilterWithdrawalBonded(opts *bind.FilterOpts, transferId [][32]byte) (*HopL1EthBridgeWithdrawalBondedIterator, error) { var transferIdRule []interface{} for _, transferIdItem := range transferId { transferIdRule = append(transferIdRule, transferIdItem) } - logs, sub, err := _HopBridge.contract.FilterLogs(opts, "WithdrawalBonded", transferIdRule) + logs, sub, err := _HopL1EthBridge.contract.FilterLogs(opts, "WithdrawalBonded", transferIdRule) if err != nil { return nil, err } - return &HopBridgeWithdrawalBondedIterator{contract: _HopBridge.contract, event: "WithdrawalBonded", logs: logs, sub: sub}, nil + return &HopL1EthBridgeWithdrawalBondedIterator{contract: _HopL1EthBridge.contract, event: "WithdrawalBonded", logs: logs, sub: sub}, nil } // WatchWithdrawalBonded is a free log subscription operation binding the contract event 0x0c3d250c7831051e78aa6a56679e590374c7c424415ffe4aa474491def2fe705. // // Solidity: event WithdrawalBonded(bytes32 indexed transferId, uint256 amount) -func (_HopBridge *HopBridgeFilterer) WatchWithdrawalBonded(opts *bind.WatchOpts, sink chan<- *HopBridgeWithdrawalBonded, transferId [][32]byte) (event.Subscription, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) WatchWithdrawalBonded(opts *bind.WatchOpts, sink chan<- *HopL1EthBridgeWithdrawalBonded, transferId [][32]byte) (event.Subscription, error) { var transferIdRule []interface{} for _, transferIdItem := range transferId { transferIdRule = append(transferIdRule, transferIdItem) } - logs, sub, err := _HopBridge.contract.WatchLogs(opts, "WithdrawalBonded", transferIdRule) + logs, sub, err := _HopL1EthBridge.contract.WatchLogs(opts, "WithdrawalBonded", transferIdRule) if err != nil { return nil, err } @@ -3372,8 +3350,8 @@ func (_HopBridge *HopBridgeFilterer) WatchWithdrawalBonded(opts *bind.WatchOpts, select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(HopBridgeWithdrawalBonded) - if err := _HopBridge.contract.UnpackLog(event, "WithdrawalBonded", log); err != nil { + event := new(HopL1EthBridgeWithdrawalBonded) + if err := _HopL1EthBridge.contract.UnpackLog(event, "WithdrawalBonded", log); err != nil { return err } event.Raw = log @@ -3397,18 +3375,18 @@ func (_HopBridge *HopBridgeFilterer) WatchWithdrawalBonded(opts *bind.WatchOpts, // ParseWithdrawalBonded is a log parse operation binding the contract event 0x0c3d250c7831051e78aa6a56679e590374c7c424415ffe4aa474491def2fe705. // // Solidity: event WithdrawalBonded(bytes32 indexed transferId, uint256 amount) -func (_HopBridge *HopBridgeFilterer) ParseWithdrawalBonded(log types.Log) (*HopBridgeWithdrawalBonded, error) { - event := new(HopBridgeWithdrawalBonded) - if err := _HopBridge.contract.UnpackLog(event, "WithdrawalBonded", log); err != nil { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) ParseWithdrawalBonded(log types.Log) (*HopL1EthBridgeWithdrawalBonded, error) { + event := new(HopL1EthBridgeWithdrawalBonded) + if err := _HopL1EthBridge.contract.UnpackLog(event, "WithdrawalBonded", log); err != nil { return nil, err } event.Raw = log return event, nil } -// HopBridgeWithdrewIterator is returned from FilterWithdrew and is used to iterate over the raw logs and unpacked data for Withdrew events raised by the HopBridge contract. -type HopBridgeWithdrewIterator struct { - Event *HopBridgeWithdrew // Event containing the contract specifics and raw log +// HopL1EthBridgeWithdrewIterator is returned from FilterWithdrew and is used to iterate over the raw logs and unpacked data for Withdrew events raised by the HopL1EthBridge contract. +type HopL1EthBridgeWithdrewIterator struct { + Event *HopL1EthBridgeWithdrew // 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 @@ -3422,7 +3400,7 @@ type HopBridgeWithdrewIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *HopBridgeWithdrewIterator) Next() bool { +func (it *HopL1EthBridgeWithdrewIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -3431,7 +3409,7 @@ func (it *HopBridgeWithdrewIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(HopBridgeWithdrew) + it.Event = new(HopL1EthBridgeWithdrew) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3446,7 +3424,7 @@ func (it *HopBridgeWithdrewIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(HopBridgeWithdrew) + it.Event = new(HopL1EthBridgeWithdrew) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3462,19 +3440,19 @@ func (it *HopBridgeWithdrewIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *HopBridgeWithdrewIterator) Error() error { +func (it *HopL1EthBridgeWithdrewIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *HopBridgeWithdrewIterator) Close() error { +func (it *HopL1EthBridgeWithdrewIterator) Close() error { it.sub.Unsubscribe() return nil } -// HopBridgeWithdrew represents a Withdrew event raised by the HopBridge contract. -type HopBridgeWithdrew struct { +// HopL1EthBridgeWithdrew represents a Withdrew event raised by the HopL1EthBridge contract. +type HopL1EthBridgeWithdrew struct { TransferId [32]byte Recipient common.Address Amount *big.Int @@ -3485,7 +3463,7 @@ type HopBridgeWithdrew struct { // FilterWithdrew is a free log retrieval operation binding the contract event 0x9475cdbde5fc71fe2ccd413c82878ee54d061b9f74f9e2e1a03ff1178821502c. // // Solidity: event Withdrew(bytes32 indexed transferId, address indexed recipient, uint256 amount, bytes32 transferNonce) -func (_HopBridge *HopBridgeFilterer) FilterWithdrew(opts *bind.FilterOpts, transferId [][32]byte, recipient []common.Address) (*HopBridgeWithdrewIterator, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) FilterWithdrew(opts *bind.FilterOpts, transferId [][32]byte, recipient []common.Address) (*HopL1EthBridgeWithdrewIterator, error) { var transferIdRule []interface{} for _, transferIdItem := range transferId { @@ -3496,17 +3474,17 @@ func (_HopBridge *HopBridgeFilterer) FilterWithdrew(opts *bind.FilterOpts, trans recipientRule = append(recipientRule, recipientItem) } - logs, sub, err := _HopBridge.contract.FilterLogs(opts, "Withdrew", transferIdRule, recipientRule) + logs, sub, err := _HopL1EthBridge.contract.FilterLogs(opts, "Withdrew", transferIdRule, recipientRule) if err != nil { return nil, err } - return &HopBridgeWithdrewIterator{contract: _HopBridge.contract, event: "Withdrew", logs: logs, sub: sub}, nil + return &HopL1EthBridgeWithdrewIterator{contract: _HopL1EthBridge.contract, event: "Withdrew", logs: logs, sub: sub}, nil } // WatchWithdrew is a free log subscription operation binding the contract event 0x9475cdbde5fc71fe2ccd413c82878ee54d061b9f74f9e2e1a03ff1178821502c. // // Solidity: event Withdrew(bytes32 indexed transferId, address indexed recipient, uint256 amount, bytes32 transferNonce) -func (_HopBridge *HopBridgeFilterer) WatchWithdrew(opts *bind.WatchOpts, sink chan<- *HopBridgeWithdrew, transferId [][32]byte, recipient []common.Address) (event.Subscription, error) { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) WatchWithdrew(opts *bind.WatchOpts, sink chan<- *HopL1EthBridgeWithdrew, transferId [][32]byte, recipient []common.Address) (event.Subscription, error) { var transferIdRule []interface{} for _, transferIdItem := range transferId { @@ -3517,7 +3495,7 @@ func (_HopBridge *HopBridgeFilterer) WatchWithdrew(opts *bind.WatchOpts, sink ch recipientRule = append(recipientRule, recipientItem) } - logs, sub, err := _HopBridge.contract.WatchLogs(opts, "Withdrew", transferIdRule, recipientRule) + logs, sub, err := _HopL1EthBridge.contract.WatchLogs(opts, "Withdrew", transferIdRule, recipientRule) if err != nil { return nil, err } @@ -3527,8 +3505,8 @@ func (_HopBridge *HopBridgeFilterer) WatchWithdrew(opts *bind.WatchOpts, sink ch select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(HopBridgeWithdrew) - if err := _HopBridge.contract.UnpackLog(event, "Withdrew", log); err != nil { + event := new(HopL1EthBridgeWithdrew) + if err := _HopL1EthBridge.contract.UnpackLog(event, "Withdrew", log); err != nil { return err } event.Raw = log @@ -3552,9 +3530,9 @@ func (_HopBridge *HopBridgeFilterer) WatchWithdrew(opts *bind.WatchOpts, sink ch // ParseWithdrew is a log parse operation binding the contract event 0x9475cdbde5fc71fe2ccd413c82878ee54d061b9f74f9e2e1a03ff1178821502c. // // Solidity: event Withdrew(bytes32 indexed transferId, address indexed recipient, uint256 amount, bytes32 transferNonce) -func (_HopBridge *HopBridgeFilterer) ParseWithdrew(log types.Log) (*HopBridgeWithdrew, error) { - event := new(HopBridgeWithdrew) - if err := _HopBridge.contract.UnpackLog(event, "Withdrew", log); err != nil { +func (_HopL1EthBridge *HopL1EthBridgeFilterer) ParseWithdrew(log types.Log) (*HopL1EthBridgeWithdrew, error) { + event := new(HopL1EthBridgeWithdrew) + if err := _HopL1EthBridge.contract.UnpackLog(event, "Withdrew", log); err != nil { return nil, err } event.Raw = log diff --git a/contracts/hop/l1Contracts/l1HopBridge/l1HopBridge.go b/contracts/hop/l1Contracts/l1HopBridge/l1HopBridge.go new file mode 100644 index 000000000..9d9f113c0 --- /dev/null +++ b/contracts/hop/l1Contracts/l1HopBridge/l1HopBridge.go @@ -0,0 +1,3644 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package hopL1HopBridge + +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 +) + +// BridgeTransferRoot is an auto generated low-level Go binding around an user-defined struct. +type BridgeTransferRoot struct { + Total *big.Int + AmountWithdrawn *big.Int + CreatedAt *big.Int +} + +// HopL1HopBridgeMetaData contains all meta data concerning the HopL1HopBridge contract. +var HopL1HopBridgeMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"_l1CanonicalToken\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"bonders\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"_governance\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_migrator\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newBonder\",\"type\":\"address\"}],\"name\":\"BonderAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousBonder\",\"type\":\"address\"}],\"name\":\"BonderRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferRootId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"originalAmount\",\"type\":\"uint256\"}],\"name\":\"ChallengeResolved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalBondsSettled\",\"type\":\"uint256\"}],\"name\":\"MultipleWithdrawalsSettled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Stake\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferRootId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"originalAmount\",\"type\":\"uint256\"}],\"name\":\"TransferBondChallenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferRootBonded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"originChainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"TransferRootConfirmed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"TransferRootSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"relayerFee\",\"type\":\"uint256\"}],\"name\":\"TransferSentToL2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Unstake\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"}],\"name\":\"WithdrawalBondSettled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"WithdrawalBonded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"}],\"name\":\"Withdrew\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"CHALLENGE_AMOUNT_DIVISOR\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TIME_SLOT_SIZE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"addBonder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"bondTransferRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"}],\"name\":\"bondWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"chainBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengeResolutionPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"originalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"}],\"name\":\"challengeTransferBond\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"originChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rootCommittedAt\",\"type\":\"uint256\"}],\"name\":\"confirmTransferRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"crossDomainMessengerWrappers\",\"outputs\":[{\"internalType\":\"contractIMessengerWrapper\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"getBondForTransferAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"}],\"name\":\"getBondedWithdrawalAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"getChallengeAmountForTransferAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"getCredit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"getDebitAndAdditionalDebit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"maybeBonder\",\"type\":\"address\"}],\"name\":\"getIsBonder\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"getRawDebit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"}],\"name\":\"getTimeSlot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"getTransferId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"getTransferRoot\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"total\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountWithdrawn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"}],\"internalType\":\"structBridge.TransferRoot\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"getTransferRootId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governance\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"isChainIdPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"}],\"name\":\"isTransferIdSpent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l1CanonicalToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"migrateTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"migrator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minTransferRootBondDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"removeBonder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"originalAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"rescueTransferRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"originalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"}],\"name\":\"resolveChallenge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"relayerFee\",\"type\":\"uint256\"}],\"name\":\"sendToL2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isPaused\",\"type\":\"bool\"}],\"name\":\"setChainIdDepositsPaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"}],\"name\":\"setChallengePeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_challengeResolutionPeriod\",\"type\":\"uint256\"}],\"name\":\"setChallengeResolutionPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contractIMessengerWrapper\",\"name\":\"_crossDomainMessengerWrapper\",\"type\":\"address\"}],\"name\":\"setCrossDomainMessengerWrapper\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newGovernance\",\"type\":\"address\"}],\"name\":\"setGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newMigrator\",\"type\":\"address\"}],\"name\":\"setMigrator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minTransferRootBondDelay\",\"type\":\"uint256\"}],\"name\":\"setMinTransferRootBondDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"transferRootTotalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"transferIdTreeIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"siblings\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"totalLeaves\",\"type\":\"uint256\"}],\"name\":\"settleBondedWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"bytes32[]\",\"name\":\"transferIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"settleBondedWithdrawals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"timeSlotToAmountBonded\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"transferBonds\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"challengeStartTime\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"challengeResolved\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"transferRootCommittedAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"unstake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"transferRootTotalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"transferIdTreeIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"siblings\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"totalLeaves\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// HopL1HopBridgeABI is the input ABI used to generate the binding from. +// Deprecated: Use HopL1HopBridgeMetaData.ABI instead. +var HopL1HopBridgeABI = HopL1HopBridgeMetaData.ABI + +// HopL1HopBridge is an auto generated Go binding around an Ethereum contract. +type HopL1HopBridge struct { + HopL1HopBridgeCaller // Read-only binding to the contract + HopL1HopBridgeTransactor // Write-only binding to the contract + HopL1HopBridgeFilterer // Log filterer for contract events +} + +// HopL1HopBridgeCaller is an auto generated read-only Go binding around an Ethereum contract. +type HopL1HopBridgeCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// HopL1HopBridgeTransactor is an auto generated write-only Go binding around an Ethereum contract. +type HopL1HopBridgeTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// HopL1HopBridgeFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type HopL1HopBridgeFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// HopL1HopBridgeSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type HopL1HopBridgeSession struct { + Contract *HopL1HopBridge // 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 +} + +// HopL1HopBridgeCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type HopL1HopBridgeCallerSession struct { + Contract *HopL1HopBridgeCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// HopL1HopBridgeTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type HopL1HopBridgeTransactorSession struct { + Contract *HopL1HopBridgeTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// HopL1HopBridgeRaw is an auto generated low-level Go binding around an Ethereum contract. +type HopL1HopBridgeRaw struct { + Contract *HopL1HopBridge // Generic contract binding to access the raw methods on +} + +// HopL1HopBridgeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type HopL1HopBridgeCallerRaw struct { + Contract *HopL1HopBridgeCaller // Generic read-only contract binding to access the raw methods on +} + +// HopL1HopBridgeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type HopL1HopBridgeTransactorRaw struct { + Contract *HopL1HopBridgeTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewHopL1HopBridge creates a new instance of HopL1HopBridge, bound to a specific deployed contract. +func NewHopL1HopBridge(address common.Address, backend bind.ContractBackend) (*HopL1HopBridge, error) { + contract, err := bindHopL1HopBridge(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &HopL1HopBridge{HopL1HopBridgeCaller: HopL1HopBridgeCaller{contract: contract}, HopL1HopBridgeTransactor: HopL1HopBridgeTransactor{contract: contract}, HopL1HopBridgeFilterer: HopL1HopBridgeFilterer{contract: contract}}, nil +} + +// NewHopL1HopBridgeCaller creates a new read-only instance of HopL1HopBridge, bound to a specific deployed contract. +func NewHopL1HopBridgeCaller(address common.Address, caller bind.ContractCaller) (*HopL1HopBridgeCaller, error) { + contract, err := bindHopL1HopBridge(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &HopL1HopBridgeCaller{contract: contract}, nil +} + +// NewHopL1HopBridgeTransactor creates a new write-only instance of HopL1HopBridge, bound to a specific deployed contract. +func NewHopL1HopBridgeTransactor(address common.Address, transactor bind.ContractTransactor) (*HopL1HopBridgeTransactor, error) { + contract, err := bindHopL1HopBridge(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &HopL1HopBridgeTransactor{contract: contract}, nil +} + +// NewHopL1HopBridgeFilterer creates a new log filterer instance of HopL1HopBridge, bound to a specific deployed contract. +func NewHopL1HopBridgeFilterer(address common.Address, filterer bind.ContractFilterer) (*HopL1HopBridgeFilterer, error) { + contract, err := bindHopL1HopBridge(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &HopL1HopBridgeFilterer{contract: contract}, nil +} + +// bindHopL1HopBridge binds a generic wrapper to an already deployed contract. +func bindHopL1HopBridge(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := HopL1HopBridgeMetaData.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 (_HopL1HopBridge *HopL1HopBridgeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _HopL1HopBridge.Contract.HopL1HopBridgeCaller.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 (_HopL1HopBridge *HopL1HopBridgeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.HopL1HopBridgeTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_HopL1HopBridge *HopL1HopBridgeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.HopL1HopBridgeTransactor.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 (_HopL1HopBridge *HopL1HopBridgeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _HopL1HopBridge.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 (_HopL1HopBridge *HopL1HopBridgeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_HopL1HopBridge *HopL1HopBridgeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.contract.Transact(opts, method, params...) +} + +// CHALLENGEAMOUNTDIVISOR is a free data retrieval call binding the contract method 0x98c4f76d. +// +// Solidity: function CHALLENGE_AMOUNT_DIVISOR() view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCaller) CHALLENGEAMOUNTDIVISOR(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _HopL1HopBridge.contract.Call(opts, &out, "CHALLENGE_AMOUNT_DIVISOR") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// CHALLENGEAMOUNTDIVISOR is a free data retrieval call binding the contract method 0x98c4f76d. +// +// Solidity: function CHALLENGE_AMOUNT_DIVISOR() view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeSession) CHALLENGEAMOUNTDIVISOR() (*big.Int, error) { + return _HopL1HopBridge.Contract.CHALLENGEAMOUNTDIVISOR(&_HopL1HopBridge.CallOpts) +} + +// CHALLENGEAMOUNTDIVISOR is a free data retrieval call binding the contract method 0x98c4f76d. +// +// Solidity: function CHALLENGE_AMOUNT_DIVISOR() view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCallerSession) CHALLENGEAMOUNTDIVISOR() (*big.Int, error) { + return _HopL1HopBridge.Contract.CHALLENGEAMOUNTDIVISOR(&_HopL1HopBridge.CallOpts) +} + +// TIMESLOTSIZE is a free data retrieval call binding the contract method 0x4de8c6e6. +// +// Solidity: function TIME_SLOT_SIZE() view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCaller) TIMESLOTSIZE(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _HopL1HopBridge.contract.Call(opts, &out, "TIME_SLOT_SIZE") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TIMESLOTSIZE is a free data retrieval call binding the contract method 0x4de8c6e6. +// +// Solidity: function TIME_SLOT_SIZE() view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeSession) TIMESLOTSIZE() (*big.Int, error) { + return _HopL1HopBridge.Contract.TIMESLOTSIZE(&_HopL1HopBridge.CallOpts) +} + +// TIMESLOTSIZE is a free data retrieval call binding the contract method 0x4de8c6e6. +// +// Solidity: function TIME_SLOT_SIZE() view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCallerSession) TIMESLOTSIZE() (*big.Int, error) { + return _HopL1HopBridge.Contract.TIMESLOTSIZE(&_HopL1HopBridge.CallOpts) +} + +// ChainBalance is a free data retrieval call binding the contract method 0xfc110b67. +// +// Solidity: function chainBalance(uint256 ) view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCaller) ChainBalance(opts *bind.CallOpts, arg0 *big.Int) (*big.Int, error) { + var out []interface{} + err := _HopL1HopBridge.contract.Call(opts, &out, "chainBalance", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// ChainBalance is a free data retrieval call binding the contract method 0xfc110b67. +// +// Solidity: function chainBalance(uint256 ) view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeSession) ChainBalance(arg0 *big.Int) (*big.Int, error) { + return _HopL1HopBridge.Contract.ChainBalance(&_HopL1HopBridge.CallOpts, arg0) +} + +// ChainBalance is a free data retrieval call binding the contract method 0xfc110b67. +// +// Solidity: function chainBalance(uint256 ) view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCallerSession) ChainBalance(arg0 *big.Int) (*big.Int, error) { + return _HopL1HopBridge.Contract.ChainBalance(&_HopL1HopBridge.CallOpts, arg0) +} + +// ChallengePeriod is a free data retrieval call binding the contract method 0xf3f480d9. +// +// Solidity: function challengePeriod() view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCaller) ChallengePeriod(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _HopL1HopBridge.contract.Call(opts, &out, "challengePeriod") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// ChallengePeriod is a free data retrieval call binding the contract method 0xf3f480d9. +// +// Solidity: function challengePeriod() view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeSession) ChallengePeriod() (*big.Int, error) { + return _HopL1HopBridge.Contract.ChallengePeriod(&_HopL1HopBridge.CallOpts) +} + +// ChallengePeriod is a free data retrieval call binding the contract method 0xf3f480d9. +// +// Solidity: function challengePeriod() view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCallerSession) ChallengePeriod() (*big.Int, error) { + return _HopL1HopBridge.Contract.ChallengePeriod(&_HopL1HopBridge.CallOpts) +} + +// ChallengeResolutionPeriod is a free data retrieval call binding the contract method 0x767631d5. +// +// Solidity: function challengeResolutionPeriod() view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCaller) ChallengeResolutionPeriod(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _HopL1HopBridge.contract.Call(opts, &out, "challengeResolutionPeriod") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// ChallengeResolutionPeriod is a free data retrieval call binding the contract method 0x767631d5. +// +// Solidity: function challengeResolutionPeriod() view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeSession) ChallengeResolutionPeriod() (*big.Int, error) { + return _HopL1HopBridge.Contract.ChallengeResolutionPeriod(&_HopL1HopBridge.CallOpts) +} + +// ChallengeResolutionPeriod is a free data retrieval call binding the contract method 0x767631d5. +// +// Solidity: function challengeResolutionPeriod() view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCallerSession) ChallengeResolutionPeriod() (*big.Int, error) { + return _HopL1HopBridge.Contract.ChallengeResolutionPeriod(&_HopL1HopBridge.CallOpts) +} + +// CrossDomainMessengerWrappers is a free data retrieval call binding the contract method 0xa35962f3. +// +// Solidity: function crossDomainMessengerWrappers(uint256 ) view returns(address) +func (_HopL1HopBridge *HopL1HopBridgeCaller) CrossDomainMessengerWrappers(opts *bind.CallOpts, arg0 *big.Int) (common.Address, error) { + var out []interface{} + err := _HopL1HopBridge.contract.Call(opts, &out, "crossDomainMessengerWrappers", arg0) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// CrossDomainMessengerWrappers is a free data retrieval call binding the contract method 0xa35962f3. +// +// Solidity: function crossDomainMessengerWrappers(uint256 ) view returns(address) +func (_HopL1HopBridge *HopL1HopBridgeSession) CrossDomainMessengerWrappers(arg0 *big.Int) (common.Address, error) { + return _HopL1HopBridge.Contract.CrossDomainMessengerWrappers(&_HopL1HopBridge.CallOpts, arg0) +} + +// CrossDomainMessengerWrappers is a free data retrieval call binding the contract method 0xa35962f3. +// +// Solidity: function crossDomainMessengerWrappers(uint256 ) view returns(address) +func (_HopL1HopBridge *HopL1HopBridgeCallerSession) CrossDomainMessengerWrappers(arg0 *big.Int) (common.Address, error) { + return _HopL1HopBridge.Contract.CrossDomainMessengerWrappers(&_HopL1HopBridge.CallOpts, arg0) +} + +// GetBondForTransferAmount is a free data retrieval call binding the contract method 0xe19be150. +// +// Solidity: function getBondForTransferAmount(uint256 amount) pure returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCaller) GetBondForTransferAmount(opts *bind.CallOpts, amount *big.Int) (*big.Int, error) { + var out []interface{} + err := _HopL1HopBridge.contract.Call(opts, &out, "getBondForTransferAmount", amount) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetBondForTransferAmount is a free data retrieval call binding the contract method 0xe19be150. +// +// Solidity: function getBondForTransferAmount(uint256 amount) pure returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeSession) GetBondForTransferAmount(amount *big.Int) (*big.Int, error) { + return _HopL1HopBridge.Contract.GetBondForTransferAmount(&_HopL1HopBridge.CallOpts, amount) +} + +// GetBondForTransferAmount is a free data retrieval call binding the contract method 0xe19be150. +// +// Solidity: function getBondForTransferAmount(uint256 amount) pure returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCallerSession) GetBondForTransferAmount(amount *big.Int) (*big.Int, error) { + return _HopL1HopBridge.Contract.GetBondForTransferAmount(&_HopL1HopBridge.CallOpts, amount) +} + +// GetBondedWithdrawalAmount is a free data retrieval call binding the contract method 0x302830ab. +// +// Solidity: function getBondedWithdrawalAmount(address bonder, bytes32 transferId) view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCaller) GetBondedWithdrawalAmount(opts *bind.CallOpts, bonder common.Address, transferId [32]byte) (*big.Int, error) { + var out []interface{} + err := _HopL1HopBridge.contract.Call(opts, &out, "getBondedWithdrawalAmount", bonder, transferId) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetBondedWithdrawalAmount is a free data retrieval call binding the contract method 0x302830ab. +// +// Solidity: function getBondedWithdrawalAmount(address bonder, bytes32 transferId) view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeSession) GetBondedWithdrawalAmount(bonder common.Address, transferId [32]byte) (*big.Int, error) { + return _HopL1HopBridge.Contract.GetBondedWithdrawalAmount(&_HopL1HopBridge.CallOpts, bonder, transferId) +} + +// GetBondedWithdrawalAmount is a free data retrieval call binding the contract method 0x302830ab. +// +// Solidity: function getBondedWithdrawalAmount(address bonder, bytes32 transferId) view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCallerSession) GetBondedWithdrawalAmount(bonder common.Address, transferId [32]byte) (*big.Int, error) { + return _HopL1HopBridge.Contract.GetBondedWithdrawalAmount(&_HopL1HopBridge.CallOpts, bonder, transferId) +} + +// GetChainId is a free data retrieval call binding the contract method 0x3408e470. +// +// Solidity: function getChainId() view returns(uint256 chainId) +func (_HopL1HopBridge *HopL1HopBridgeCaller) GetChainId(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _HopL1HopBridge.contract.Call(opts, &out, "getChainId") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetChainId is a free data retrieval call binding the contract method 0x3408e470. +// +// Solidity: function getChainId() view returns(uint256 chainId) +func (_HopL1HopBridge *HopL1HopBridgeSession) GetChainId() (*big.Int, error) { + return _HopL1HopBridge.Contract.GetChainId(&_HopL1HopBridge.CallOpts) +} + +// GetChainId is a free data retrieval call binding the contract method 0x3408e470. +// +// Solidity: function getChainId() view returns(uint256 chainId) +func (_HopL1HopBridge *HopL1HopBridgeCallerSession) GetChainId() (*big.Int, error) { + return _HopL1HopBridge.Contract.GetChainId(&_HopL1HopBridge.CallOpts) +} + +// GetChallengeAmountForTransferAmount is a free data retrieval call binding the contract method 0xa239f5ee. +// +// Solidity: function getChallengeAmountForTransferAmount(uint256 amount) pure returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCaller) GetChallengeAmountForTransferAmount(opts *bind.CallOpts, amount *big.Int) (*big.Int, error) { + var out []interface{} + err := _HopL1HopBridge.contract.Call(opts, &out, "getChallengeAmountForTransferAmount", amount) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetChallengeAmountForTransferAmount is a free data retrieval call binding the contract method 0xa239f5ee. +// +// Solidity: function getChallengeAmountForTransferAmount(uint256 amount) pure returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeSession) GetChallengeAmountForTransferAmount(amount *big.Int) (*big.Int, error) { + return _HopL1HopBridge.Contract.GetChallengeAmountForTransferAmount(&_HopL1HopBridge.CallOpts, amount) +} + +// GetChallengeAmountForTransferAmount is a free data retrieval call binding the contract method 0xa239f5ee. +// +// Solidity: function getChallengeAmountForTransferAmount(uint256 amount) pure returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCallerSession) GetChallengeAmountForTransferAmount(amount *big.Int) (*big.Int, error) { + return _HopL1HopBridge.Contract.GetChallengeAmountForTransferAmount(&_HopL1HopBridge.CallOpts, amount) +} + +// GetCredit is a free data retrieval call binding the contract method 0x57344e6f. +// +// Solidity: function getCredit(address bonder) view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCaller) GetCredit(opts *bind.CallOpts, bonder common.Address) (*big.Int, error) { + var out []interface{} + err := _HopL1HopBridge.contract.Call(opts, &out, "getCredit", bonder) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetCredit is a free data retrieval call binding the contract method 0x57344e6f. +// +// Solidity: function getCredit(address bonder) view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeSession) GetCredit(bonder common.Address) (*big.Int, error) { + return _HopL1HopBridge.Contract.GetCredit(&_HopL1HopBridge.CallOpts, bonder) +} + +// GetCredit is a free data retrieval call binding the contract method 0x57344e6f. +// +// Solidity: function getCredit(address bonder) view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCallerSession) GetCredit(bonder common.Address) (*big.Int, error) { + return _HopL1HopBridge.Contract.GetCredit(&_HopL1HopBridge.CallOpts, bonder) +} + +// GetDebitAndAdditionalDebit is a free data retrieval call binding the contract method 0xffa9286c. +// +// Solidity: function getDebitAndAdditionalDebit(address bonder) view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCaller) GetDebitAndAdditionalDebit(opts *bind.CallOpts, bonder common.Address) (*big.Int, error) { + var out []interface{} + err := _HopL1HopBridge.contract.Call(opts, &out, "getDebitAndAdditionalDebit", bonder) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetDebitAndAdditionalDebit is a free data retrieval call binding the contract method 0xffa9286c. +// +// Solidity: function getDebitAndAdditionalDebit(address bonder) view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeSession) GetDebitAndAdditionalDebit(bonder common.Address) (*big.Int, error) { + return _HopL1HopBridge.Contract.GetDebitAndAdditionalDebit(&_HopL1HopBridge.CallOpts, bonder) +} + +// GetDebitAndAdditionalDebit is a free data retrieval call binding the contract method 0xffa9286c. +// +// Solidity: function getDebitAndAdditionalDebit(address bonder) view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCallerSession) GetDebitAndAdditionalDebit(bonder common.Address) (*big.Int, error) { + return _HopL1HopBridge.Contract.GetDebitAndAdditionalDebit(&_HopL1HopBridge.CallOpts, bonder) +} + +// GetIsBonder is a free data retrieval call binding the contract method 0xd5ef7551. +// +// Solidity: function getIsBonder(address maybeBonder) view returns(bool) +func (_HopL1HopBridge *HopL1HopBridgeCaller) GetIsBonder(opts *bind.CallOpts, maybeBonder common.Address) (bool, error) { + var out []interface{} + err := _HopL1HopBridge.contract.Call(opts, &out, "getIsBonder", maybeBonder) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// GetIsBonder is a free data retrieval call binding the contract method 0xd5ef7551. +// +// Solidity: function getIsBonder(address maybeBonder) view returns(bool) +func (_HopL1HopBridge *HopL1HopBridgeSession) GetIsBonder(maybeBonder common.Address) (bool, error) { + return _HopL1HopBridge.Contract.GetIsBonder(&_HopL1HopBridge.CallOpts, maybeBonder) +} + +// GetIsBonder is a free data retrieval call binding the contract method 0xd5ef7551. +// +// Solidity: function getIsBonder(address maybeBonder) view returns(bool) +func (_HopL1HopBridge *HopL1HopBridgeCallerSession) GetIsBonder(maybeBonder common.Address) (bool, error) { + return _HopL1HopBridge.Contract.GetIsBonder(&_HopL1HopBridge.CallOpts, maybeBonder) +} + +// GetRawDebit is a free data retrieval call binding the contract method 0x13948c76. +// +// Solidity: function getRawDebit(address bonder) view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCaller) GetRawDebit(opts *bind.CallOpts, bonder common.Address) (*big.Int, error) { + var out []interface{} + err := _HopL1HopBridge.contract.Call(opts, &out, "getRawDebit", bonder) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetRawDebit is a free data retrieval call binding the contract method 0x13948c76. +// +// Solidity: function getRawDebit(address bonder) view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeSession) GetRawDebit(bonder common.Address) (*big.Int, error) { + return _HopL1HopBridge.Contract.GetRawDebit(&_HopL1HopBridge.CallOpts, bonder) +} + +// GetRawDebit is a free data retrieval call binding the contract method 0x13948c76. +// +// Solidity: function getRawDebit(address bonder) view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCallerSession) GetRawDebit(bonder common.Address) (*big.Int, error) { + return _HopL1HopBridge.Contract.GetRawDebit(&_HopL1HopBridge.CallOpts, bonder) +} + +// GetTimeSlot is a free data retrieval call binding the contract method 0x2b85dcc9. +// +// Solidity: function getTimeSlot(uint256 time) pure returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCaller) GetTimeSlot(opts *bind.CallOpts, time *big.Int) (*big.Int, error) { + var out []interface{} + err := _HopL1HopBridge.contract.Call(opts, &out, "getTimeSlot", time) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTimeSlot is a free data retrieval call binding the contract method 0x2b85dcc9. +// +// Solidity: function getTimeSlot(uint256 time) pure returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeSession) GetTimeSlot(time *big.Int) (*big.Int, error) { + return _HopL1HopBridge.Contract.GetTimeSlot(&_HopL1HopBridge.CallOpts, time) +} + +// GetTimeSlot is a free data retrieval call binding the contract method 0x2b85dcc9. +// +// Solidity: function getTimeSlot(uint256 time) pure returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCallerSession) GetTimeSlot(time *big.Int) (*big.Int, error) { + return _HopL1HopBridge.Contract.GetTimeSlot(&_HopL1HopBridge.CallOpts, time) +} + +// GetTransferId is a free data retrieval call binding the contract method 0xaf215f94. +// +// Solidity: function getTransferId(uint256 chainId, address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline) pure returns(bytes32) +func (_HopL1HopBridge *HopL1HopBridgeCaller) GetTransferId(opts *bind.CallOpts, chainId *big.Int, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) ([32]byte, error) { + var out []interface{} + err := _HopL1HopBridge.contract.Call(opts, &out, "getTransferId", chainId, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetTransferId is a free data retrieval call binding the contract method 0xaf215f94. +// +// Solidity: function getTransferId(uint256 chainId, address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline) pure returns(bytes32) +func (_HopL1HopBridge *HopL1HopBridgeSession) GetTransferId(chainId *big.Int, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) ([32]byte, error) { + return _HopL1HopBridge.Contract.GetTransferId(&_HopL1HopBridge.CallOpts, chainId, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline) +} + +// GetTransferId is a free data retrieval call binding the contract method 0xaf215f94. +// +// Solidity: function getTransferId(uint256 chainId, address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline) pure returns(bytes32) +func (_HopL1HopBridge *HopL1HopBridgeCallerSession) GetTransferId(chainId *big.Int, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) ([32]byte, error) { + return _HopL1HopBridge.Contract.GetTransferId(&_HopL1HopBridge.CallOpts, chainId, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline) +} + +// GetTransferRoot is a free data retrieval call binding the contract method 0xce803b4f. +// +// Solidity: function getTransferRoot(bytes32 rootHash, uint256 totalAmount) view returns((uint256,uint256,uint256)) +func (_HopL1HopBridge *HopL1HopBridgeCaller) GetTransferRoot(opts *bind.CallOpts, rootHash [32]byte, totalAmount *big.Int) (BridgeTransferRoot, error) { + var out []interface{} + err := _HopL1HopBridge.contract.Call(opts, &out, "getTransferRoot", rootHash, totalAmount) + + if err != nil { + return *new(BridgeTransferRoot), err + } + + out0 := *abi.ConvertType(out[0], new(BridgeTransferRoot)).(*BridgeTransferRoot) + + return out0, err + +} + +// GetTransferRoot is a free data retrieval call binding the contract method 0xce803b4f. +// +// Solidity: function getTransferRoot(bytes32 rootHash, uint256 totalAmount) view returns((uint256,uint256,uint256)) +func (_HopL1HopBridge *HopL1HopBridgeSession) GetTransferRoot(rootHash [32]byte, totalAmount *big.Int) (BridgeTransferRoot, error) { + return _HopL1HopBridge.Contract.GetTransferRoot(&_HopL1HopBridge.CallOpts, rootHash, totalAmount) +} + +// GetTransferRoot is a free data retrieval call binding the contract method 0xce803b4f. +// +// Solidity: function getTransferRoot(bytes32 rootHash, uint256 totalAmount) view returns((uint256,uint256,uint256)) +func (_HopL1HopBridge *HopL1HopBridgeCallerSession) GetTransferRoot(rootHash [32]byte, totalAmount *big.Int) (BridgeTransferRoot, error) { + return _HopL1HopBridge.Contract.GetTransferRoot(&_HopL1HopBridge.CallOpts, rootHash, totalAmount) +} + +// GetTransferRootId is a free data retrieval call binding the contract method 0x960a7afa. +// +// Solidity: function getTransferRootId(bytes32 rootHash, uint256 totalAmount) pure returns(bytes32) +func (_HopL1HopBridge *HopL1HopBridgeCaller) GetTransferRootId(opts *bind.CallOpts, rootHash [32]byte, totalAmount *big.Int) ([32]byte, error) { + var out []interface{} + err := _HopL1HopBridge.contract.Call(opts, &out, "getTransferRootId", rootHash, totalAmount) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetTransferRootId is a free data retrieval call binding the contract method 0x960a7afa. +// +// Solidity: function getTransferRootId(bytes32 rootHash, uint256 totalAmount) pure returns(bytes32) +func (_HopL1HopBridge *HopL1HopBridgeSession) GetTransferRootId(rootHash [32]byte, totalAmount *big.Int) ([32]byte, error) { + return _HopL1HopBridge.Contract.GetTransferRootId(&_HopL1HopBridge.CallOpts, rootHash, totalAmount) +} + +// GetTransferRootId is a free data retrieval call binding the contract method 0x960a7afa. +// +// Solidity: function getTransferRootId(bytes32 rootHash, uint256 totalAmount) pure returns(bytes32) +func (_HopL1HopBridge *HopL1HopBridgeCallerSession) GetTransferRootId(rootHash [32]byte, totalAmount *big.Int) ([32]byte, error) { + return _HopL1HopBridge.Contract.GetTransferRootId(&_HopL1HopBridge.CallOpts, rootHash, totalAmount) +} + +// Governance is a free data retrieval call binding the contract method 0x5aa6e675. +// +// Solidity: function governance() view returns(address) +func (_HopL1HopBridge *HopL1HopBridgeCaller) Governance(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL1HopBridge.contract.Call(opts, &out, "governance") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Governance is a free data retrieval call binding the contract method 0x5aa6e675. +// +// Solidity: function governance() view returns(address) +func (_HopL1HopBridge *HopL1HopBridgeSession) Governance() (common.Address, error) { + return _HopL1HopBridge.Contract.Governance(&_HopL1HopBridge.CallOpts) +} + +// Governance is a free data retrieval call binding the contract method 0x5aa6e675. +// +// Solidity: function governance() view returns(address) +func (_HopL1HopBridge *HopL1HopBridgeCallerSession) Governance() (common.Address, error) { + return _HopL1HopBridge.Contract.Governance(&_HopL1HopBridge.CallOpts) +} + +// IsChainIdPaused is a free data retrieval call binding the contract method 0xfa2a69a3. +// +// Solidity: function isChainIdPaused(uint256 ) view returns(bool) +func (_HopL1HopBridge *HopL1HopBridgeCaller) IsChainIdPaused(opts *bind.CallOpts, arg0 *big.Int) (bool, error) { + var out []interface{} + err := _HopL1HopBridge.contract.Call(opts, &out, "isChainIdPaused", arg0) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsChainIdPaused is a free data retrieval call binding the contract method 0xfa2a69a3. +// +// Solidity: function isChainIdPaused(uint256 ) view returns(bool) +func (_HopL1HopBridge *HopL1HopBridgeSession) IsChainIdPaused(arg0 *big.Int) (bool, error) { + return _HopL1HopBridge.Contract.IsChainIdPaused(&_HopL1HopBridge.CallOpts, arg0) +} + +// IsChainIdPaused is a free data retrieval call binding the contract method 0xfa2a69a3. +// +// Solidity: function isChainIdPaused(uint256 ) view returns(bool) +func (_HopL1HopBridge *HopL1HopBridgeCallerSession) IsChainIdPaused(arg0 *big.Int) (bool, error) { + return _HopL1HopBridge.Contract.IsChainIdPaused(&_HopL1HopBridge.CallOpts, arg0) +} + +// IsTransferIdSpent is a free data retrieval call binding the contract method 0x3a7af631. +// +// Solidity: function isTransferIdSpent(bytes32 transferId) view returns(bool) +func (_HopL1HopBridge *HopL1HopBridgeCaller) IsTransferIdSpent(opts *bind.CallOpts, transferId [32]byte) (bool, error) { + var out []interface{} + err := _HopL1HopBridge.contract.Call(opts, &out, "isTransferIdSpent", transferId) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsTransferIdSpent is a free data retrieval call binding the contract method 0x3a7af631. +// +// Solidity: function isTransferIdSpent(bytes32 transferId) view returns(bool) +func (_HopL1HopBridge *HopL1HopBridgeSession) IsTransferIdSpent(transferId [32]byte) (bool, error) { + return _HopL1HopBridge.Contract.IsTransferIdSpent(&_HopL1HopBridge.CallOpts, transferId) +} + +// IsTransferIdSpent is a free data retrieval call binding the contract method 0x3a7af631. +// +// Solidity: function isTransferIdSpent(bytes32 transferId) view returns(bool) +func (_HopL1HopBridge *HopL1HopBridgeCallerSession) IsTransferIdSpent(transferId [32]byte) (bool, error) { + return _HopL1HopBridge.Contract.IsTransferIdSpent(&_HopL1HopBridge.CallOpts, transferId) +} + +// L1CanonicalToken is a free data retrieval call binding the contract method 0xb7a0bda6. +// +// Solidity: function l1CanonicalToken() view returns(address) +func (_HopL1HopBridge *HopL1HopBridgeCaller) L1CanonicalToken(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL1HopBridge.contract.Call(opts, &out, "l1CanonicalToken") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// L1CanonicalToken is a free data retrieval call binding the contract method 0xb7a0bda6. +// +// Solidity: function l1CanonicalToken() view returns(address) +func (_HopL1HopBridge *HopL1HopBridgeSession) L1CanonicalToken() (common.Address, error) { + return _HopL1HopBridge.Contract.L1CanonicalToken(&_HopL1HopBridge.CallOpts) +} + +// L1CanonicalToken is a free data retrieval call binding the contract method 0xb7a0bda6. +// +// Solidity: function l1CanonicalToken() view returns(address) +func (_HopL1HopBridge *HopL1HopBridgeCallerSession) L1CanonicalToken() (common.Address, error) { + return _HopL1HopBridge.Contract.L1CanonicalToken(&_HopL1HopBridge.CallOpts) +} + +// Migrator is a free data retrieval call binding the contract method 0x7cd07e47. +// +// Solidity: function migrator() view returns(address) +func (_HopL1HopBridge *HopL1HopBridgeCaller) Migrator(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL1HopBridge.contract.Call(opts, &out, "migrator") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Migrator is a free data retrieval call binding the contract method 0x7cd07e47. +// +// Solidity: function migrator() view returns(address) +func (_HopL1HopBridge *HopL1HopBridgeSession) Migrator() (common.Address, error) { + return _HopL1HopBridge.Contract.Migrator(&_HopL1HopBridge.CallOpts) +} + +// Migrator is a free data retrieval call binding the contract method 0x7cd07e47. +// +// Solidity: function migrator() view returns(address) +func (_HopL1HopBridge *HopL1HopBridgeCallerSession) Migrator() (common.Address, error) { + return _HopL1HopBridge.Contract.Migrator(&_HopL1HopBridge.CallOpts) +} + +// MinTransferRootBondDelay is a free data retrieval call binding the contract method 0x6cff06a7. +// +// Solidity: function minTransferRootBondDelay() view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCaller) MinTransferRootBondDelay(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _HopL1HopBridge.contract.Call(opts, &out, "minTransferRootBondDelay") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MinTransferRootBondDelay is a free data retrieval call binding the contract method 0x6cff06a7. +// +// Solidity: function minTransferRootBondDelay() view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeSession) MinTransferRootBondDelay() (*big.Int, error) { + return _HopL1HopBridge.Contract.MinTransferRootBondDelay(&_HopL1HopBridge.CallOpts) +} + +// MinTransferRootBondDelay is a free data retrieval call binding the contract method 0x6cff06a7. +// +// Solidity: function minTransferRootBondDelay() view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCallerSession) MinTransferRootBondDelay() (*big.Int, error) { + return _HopL1HopBridge.Contract.MinTransferRootBondDelay(&_HopL1HopBridge.CallOpts) +} + +// TimeSlotToAmountBonded is a free data retrieval call binding the contract method 0x7398d282. +// +// Solidity: function timeSlotToAmountBonded(uint256 , address ) view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCaller) TimeSlotToAmountBonded(opts *bind.CallOpts, arg0 *big.Int, arg1 common.Address) (*big.Int, error) { + var out []interface{} + err := _HopL1HopBridge.contract.Call(opts, &out, "timeSlotToAmountBonded", arg0, arg1) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TimeSlotToAmountBonded is a free data retrieval call binding the contract method 0x7398d282. +// +// Solidity: function timeSlotToAmountBonded(uint256 , address ) view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeSession) TimeSlotToAmountBonded(arg0 *big.Int, arg1 common.Address) (*big.Int, error) { + return _HopL1HopBridge.Contract.TimeSlotToAmountBonded(&_HopL1HopBridge.CallOpts, arg0, arg1) +} + +// TimeSlotToAmountBonded is a free data retrieval call binding the contract method 0x7398d282. +// +// Solidity: function timeSlotToAmountBonded(uint256 , address ) view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCallerSession) TimeSlotToAmountBonded(arg0 *big.Int, arg1 common.Address) (*big.Int, error) { + return _HopL1HopBridge.Contract.TimeSlotToAmountBonded(&_HopL1HopBridge.CallOpts, arg0, arg1) +} + +// TransferBonds is a free data retrieval call binding the contract method 0x5a7e1083. +// +// Solidity: function transferBonds(bytes32 ) view returns(address bonder, uint256 createdAt, uint256 totalAmount, uint256 challengeStartTime, address challenger, bool challengeResolved) +func (_HopL1HopBridge *HopL1HopBridgeCaller) TransferBonds(opts *bind.CallOpts, arg0 [32]byte) (struct { + Bonder common.Address + CreatedAt *big.Int + TotalAmount *big.Int + ChallengeStartTime *big.Int + Challenger common.Address + ChallengeResolved bool +}, error) { + var out []interface{} + err := _HopL1HopBridge.contract.Call(opts, &out, "transferBonds", arg0) + + outstruct := new(struct { + Bonder common.Address + CreatedAt *big.Int + TotalAmount *big.Int + ChallengeStartTime *big.Int + Challenger common.Address + ChallengeResolved bool + }) + if err != nil { + return *outstruct, err + } + + outstruct.Bonder = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + outstruct.CreatedAt = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.TotalAmount = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.ChallengeStartTime = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + outstruct.Challenger = *abi.ConvertType(out[4], new(common.Address)).(*common.Address) + outstruct.ChallengeResolved = *abi.ConvertType(out[5], new(bool)).(*bool) + + return *outstruct, err + +} + +// TransferBonds is a free data retrieval call binding the contract method 0x5a7e1083. +// +// Solidity: function transferBonds(bytes32 ) view returns(address bonder, uint256 createdAt, uint256 totalAmount, uint256 challengeStartTime, address challenger, bool challengeResolved) +func (_HopL1HopBridge *HopL1HopBridgeSession) TransferBonds(arg0 [32]byte) (struct { + Bonder common.Address + CreatedAt *big.Int + TotalAmount *big.Int + ChallengeStartTime *big.Int + Challenger common.Address + ChallengeResolved bool +}, error) { + return _HopL1HopBridge.Contract.TransferBonds(&_HopL1HopBridge.CallOpts, arg0) +} + +// TransferBonds is a free data retrieval call binding the contract method 0x5a7e1083. +// +// Solidity: function transferBonds(bytes32 ) view returns(address bonder, uint256 createdAt, uint256 totalAmount, uint256 challengeStartTime, address challenger, bool challengeResolved) +func (_HopL1HopBridge *HopL1HopBridgeCallerSession) TransferBonds(arg0 [32]byte) (struct { + Bonder common.Address + CreatedAt *big.Int + TotalAmount *big.Int + ChallengeStartTime *big.Int + Challenger common.Address + ChallengeResolved bool +}, error) { + return _HopL1HopBridge.Contract.TransferBonds(&_HopL1HopBridge.CallOpts, arg0) +} + +// TransferRootCommittedAt is a free data retrieval call binding the contract method 0x3b8fea28. +// +// Solidity: function transferRootCommittedAt(uint256 , bytes32 ) view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCaller) TransferRootCommittedAt(opts *bind.CallOpts, arg0 *big.Int, arg1 [32]byte) (*big.Int, error) { + var out []interface{} + err := _HopL1HopBridge.contract.Call(opts, &out, "transferRootCommittedAt", arg0, arg1) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TransferRootCommittedAt is a free data retrieval call binding the contract method 0x3b8fea28. +// +// Solidity: function transferRootCommittedAt(uint256 , bytes32 ) view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeSession) TransferRootCommittedAt(arg0 *big.Int, arg1 [32]byte) (*big.Int, error) { + return _HopL1HopBridge.Contract.TransferRootCommittedAt(&_HopL1HopBridge.CallOpts, arg0, arg1) +} + +// TransferRootCommittedAt is a free data retrieval call binding the contract method 0x3b8fea28. +// +// Solidity: function transferRootCommittedAt(uint256 , bytes32 ) view returns(uint256) +func (_HopL1HopBridge *HopL1HopBridgeCallerSession) TransferRootCommittedAt(arg0 *big.Int, arg1 [32]byte) (*big.Int, error) { + return _HopL1HopBridge.Contract.TransferRootCommittedAt(&_HopL1HopBridge.CallOpts, arg0, arg1) +} + +// AddBonder is a paid mutator transaction binding the contract method 0x5325937f. +// +// Solidity: function addBonder(address bonder) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactor) AddBonder(opts *bind.TransactOpts, bonder common.Address) (*types.Transaction, error) { + return _HopL1HopBridge.contract.Transact(opts, "addBonder", bonder) +} + +// AddBonder is a paid mutator transaction binding the contract method 0x5325937f. +// +// Solidity: function addBonder(address bonder) returns() +func (_HopL1HopBridge *HopL1HopBridgeSession) AddBonder(bonder common.Address) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.AddBonder(&_HopL1HopBridge.TransactOpts, bonder) +} + +// AddBonder is a paid mutator transaction binding the contract method 0x5325937f. +// +// Solidity: function addBonder(address bonder) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactorSession) AddBonder(bonder common.Address) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.AddBonder(&_HopL1HopBridge.TransactOpts, bonder) +} + +// BondTransferRoot is a paid mutator transaction binding the contract method 0x8d8798bf. +// +// Solidity: function bondTransferRoot(bytes32 rootHash, uint256 destinationChainId, uint256 totalAmount) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactor) BondTransferRoot(opts *bind.TransactOpts, rootHash [32]byte, destinationChainId *big.Int, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.contract.Transact(opts, "bondTransferRoot", rootHash, destinationChainId, totalAmount) +} + +// BondTransferRoot is a paid mutator transaction binding the contract method 0x8d8798bf. +// +// Solidity: function bondTransferRoot(bytes32 rootHash, uint256 destinationChainId, uint256 totalAmount) returns() +func (_HopL1HopBridge *HopL1HopBridgeSession) BondTransferRoot(rootHash [32]byte, destinationChainId *big.Int, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.BondTransferRoot(&_HopL1HopBridge.TransactOpts, rootHash, destinationChainId, totalAmount) +} + +// BondTransferRoot is a paid mutator transaction binding the contract method 0x8d8798bf. +// +// Solidity: function bondTransferRoot(bytes32 rootHash, uint256 destinationChainId, uint256 totalAmount) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactorSession) BondTransferRoot(rootHash [32]byte, destinationChainId *big.Int, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.BondTransferRoot(&_HopL1HopBridge.TransactOpts, rootHash, destinationChainId, totalAmount) +} + +// BondWithdrawal is a paid mutator transaction binding the contract method 0x23c452cd. +// +// Solidity: function bondWithdrawal(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactor) BondWithdrawal(opts *bind.TransactOpts, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.contract.Transact(opts, "bondWithdrawal", recipient, amount, transferNonce, bonderFee) +} + +// BondWithdrawal is a paid mutator transaction binding the contract method 0x23c452cd. +// +// Solidity: function bondWithdrawal(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee) returns() +func (_HopL1HopBridge *HopL1HopBridgeSession) BondWithdrawal(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.BondWithdrawal(&_HopL1HopBridge.TransactOpts, recipient, amount, transferNonce, bonderFee) +} + +// BondWithdrawal is a paid mutator transaction binding the contract method 0x23c452cd. +// +// Solidity: function bondWithdrawal(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactorSession) BondWithdrawal(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.BondWithdrawal(&_HopL1HopBridge.TransactOpts, recipient, amount, transferNonce, bonderFee) +} + +// ChallengeTransferBond is a paid mutator transaction binding the contract method 0x1bbe15ea. +// +// Solidity: function challengeTransferBond(bytes32 rootHash, uint256 originalAmount, uint256 destinationChainId) payable returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactor) ChallengeTransferBond(opts *bind.TransactOpts, rootHash [32]byte, originalAmount *big.Int, destinationChainId *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.contract.Transact(opts, "challengeTransferBond", rootHash, originalAmount, destinationChainId) +} + +// ChallengeTransferBond is a paid mutator transaction binding the contract method 0x1bbe15ea. +// +// Solidity: function challengeTransferBond(bytes32 rootHash, uint256 originalAmount, uint256 destinationChainId) payable returns() +func (_HopL1HopBridge *HopL1HopBridgeSession) ChallengeTransferBond(rootHash [32]byte, originalAmount *big.Int, destinationChainId *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.ChallengeTransferBond(&_HopL1HopBridge.TransactOpts, rootHash, originalAmount, destinationChainId) +} + +// ChallengeTransferBond is a paid mutator transaction binding the contract method 0x1bbe15ea. +// +// Solidity: function challengeTransferBond(bytes32 rootHash, uint256 originalAmount, uint256 destinationChainId) payable returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactorSession) ChallengeTransferBond(rootHash [32]byte, originalAmount *big.Int, destinationChainId *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.ChallengeTransferBond(&_HopL1HopBridge.TransactOpts, rootHash, originalAmount, destinationChainId) +} + +// ConfirmTransferRoot is a paid mutator transaction binding the contract method 0xef6ebe5e. +// +// Solidity: function confirmTransferRoot(uint256 originChainId, bytes32 rootHash, uint256 destinationChainId, uint256 totalAmount, uint256 rootCommittedAt) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactor) ConfirmTransferRoot(opts *bind.TransactOpts, originChainId *big.Int, rootHash [32]byte, destinationChainId *big.Int, totalAmount *big.Int, rootCommittedAt *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.contract.Transact(opts, "confirmTransferRoot", originChainId, rootHash, destinationChainId, totalAmount, rootCommittedAt) +} + +// ConfirmTransferRoot is a paid mutator transaction binding the contract method 0xef6ebe5e. +// +// Solidity: function confirmTransferRoot(uint256 originChainId, bytes32 rootHash, uint256 destinationChainId, uint256 totalAmount, uint256 rootCommittedAt) returns() +func (_HopL1HopBridge *HopL1HopBridgeSession) ConfirmTransferRoot(originChainId *big.Int, rootHash [32]byte, destinationChainId *big.Int, totalAmount *big.Int, rootCommittedAt *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.ConfirmTransferRoot(&_HopL1HopBridge.TransactOpts, originChainId, rootHash, destinationChainId, totalAmount, rootCommittedAt) +} + +// ConfirmTransferRoot is a paid mutator transaction binding the contract method 0xef6ebe5e. +// +// Solidity: function confirmTransferRoot(uint256 originChainId, bytes32 rootHash, uint256 destinationChainId, uint256 totalAmount, uint256 rootCommittedAt) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactorSession) ConfirmTransferRoot(originChainId *big.Int, rootHash [32]byte, destinationChainId *big.Int, totalAmount *big.Int, rootCommittedAt *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.ConfirmTransferRoot(&_HopL1HopBridge.TransactOpts, originChainId, rootHash, destinationChainId, totalAmount, rootCommittedAt) +} + +// MigrateTokens is a paid mutator transaction binding the contract method 0xc1684711. +// +// Solidity: function migrateTokens(address recipient) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactor) MigrateTokens(opts *bind.TransactOpts, recipient common.Address) (*types.Transaction, error) { + return _HopL1HopBridge.contract.Transact(opts, "migrateTokens", recipient) +} + +// MigrateTokens is a paid mutator transaction binding the contract method 0xc1684711. +// +// Solidity: function migrateTokens(address recipient) returns() +func (_HopL1HopBridge *HopL1HopBridgeSession) MigrateTokens(recipient common.Address) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.MigrateTokens(&_HopL1HopBridge.TransactOpts, recipient) +} + +// MigrateTokens is a paid mutator transaction binding the contract method 0xc1684711. +// +// Solidity: function migrateTokens(address recipient) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactorSession) MigrateTokens(recipient common.Address) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.MigrateTokens(&_HopL1HopBridge.TransactOpts, recipient) +} + +// RemoveBonder is a paid mutator transaction binding the contract method 0x04e6c2c0. +// +// Solidity: function removeBonder(address bonder) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactor) RemoveBonder(opts *bind.TransactOpts, bonder common.Address) (*types.Transaction, error) { + return _HopL1HopBridge.contract.Transact(opts, "removeBonder", bonder) +} + +// RemoveBonder is a paid mutator transaction binding the contract method 0x04e6c2c0. +// +// Solidity: function removeBonder(address bonder) returns() +func (_HopL1HopBridge *HopL1HopBridgeSession) RemoveBonder(bonder common.Address) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.RemoveBonder(&_HopL1HopBridge.TransactOpts, bonder) +} + +// RemoveBonder is a paid mutator transaction binding the contract method 0x04e6c2c0. +// +// Solidity: function removeBonder(address bonder) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactorSession) RemoveBonder(bonder common.Address) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.RemoveBonder(&_HopL1HopBridge.TransactOpts, bonder) +} + +// RescueTransferRoot is a paid mutator transaction binding the contract method 0xcbd1642e. +// +// Solidity: function rescueTransferRoot(bytes32 rootHash, uint256 originalAmount, address recipient) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactor) RescueTransferRoot(opts *bind.TransactOpts, rootHash [32]byte, originalAmount *big.Int, recipient common.Address) (*types.Transaction, error) { + return _HopL1HopBridge.contract.Transact(opts, "rescueTransferRoot", rootHash, originalAmount, recipient) +} + +// RescueTransferRoot is a paid mutator transaction binding the contract method 0xcbd1642e. +// +// Solidity: function rescueTransferRoot(bytes32 rootHash, uint256 originalAmount, address recipient) returns() +func (_HopL1HopBridge *HopL1HopBridgeSession) RescueTransferRoot(rootHash [32]byte, originalAmount *big.Int, recipient common.Address) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.RescueTransferRoot(&_HopL1HopBridge.TransactOpts, rootHash, originalAmount, recipient) +} + +// RescueTransferRoot is a paid mutator transaction binding the contract method 0xcbd1642e. +// +// Solidity: function rescueTransferRoot(bytes32 rootHash, uint256 originalAmount, address recipient) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactorSession) RescueTransferRoot(rootHash [32]byte, originalAmount *big.Int, recipient common.Address) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.RescueTransferRoot(&_HopL1HopBridge.TransactOpts, rootHash, originalAmount, recipient) +} + +// ResolveChallenge is a paid mutator transaction binding the contract method 0x81707b80. +// +// Solidity: function resolveChallenge(bytes32 rootHash, uint256 originalAmount, uint256 destinationChainId) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactor) ResolveChallenge(opts *bind.TransactOpts, rootHash [32]byte, originalAmount *big.Int, destinationChainId *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.contract.Transact(opts, "resolveChallenge", rootHash, originalAmount, destinationChainId) +} + +// ResolveChallenge is a paid mutator transaction binding the contract method 0x81707b80. +// +// Solidity: function resolveChallenge(bytes32 rootHash, uint256 originalAmount, uint256 destinationChainId) returns() +func (_HopL1HopBridge *HopL1HopBridgeSession) ResolveChallenge(rootHash [32]byte, originalAmount *big.Int, destinationChainId *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.ResolveChallenge(&_HopL1HopBridge.TransactOpts, rootHash, originalAmount, destinationChainId) +} + +// ResolveChallenge is a paid mutator transaction binding the contract method 0x81707b80. +// +// Solidity: function resolveChallenge(bytes32 rootHash, uint256 originalAmount, uint256 destinationChainId) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactorSession) ResolveChallenge(rootHash [32]byte, originalAmount *big.Int, destinationChainId *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.ResolveChallenge(&_HopL1HopBridge.TransactOpts, rootHash, originalAmount, destinationChainId) +} + +// SendToL2 is a paid mutator transaction binding the contract method 0xdeace8f5. +// +// Solidity: function sendToL2(uint256 chainId, address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address relayer, uint256 relayerFee) payable returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactor) SendToL2(opts *bind.TransactOpts, chainId *big.Int, recipient common.Address, amount *big.Int, amountOutMin *big.Int, deadline *big.Int, relayer common.Address, relayerFee *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.contract.Transact(opts, "sendToL2", chainId, recipient, amount, amountOutMin, deadline, relayer, relayerFee) +} + +// SendToL2 is a paid mutator transaction binding the contract method 0xdeace8f5. +// +// Solidity: function sendToL2(uint256 chainId, address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address relayer, uint256 relayerFee) payable returns() +func (_HopL1HopBridge *HopL1HopBridgeSession) SendToL2(chainId *big.Int, recipient common.Address, amount *big.Int, amountOutMin *big.Int, deadline *big.Int, relayer common.Address, relayerFee *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.SendToL2(&_HopL1HopBridge.TransactOpts, chainId, recipient, amount, amountOutMin, deadline, relayer, relayerFee) +} + +// SendToL2 is a paid mutator transaction binding the contract method 0xdeace8f5. +// +// Solidity: function sendToL2(uint256 chainId, address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address relayer, uint256 relayerFee) payable returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactorSession) SendToL2(chainId *big.Int, recipient common.Address, amount *big.Int, amountOutMin *big.Int, deadline *big.Int, relayer common.Address, relayerFee *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.SendToL2(&_HopL1HopBridge.TransactOpts, chainId, recipient, amount, amountOutMin, deadline, relayer, relayerFee) +} + +// SetChainIdDepositsPaused is a paid mutator transaction binding the contract method 0x14942024. +// +// Solidity: function setChainIdDepositsPaused(uint256 chainId, bool isPaused) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactor) SetChainIdDepositsPaused(opts *bind.TransactOpts, chainId *big.Int, isPaused bool) (*types.Transaction, error) { + return _HopL1HopBridge.contract.Transact(opts, "setChainIdDepositsPaused", chainId, isPaused) +} + +// SetChainIdDepositsPaused is a paid mutator transaction binding the contract method 0x14942024. +// +// Solidity: function setChainIdDepositsPaused(uint256 chainId, bool isPaused) returns() +func (_HopL1HopBridge *HopL1HopBridgeSession) SetChainIdDepositsPaused(chainId *big.Int, isPaused bool) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.SetChainIdDepositsPaused(&_HopL1HopBridge.TransactOpts, chainId, isPaused) +} + +// SetChainIdDepositsPaused is a paid mutator transaction binding the contract method 0x14942024. +// +// Solidity: function setChainIdDepositsPaused(uint256 chainId, bool isPaused) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactorSession) SetChainIdDepositsPaused(chainId *big.Int, isPaused bool) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.SetChainIdDepositsPaused(&_HopL1HopBridge.TransactOpts, chainId, isPaused) +} + +// SetChallengePeriod is a paid mutator transaction binding the contract method 0x5d475fdd. +// +// Solidity: function setChallengePeriod(uint256 _challengePeriod) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactor) SetChallengePeriod(opts *bind.TransactOpts, _challengePeriod *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.contract.Transact(opts, "setChallengePeriod", _challengePeriod) +} + +// SetChallengePeriod is a paid mutator transaction binding the contract method 0x5d475fdd. +// +// Solidity: function setChallengePeriod(uint256 _challengePeriod) returns() +func (_HopL1HopBridge *HopL1HopBridgeSession) SetChallengePeriod(_challengePeriod *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.SetChallengePeriod(&_HopL1HopBridge.TransactOpts, _challengePeriod) +} + +// SetChallengePeriod is a paid mutator transaction binding the contract method 0x5d475fdd. +// +// Solidity: function setChallengePeriod(uint256 _challengePeriod) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactorSession) SetChallengePeriod(_challengePeriod *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.SetChallengePeriod(&_HopL1HopBridge.TransactOpts, _challengePeriod) +} + +// SetChallengeResolutionPeriod is a paid mutator transaction binding the contract method 0xeecd57e6. +// +// Solidity: function setChallengeResolutionPeriod(uint256 _challengeResolutionPeriod) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactor) SetChallengeResolutionPeriod(opts *bind.TransactOpts, _challengeResolutionPeriod *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.contract.Transact(opts, "setChallengeResolutionPeriod", _challengeResolutionPeriod) +} + +// SetChallengeResolutionPeriod is a paid mutator transaction binding the contract method 0xeecd57e6. +// +// Solidity: function setChallengeResolutionPeriod(uint256 _challengeResolutionPeriod) returns() +func (_HopL1HopBridge *HopL1HopBridgeSession) SetChallengeResolutionPeriod(_challengeResolutionPeriod *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.SetChallengeResolutionPeriod(&_HopL1HopBridge.TransactOpts, _challengeResolutionPeriod) +} + +// SetChallengeResolutionPeriod is a paid mutator transaction binding the contract method 0xeecd57e6. +// +// Solidity: function setChallengeResolutionPeriod(uint256 _challengeResolutionPeriod) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactorSession) SetChallengeResolutionPeriod(_challengeResolutionPeriod *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.SetChallengeResolutionPeriod(&_HopL1HopBridge.TransactOpts, _challengeResolutionPeriod) +} + +// SetCrossDomainMessengerWrapper is a paid mutator transaction binding the contract method 0xd4448163. +// +// Solidity: function setCrossDomainMessengerWrapper(uint256 chainId, address _crossDomainMessengerWrapper) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactor) SetCrossDomainMessengerWrapper(opts *bind.TransactOpts, chainId *big.Int, _crossDomainMessengerWrapper common.Address) (*types.Transaction, error) { + return _HopL1HopBridge.contract.Transact(opts, "setCrossDomainMessengerWrapper", chainId, _crossDomainMessengerWrapper) +} + +// SetCrossDomainMessengerWrapper is a paid mutator transaction binding the contract method 0xd4448163. +// +// Solidity: function setCrossDomainMessengerWrapper(uint256 chainId, address _crossDomainMessengerWrapper) returns() +func (_HopL1HopBridge *HopL1HopBridgeSession) SetCrossDomainMessengerWrapper(chainId *big.Int, _crossDomainMessengerWrapper common.Address) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.SetCrossDomainMessengerWrapper(&_HopL1HopBridge.TransactOpts, chainId, _crossDomainMessengerWrapper) +} + +// SetCrossDomainMessengerWrapper is a paid mutator transaction binding the contract method 0xd4448163. +// +// Solidity: function setCrossDomainMessengerWrapper(uint256 chainId, address _crossDomainMessengerWrapper) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactorSession) SetCrossDomainMessengerWrapper(chainId *big.Int, _crossDomainMessengerWrapper common.Address) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.SetCrossDomainMessengerWrapper(&_HopL1HopBridge.TransactOpts, chainId, _crossDomainMessengerWrapper) +} + +// SetGovernance is a paid mutator transaction binding the contract method 0xab033ea9. +// +// Solidity: function setGovernance(address _newGovernance) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactor) SetGovernance(opts *bind.TransactOpts, _newGovernance common.Address) (*types.Transaction, error) { + return _HopL1HopBridge.contract.Transact(opts, "setGovernance", _newGovernance) +} + +// SetGovernance is a paid mutator transaction binding the contract method 0xab033ea9. +// +// Solidity: function setGovernance(address _newGovernance) returns() +func (_HopL1HopBridge *HopL1HopBridgeSession) SetGovernance(_newGovernance common.Address) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.SetGovernance(&_HopL1HopBridge.TransactOpts, _newGovernance) +} + +// SetGovernance is a paid mutator transaction binding the contract method 0xab033ea9. +// +// Solidity: function setGovernance(address _newGovernance) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactorSession) SetGovernance(_newGovernance common.Address) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.SetGovernance(&_HopL1HopBridge.TransactOpts, _newGovernance) +} + +// SetMigrator is a paid mutator transaction binding the contract method 0x23cf3118. +// +// Solidity: function setMigrator(address _newMigrator) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactor) SetMigrator(opts *bind.TransactOpts, _newMigrator common.Address) (*types.Transaction, error) { + return _HopL1HopBridge.contract.Transact(opts, "setMigrator", _newMigrator) +} + +// SetMigrator is a paid mutator transaction binding the contract method 0x23cf3118. +// +// Solidity: function setMigrator(address _newMigrator) returns() +func (_HopL1HopBridge *HopL1HopBridgeSession) SetMigrator(_newMigrator common.Address) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.SetMigrator(&_HopL1HopBridge.TransactOpts, _newMigrator) +} + +// SetMigrator is a paid mutator transaction binding the contract method 0x23cf3118. +// +// Solidity: function setMigrator(address _newMigrator) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactorSession) SetMigrator(_newMigrator common.Address) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.SetMigrator(&_HopL1HopBridge.TransactOpts, _newMigrator) +} + +// SetMinTransferRootBondDelay is a paid mutator transaction binding the contract method 0x39ada669. +// +// Solidity: function setMinTransferRootBondDelay(uint256 _minTransferRootBondDelay) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactor) SetMinTransferRootBondDelay(opts *bind.TransactOpts, _minTransferRootBondDelay *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.contract.Transact(opts, "setMinTransferRootBondDelay", _minTransferRootBondDelay) +} + +// SetMinTransferRootBondDelay is a paid mutator transaction binding the contract method 0x39ada669. +// +// Solidity: function setMinTransferRootBondDelay(uint256 _minTransferRootBondDelay) returns() +func (_HopL1HopBridge *HopL1HopBridgeSession) SetMinTransferRootBondDelay(_minTransferRootBondDelay *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.SetMinTransferRootBondDelay(&_HopL1HopBridge.TransactOpts, _minTransferRootBondDelay) +} + +// SetMinTransferRootBondDelay is a paid mutator transaction binding the contract method 0x39ada669. +// +// Solidity: function setMinTransferRootBondDelay(uint256 _minTransferRootBondDelay) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactorSession) SetMinTransferRootBondDelay(_minTransferRootBondDelay *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.SetMinTransferRootBondDelay(&_HopL1HopBridge.TransactOpts, _minTransferRootBondDelay) +} + +// SettleBondedWithdrawal is a paid mutator transaction binding the contract method 0xc7525dd3. +// +// Solidity: function settleBondedWithdrawal(address bonder, bytes32 transferId, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactor) SettleBondedWithdrawal(opts *bind.TransactOpts, bonder common.Address, transferId [32]byte, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.contract.Transact(opts, "settleBondedWithdrawal", bonder, transferId, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +} + +// SettleBondedWithdrawal is a paid mutator transaction binding the contract method 0xc7525dd3. +// +// Solidity: function settleBondedWithdrawal(address bonder, bytes32 transferId, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() +func (_HopL1HopBridge *HopL1HopBridgeSession) SettleBondedWithdrawal(bonder common.Address, transferId [32]byte, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.SettleBondedWithdrawal(&_HopL1HopBridge.TransactOpts, bonder, transferId, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +} + +// SettleBondedWithdrawal is a paid mutator transaction binding the contract method 0xc7525dd3. +// +// Solidity: function settleBondedWithdrawal(address bonder, bytes32 transferId, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactorSession) SettleBondedWithdrawal(bonder common.Address, transferId [32]byte, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.SettleBondedWithdrawal(&_HopL1HopBridge.TransactOpts, bonder, transferId, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +} + +// SettleBondedWithdrawals is a paid mutator transaction binding the contract method 0xb162717e. +// +// Solidity: function settleBondedWithdrawals(address bonder, bytes32[] transferIds, uint256 totalAmount) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactor) SettleBondedWithdrawals(opts *bind.TransactOpts, bonder common.Address, transferIds [][32]byte, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.contract.Transact(opts, "settleBondedWithdrawals", bonder, transferIds, totalAmount) +} + +// SettleBondedWithdrawals is a paid mutator transaction binding the contract method 0xb162717e. +// +// Solidity: function settleBondedWithdrawals(address bonder, bytes32[] transferIds, uint256 totalAmount) returns() +func (_HopL1HopBridge *HopL1HopBridgeSession) SettleBondedWithdrawals(bonder common.Address, transferIds [][32]byte, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.SettleBondedWithdrawals(&_HopL1HopBridge.TransactOpts, bonder, transferIds, totalAmount) +} + +// SettleBondedWithdrawals is a paid mutator transaction binding the contract method 0xb162717e. +// +// Solidity: function settleBondedWithdrawals(address bonder, bytes32[] transferIds, uint256 totalAmount) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactorSession) SettleBondedWithdrawals(bonder common.Address, transferIds [][32]byte, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.SettleBondedWithdrawals(&_HopL1HopBridge.TransactOpts, bonder, transferIds, totalAmount) +} + +// Stake is a paid mutator transaction binding the contract method 0xadc9772e. +// +// Solidity: function stake(address bonder, uint256 amount) payable returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactor) Stake(opts *bind.TransactOpts, bonder common.Address, amount *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.contract.Transact(opts, "stake", bonder, amount) +} + +// Stake is a paid mutator transaction binding the contract method 0xadc9772e. +// +// Solidity: function stake(address bonder, uint256 amount) payable returns() +func (_HopL1HopBridge *HopL1HopBridgeSession) Stake(bonder common.Address, amount *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.Stake(&_HopL1HopBridge.TransactOpts, bonder, amount) +} + +// Stake is a paid mutator transaction binding the contract method 0xadc9772e. +// +// Solidity: function stake(address bonder, uint256 amount) payable returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactorSession) Stake(bonder common.Address, amount *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.Stake(&_HopL1HopBridge.TransactOpts, bonder, amount) +} + +// Unstake is a paid mutator transaction binding the contract method 0x2e17de78. +// +// Solidity: function unstake(uint256 amount) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactor) Unstake(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.contract.Transact(opts, "unstake", amount) +} + +// Unstake is a paid mutator transaction binding the contract method 0x2e17de78. +// +// Solidity: function unstake(uint256 amount) returns() +func (_HopL1HopBridge *HopL1HopBridgeSession) Unstake(amount *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.Unstake(&_HopL1HopBridge.TransactOpts, amount) +} + +// Unstake is a paid mutator transaction binding the contract method 0x2e17de78. +// +// Solidity: function unstake(uint256 amount) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactorSession) Unstake(amount *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.Unstake(&_HopL1HopBridge.TransactOpts, amount) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x0f7aadb7. +// +// Solidity: function withdraw(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactor) Withdraw(opts *bind.TransactOpts, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.contract.Transact(opts, "withdraw", recipient, amount, transferNonce, bonderFee, amountOutMin, deadline, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x0f7aadb7. +// +// Solidity: function withdraw(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() +func (_HopL1HopBridge *HopL1HopBridgeSession) Withdraw(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.Withdraw(&_HopL1HopBridge.TransactOpts, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x0f7aadb7. +// +// Solidity: function withdraw(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() +func (_HopL1HopBridge *HopL1HopBridgeTransactorSession) Withdraw(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL1HopBridge.Contract.Withdraw(&_HopL1HopBridge.TransactOpts, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +} + +// HopL1HopBridgeBonderAddedIterator is returned from FilterBonderAdded and is used to iterate over the raw logs and unpacked data for BonderAdded events raised by the HopL1HopBridge contract. +type HopL1HopBridgeBonderAddedIterator struct { + Event *HopL1HopBridgeBonderAdded // 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 *HopL1HopBridgeBonderAddedIterator) 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(HopL1HopBridgeBonderAdded) + 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(HopL1HopBridgeBonderAdded) + 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 *HopL1HopBridgeBonderAddedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1HopBridgeBonderAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1HopBridgeBonderAdded represents a BonderAdded event raised by the HopL1HopBridge contract. +type HopL1HopBridgeBonderAdded struct { + NewBonder common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBonderAdded is a free log retrieval operation binding the contract event 0x2cec73b7434d3b91198ad1a618f63e6a0761ce281af5ec9ec76606d948d03e23. +// +// Solidity: event BonderAdded(address indexed newBonder) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) FilterBonderAdded(opts *bind.FilterOpts, newBonder []common.Address) (*HopL1HopBridgeBonderAddedIterator, error) { + + var newBonderRule []interface{} + for _, newBonderItem := range newBonder { + newBonderRule = append(newBonderRule, newBonderItem) + } + + logs, sub, err := _HopL1HopBridge.contract.FilterLogs(opts, "BonderAdded", newBonderRule) + if err != nil { + return nil, err + } + return &HopL1HopBridgeBonderAddedIterator{contract: _HopL1HopBridge.contract, event: "BonderAdded", logs: logs, sub: sub}, nil +} + +// WatchBonderAdded is a free log subscription operation binding the contract event 0x2cec73b7434d3b91198ad1a618f63e6a0761ce281af5ec9ec76606d948d03e23. +// +// Solidity: event BonderAdded(address indexed newBonder) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) WatchBonderAdded(opts *bind.WatchOpts, sink chan<- *HopL1HopBridgeBonderAdded, newBonder []common.Address) (event.Subscription, error) { + + var newBonderRule []interface{} + for _, newBonderItem := range newBonder { + newBonderRule = append(newBonderRule, newBonderItem) + } + + logs, sub, err := _HopL1HopBridge.contract.WatchLogs(opts, "BonderAdded", newBonderRule) + 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(HopL1HopBridgeBonderAdded) + if err := _HopL1HopBridge.contract.UnpackLog(event, "BonderAdded", 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 +} + +// ParseBonderAdded is a log parse operation binding the contract event 0x2cec73b7434d3b91198ad1a618f63e6a0761ce281af5ec9ec76606d948d03e23. +// +// Solidity: event BonderAdded(address indexed newBonder) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) ParseBonderAdded(log types.Log) (*HopL1HopBridgeBonderAdded, error) { + event := new(HopL1HopBridgeBonderAdded) + if err := _HopL1HopBridge.contract.UnpackLog(event, "BonderAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL1HopBridgeBonderRemovedIterator is returned from FilterBonderRemoved and is used to iterate over the raw logs and unpacked data for BonderRemoved events raised by the HopL1HopBridge contract. +type HopL1HopBridgeBonderRemovedIterator struct { + Event *HopL1HopBridgeBonderRemoved // 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 *HopL1HopBridgeBonderRemovedIterator) 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(HopL1HopBridgeBonderRemoved) + 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(HopL1HopBridgeBonderRemoved) + 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 *HopL1HopBridgeBonderRemovedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1HopBridgeBonderRemovedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1HopBridgeBonderRemoved represents a BonderRemoved event raised by the HopL1HopBridge contract. +type HopL1HopBridgeBonderRemoved struct { + PreviousBonder common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBonderRemoved is a free log retrieval operation binding the contract event 0x4234ba611d325b3ba434c4e1b037967b955b1274d4185ee9847b7491111a48ff. +// +// Solidity: event BonderRemoved(address indexed previousBonder) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) FilterBonderRemoved(opts *bind.FilterOpts, previousBonder []common.Address) (*HopL1HopBridgeBonderRemovedIterator, error) { + + var previousBonderRule []interface{} + for _, previousBonderItem := range previousBonder { + previousBonderRule = append(previousBonderRule, previousBonderItem) + } + + logs, sub, err := _HopL1HopBridge.contract.FilterLogs(opts, "BonderRemoved", previousBonderRule) + if err != nil { + return nil, err + } + return &HopL1HopBridgeBonderRemovedIterator{contract: _HopL1HopBridge.contract, event: "BonderRemoved", logs: logs, sub: sub}, nil +} + +// WatchBonderRemoved is a free log subscription operation binding the contract event 0x4234ba611d325b3ba434c4e1b037967b955b1274d4185ee9847b7491111a48ff. +// +// Solidity: event BonderRemoved(address indexed previousBonder) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) WatchBonderRemoved(opts *bind.WatchOpts, sink chan<- *HopL1HopBridgeBonderRemoved, previousBonder []common.Address) (event.Subscription, error) { + + var previousBonderRule []interface{} + for _, previousBonderItem := range previousBonder { + previousBonderRule = append(previousBonderRule, previousBonderItem) + } + + logs, sub, err := _HopL1HopBridge.contract.WatchLogs(opts, "BonderRemoved", previousBonderRule) + 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(HopL1HopBridgeBonderRemoved) + if err := _HopL1HopBridge.contract.UnpackLog(event, "BonderRemoved", 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 +} + +// ParseBonderRemoved is a log parse operation binding the contract event 0x4234ba611d325b3ba434c4e1b037967b955b1274d4185ee9847b7491111a48ff. +// +// Solidity: event BonderRemoved(address indexed previousBonder) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) ParseBonderRemoved(log types.Log) (*HopL1HopBridgeBonderRemoved, error) { + event := new(HopL1HopBridgeBonderRemoved) + if err := _HopL1HopBridge.contract.UnpackLog(event, "BonderRemoved", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL1HopBridgeChallengeResolvedIterator is returned from FilterChallengeResolved and is used to iterate over the raw logs and unpacked data for ChallengeResolved events raised by the HopL1HopBridge contract. +type HopL1HopBridgeChallengeResolvedIterator struct { + Event *HopL1HopBridgeChallengeResolved // 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 *HopL1HopBridgeChallengeResolvedIterator) 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(HopL1HopBridgeChallengeResolved) + 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(HopL1HopBridgeChallengeResolved) + 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 *HopL1HopBridgeChallengeResolvedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1HopBridgeChallengeResolvedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1HopBridgeChallengeResolved represents a ChallengeResolved event raised by the HopL1HopBridge contract. +type HopL1HopBridgeChallengeResolved struct { + TransferRootId [32]byte + RootHash [32]byte + OriginalAmount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterChallengeResolved is a free log retrieval operation binding the contract event 0x4a99228a8a6d774d261be57ab0ed833bb1bae1f22bbbd3d4767b75ad03fdddf7. +// +// Solidity: event ChallengeResolved(bytes32 indexed transferRootId, bytes32 indexed rootHash, uint256 originalAmount) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) FilterChallengeResolved(opts *bind.FilterOpts, transferRootId [][32]byte, rootHash [][32]byte) (*HopL1HopBridgeChallengeResolvedIterator, error) { + + var transferRootIdRule []interface{} + for _, transferRootIdItem := range transferRootId { + transferRootIdRule = append(transferRootIdRule, transferRootIdItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL1HopBridge.contract.FilterLogs(opts, "ChallengeResolved", transferRootIdRule, rootHashRule) + if err != nil { + return nil, err + } + return &HopL1HopBridgeChallengeResolvedIterator{contract: _HopL1HopBridge.contract, event: "ChallengeResolved", logs: logs, sub: sub}, nil +} + +// WatchChallengeResolved is a free log subscription operation binding the contract event 0x4a99228a8a6d774d261be57ab0ed833bb1bae1f22bbbd3d4767b75ad03fdddf7. +// +// Solidity: event ChallengeResolved(bytes32 indexed transferRootId, bytes32 indexed rootHash, uint256 originalAmount) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) WatchChallengeResolved(opts *bind.WatchOpts, sink chan<- *HopL1HopBridgeChallengeResolved, transferRootId [][32]byte, rootHash [][32]byte) (event.Subscription, error) { + + var transferRootIdRule []interface{} + for _, transferRootIdItem := range transferRootId { + transferRootIdRule = append(transferRootIdRule, transferRootIdItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL1HopBridge.contract.WatchLogs(opts, "ChallengeResolved", transferRootIdRule, rootHashRule) + 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(HopL1HopBridgeChallengeResolved) + if err := _HopL1HopBridge.contract.UnpackLog(event, "ChallengeResolved", 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 +} + +// ParseChallengeResolved is a log parse operation binding the contract event 0x4a99228a8a6d774d261be57ab0ed833bb1bae1f22bbbd3d4767b75ad03fdddf7. +// +// Solidity: event ChallengeResolved(bytes32 indexed transferRootId, bytes32 indexed rootHash, uint256 originalAmount) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) ParseChallengeResolved(log types.Log) (*HopL1HopBridgeChallengeResolved, error) { + event := new(HopL1HopBridgeChallengeResolved) + if err := _HopL1HopBridge.contract.UnpackLog(event, "ChallengeResolved", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL1HopBridgeMultipleWithdrawalsSettledIterator is returned from FilterMultipleWithdrawalsSettled and is used to iterate over the raw logs and unpacked data for MultipleWithdrawalsSettled events raised by the HopL1HopBridge contract. +type HopL1HopBridgeMultipleWithdrawalsSettledIterator struct { + Event *HopL1HopBridgeMultipleWithdrawalsSettled // 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 *HopL1HopBridgeMultipleWithdrawalsSettledIterator) 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(HopL1HopBridgeMultipleWithdrawalsSettled) + 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(HopL1HopBridgeMultipleWithdrawalsSettled) + 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 *HopL1HopBridgeMultipleWithdrawalsSettledIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1HopBridgeMultipleWithdrawalsSettledIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1HopBridgeMultipleWithdrawalsSettled represents a MultipleWithdrawalsSettled event raised by the HopL1HopBridge contract. +type HopL1HopBridgeMultipleWithdrawalsSettled struct { + Bonder common.Address + RootHash [32]byte + TotalBondsSettled *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMultipleWithdrawalsSettled is a free log retrieval operation binding the contract event 0x78e830d08be9d5f957414c84d685c061ecbd8467be98b42ebb64f0118b57d2ff. +// +// Solidity: event MultipleWithdrawalsSettled(address indexed bonder, bytes32 indexed rootHash, uint256 totalBondsSettled) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) FilterMultipleWithdrawalsSettled(opts *bind.FilterOpts, bonder []common.Address, rootHash [][32]byte) (*HopL1HopBridgeMultipleWithdrawalsSettledIterator, error) { + + var bonderRule []interface{} + for _, bonderItem := range bonder { + bonderRule = append(bonderRule, bonderItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL1HopBridge.contract.FilterLogs(opts, "MultipleWithdrawalsSettled", bonderRule, rootHashRule) + if err != nil { + return nil, err + } + return &HopL1HopBridgeMultipleWithdrawalsSettledIterator{contract: _HopL1HopBridge.contract, event: "MultipleWithdrawalsSettled", logs: logs, sub: sub}, nil +} + +// WatchMultipleWithdrawalsSettled is a free log subscription operation binding the contract event 0x78e830d08be9d5f957414c84d685c061ecbd8467be98b42ebb64f0118b57d2ff. +// +// Solidity: event MultipleWithdrawalsSettled(address indexed bonder, bytes32 indexed rootHash, uint256 totalBondsSettled) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) WatchMultipleWithdrawalsSettled(opts *bind.WatchOpts, sink chan<- *HopL1HopBridgeMultipleWithdrawalsSettled, bonder []common.Address, rootHash [][32]byte) (event.Subscription, error) { + + var bonderRule []interface{} + for _, bonderItem := range bonder { + bonderRule = append(bonderRule, bonderItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL1HopBridge.contract.WatchLogs(opts, "MultipleWithdrawalsSettled", bonderRule, rootHashRule) + 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(HopL1HopBridgeMultipleWithdrawalsSettled) + if err := _HopL1HopBridge.contract.UnpackLog(event, "MultipleWithdrawalsSettled", 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 +} + +// ParseMultipleWithdrawalsSettled is a log parse operation binding the contract event 0x78e830d08be9d5f957414c84d685c061ecbd8467be98b42ebb64f0118b57d2ff. +// +// Solidity: event MultipleWithdrawalsSettled(address indexed bonder, bytes32 indexed rootHash, uint256 totalBondsSettled) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) ParseMultipleWithdrawalsSettled(log types.Log) (*HopL1HopBridgeMultipleWithdrawalsSettled, error) { + event := new(HopL1HopBridgeMultipleWithdrawalsSettled) + if err := _HopL1HopBridge.contract.UnpackLog(event, "MultipleWithdrawalsSettled", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL1HopBridgeStakeIterator is returned from FilterStake and is used to iterate over the raw logs and unpacked data for Stake events raised by the HopL1HopBridge contract. +type HopL1HopBridgeStakeIterator struct { + Event *HopL1HopBridgeStake // 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 *HopL1HopBridgeStakeIterator) 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(HopL1HopBridgeStake) + 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(HopL1HopBridgeStake) + 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 *HopL1HopBridgeStakeIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1HopBridgeStakeIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1HopBridgeStake represents a Stake event raised by the HopL1HopBridge contract. +type HopL1HopBridgeStake struct { + Account common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterStake is a free log retrieval operation binding the contract event 0xebedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a. +// +// Solidity: event Stake(address indexed account, uint256 amount) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) FilterStake(opts *bind.FilterOpts, account []common.Address) (*HopL1HopBridgeStakeIterator, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _HopL1HopBridge.contract.FilterLogs(opts, "Stake", accountRule) + if err != nil { + return nil, err + } + return &HopL1HopBridgeStakeIterator{contract: _HopL1HopBridge.contract, event: "Stake", logs: logs, sub: sub}, nil +} + +// WatchStake is a free log subscription operation binding the contract event 0xebedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a. +// +// Solidity: event Stake(address indexed account, uint256 amount) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) WatchStake(opts *bind.WatchOpts, sink chan<- *HopL1HopBridgeStake, account []common.Address) (event.Subscription, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _HopL1HopBridge.contract.WatchLogs(opts, "Stake", accountRule) + 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(HopL1HopBridgeStake) + if err := _HopL1HopBridge.contract.UnpackLog(event, "Stake", 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 +} + +// ParseStake is a log parse operation binding the contract event 0xebedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a. +// +// Solidity: event Stake(address indexed account, uint256 amount) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) ParseStake(log types.Log) (*HopL1HopBridgeStake, error) { + event := new(HopL1HopBridgeStake) + if err := _HopL1HopBridge.contract.UnpackLog(event, "Stake", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL1HopBridgeTransferBondChallengedIterator is returned from FilterTransferBondChallenged and is used to iterate over the raw logs and unpacked data for TransferBondChallenged events raised by the HopL1HopBridge contract. +type HopL1HopBridgeTransferBondChallengedIterator struct { + Event *HopL1HopBridgeTransferBondChallenged // 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 *HopL1HopBridgeTransferBondChallengedIterator) 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(HopL1HopBridgeTransferBondChallenged) + 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(HopL1HopBridgeTransferBondChallenged) + 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 *HopL1HopBridgeTransferBondChallengedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1HopBridgeTransferBondChallengedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1HopBridgeTransferBondChallenged represents a TransferBondChallenged event raised by the HopL1HopBridge contract. +type HopL1HopBridgeTransferBondChallenged struct { + TransferRootId [32]byte + RootHash [32]byte + OriginalAmount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransferBondChallenged is a free log retrieval operation binding the contract event 0xec2697dcba539a0ac947cdf1f6d0b6314c065429eca8be2435859b10209d4c27. +// +// Solidity: event TransferBondChallenged(bytes32 indexed transferRootId, bytes32 indexed rootHash, uint256 originalAmount) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) FilterTransferBondChallenged(opts *bind.FilterOpts, transferRootId [][32]byte, rootHash [][32]byte) (*HopL1HopBridgeTransferBondChallengedIterator, error) { + + var transferRootIdRule []interface{} + for _, transferRootIdItem := range transferRootId { + transferRootIdRule = append(transferRootIdRule, transferRootIdItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL1HopBridge.contract.FilterLogs(opts, "TransferBondChallenged", transferRootIdRule, rootHashRule) + if err != nil { + return nil, err + } + return &HopL1HopBridgeTransferBondChallengedIterator{contract: _HopL1HopBridge.contract, event: "TransferBondChallenged", logs: logs, sub: sub}, nil +} + +// WatchTransferBondChallenged is a free log subscription operation binding the contract event 0xec2697dcba539a0ac947cdf1f6d0b6314c065429eca8be2435859b10209d4c27. +// +// Solidity: event TransferBondChallenged(bytes32 indexed transferRootId, bytes32 indexed rootHash, uint256 originalAmount) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) WatchTransferBondChallenged(opts *bind.WatchOpts, sink chan<- *HopL1HopBridgeTransferBondChallenged, transferRootId [][32]byte, rootHash [][32]byte) (event.Subscription, error) { + + var transferRootIdRule []interface{} + for _, transferRootIdItem := range transferRootId { + transferRootIdRule = append(transferRootIdRule, transferRootIdItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL1HopBridge.contract.WatchLogs(opts, "TransferBondChallenged", transferRootIdRule, rootHashRule) + 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(HopL1HopBridgeTransferBondChallenged) + if err := _HopL1HopBridge.contract.UnpackLog(event, "TransferBondChallenged", 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 +} + +// ParseTransferBondChallenged is a log parse operation binding the contract event 0xec2697dcba539a0ac947cdf1f6d0b6314c065429eca8be2435859b10209d4c27. +// +// Solidity: event TransferBondChallenged(bytes32 indexed transferRootId, bytes32 indexed rootHash, uint256 originalAmount) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) ParseTransferBondChallenged(log types.Log) (*HopL1HopBridgeTransferBondChallenged, error) { + event := new(HopL1HopBridgeTransferBondChallenged) + if err := _HopL1HopBridge.contract.UnpackLog(event, "TransferBondChallenged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL1HopBridgeTransferRootBondedIterator is returned from FilterTransferRootBonded and is used to iterate over the raw logs and unpacked data for TransferRootBonded events raised by the HopL1HopBridge contract. +type HopL1HopBridgeTransferRootBondedIterator struct { + Event *HopL1HopBridgeTransferRootBonded // 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 *HopL1HopBridgeTransferRootBondedIterator) 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(HopL1HopBridgeTransferRootBonded) + 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(HopL1HopBridgeTransferRootBonded) + 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 *HopL1HopBridgeTransferRootBondedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1HopBridgeTransferRootBondedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1HopBridgeTransferRootBonded represents a TransferRootBonded event raised by the HopL1HopBridge contract. +type HopL1HopBridgeTransferRootBonded struct { + Root [32]byte + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransferRootBonded is a free log retrieval operation binding the contract event 0xa57b3e1f3af9eca02201028629700658608222c365064584cfe65d9630ef4f7b. +// +// Solidity: event TransferRootBonded(bytes32 indexed root, uint256 amount) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) FilterTransferRootBonded(opts *bind.FilterOpts, root [][32]byte) (*HopL1HopBridgeTransferRootBondedIterator, error) { + + var rootRule []interface{} + for _, rootItem := range root { + rootRule = append(rootRule, rootItem) + } + + logs, sub, err := _HopL1HopBridge.contract.FilterLogs(opts, "TransferRootBonded", rootRule) + if err != nil { + return nil, err + } + return &HopL1HopBridgeTransferRootBondedIterator{contract: _HopL1HopBridge.contract, event: "TransferRootBonded", logs: logs, sub: sub}, nil +} + +// WatchTransferRootBonded is a free log subscription operation binding the contract event 0xa57b3e1f3af9eca02201028629700658608222c365064584cfe65d9630ef4f7b. +// +// Solidity: event TransferRootBonded(bytes32 indexed root, uint256 amount) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) WatchTransferRootBonded(opts *bind.WatchOpts, sink chan<- *HopL1HopBridgeTransferRootBonded, root [][32]byte) (event.Subscription, error) { + + var rootRule []interface{} + for _, rootItem := range root { + rootRule = append(rootRule, rootItem) + } + + logs, sub, err := _HopL1HopBridge.contract.WatchLogs(opts, "TransferRootBonded", rootRule) + 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(HopL1HopBridgeTransferRootBonded) + if err := _HopL1HopBridge.contract.UnpackLog(event, "TransferRootBonded", 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 +} + +// ParseTransferRootBonded is a log parse operation binding the contract event 0xa57b3e1f3af9eca02201028629700658608222c365064584cfe65d9630ef4f7b. +// +// Solidity: event TransferRootBonded(bytes32 indexed root, uint256 amount) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) ParseTransferRootBonded(log types.Log) (*HopL1HopBridgeTransferRootBonded, error) { + event := new(HopL1HopBridgeTransferRootBonded) + if err := _HopL1HopBridge.contract.UnpackLog(event, "TransferRootBonded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL1HopBridgeTransferRootConfirmedIterator is returned from FilterTransferRootConfirmed and is used to iterate over the raw logs and unpacked data for TransferRootConfirmed events raised by the HopL1HopBridge contract. +type HopL1HopBridgeTransferRootConfirmedIterator struct { + Event *HopL1HopBridgeTransferRootConfirmed // 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 *HopL1HopBridgeTransferRootConfirmedIterator) 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(HopL1HopBridgeTransferRootConfirmed) + 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(HopL1HopBridgeTransferRootConfirmed) + 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 *HopL1HopBridgeTransferRootConfirmedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1HopBridgeTransferRootConfirmedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1HopBridgeTransferRootConfirmed represents a TransferRootConfirmed event raised by the HopL1HopBridge contract. +type HopL1HopBridgeTransferRootConfirmed struct { + OriginChainId *big.Int + DestinationChainId *big.Int + RootHash [32]byte + TotalAmount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransferRootConfirmed is a free log retrieval operation binding the contract event 0xfdfb0eefa96935b8a8c0edf528e125dc6f3934fdbbfce31b38967e8ff413dccd. +// +// Solidity: event TransferRootConfirmed(uint256 indexed originChainId, uint256 indexed destinationChainId, bytes32 indexed rootHash, uint256 totalAmount) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) FilterTransferRootConfirmed(opts *bind.FilterOpts, originChainId []*big.Int, destinationChainId []*big.Int, rootHash [][32]byte) (*HopL1HopBridgeTransferRootConfirmedIterator, error) { + + var originChainIdRule []interface{} + for _, originChainIdItem := range originChainId { + originChainIdRule = append(originChainIdRule, originChainIdItem) + } + var destinationChainIdRule []interface{} + for _, destinationChainIdItem := range destinationChainId { + destinationChainIdRule = append(destinationChainIdRule, destinationChainIdItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL1HopBridge.contract.FilterLogs(opts, "TransferRootConfirmed", originChainIdRule, destinationChainIdRule, rootHashRule) + if err != nil { + return nil, err + } + return &HopL1HopBridgeTransferRootConfirmedIterator{contract: _HopL1HopBridge.contract, event: "TransferRootConfirmed", logs: logs, sub: sub}, nil +} + +// WatchTransferRootConfirmed is a free log subscription operation binding the contract event 0xfdfb0eefa96935b8a8c0edf528e125dc6f3934fdbbfce31b38967e8ff413dccd. +// +// Solidity: event TransferRootConfirmed(uint256 indexed originChainId, uint256 indexed destinationChainId, bytes32 indexed rootHash, uint256 totalAmount) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) WatchTransferRootConfirmed(opts *bind.WatchOpts, sink chan<- *HopL1HopBridgeTransferRootConfirmed, originChainId []*big.Int, destinationChainId []*big.Int, rootHash [][32]byte) (event.Subscription, error) { + + var originChainIdRule []interface{} + for _, originChainIdItem := range originChainId { + originChainIdRule = append(originChainIdRule, originChainIdItem) + } + var destinationChainIdRule []interface{} + for _, destinationChainIdItem := range destinationChainId { + destinationChainIdRule = append(destinationChainIdRule, destinationChainIdItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL1HopBridge.contract.WatchLogs(opts, "TransferRootConfirmed", originChainIdRule, destinationChainIdRule, rootHashRule) + 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(HopL1HopBridgeTransferRootConfirmed) + if err := _HopL1HopBridge.contract.UnpackLog(event, "TransferRootConfirmed", 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 +} + +// ParseTransferRootConfirmed is a log parse operation binding the contract event 0xfdfb0eefa96935b8a8c0edf528e125dc6f3934fdbbfce31b38967e8ff413dccd. +// +// Solidity: event TransferRootConfirmed(uint256 indexed originChainId, uint256 indexed destinationChainId, bytes32 indexed rootHash, uint256 totalAmount) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) ParseTransferRootConfirmed(log types.Log) (*HopL1HopBridgeTransferRootConfirmed, error) { + event := new(HopL1HopBridgeTransferRootConfirmed) + if err := _HopL1HopBridge.contract.UnpackLog(event, "TransferRootConfirmed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL1HopBridgeTransferRootSetIterator is returned from FilterTransferRootSet and is used to iterate over the raw logs and unpacked data for TransferRootSet events raised by the HopL1HopBridge contract. +type HopL1HopBridgeTransferRootSetIterator struct { + Event *HopL1HopBridgeTransferRootSet // 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 *HopL1HopBridgeTransferRootSetIterator) 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(HopL1HopBridgeTransferRootSet) + 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(HopL1HopBridgeTransferRootSet) + 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 *HopL1HopBridgeTransferRootSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1HopBridgeTransferRootSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1HopBridgeTransferRootSet represents a TransferRootSet event raised by the HopL1HopBridge contract. +type HopL1HopBridgeTransferRootSet struct { + RootHash [32]byte + TotalAmount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransferRootSet is a free log retrieval operation binding the contract event 0xb33d2162aead99dab59e77a7a67ea025b776bf8ca8079e132afdf9b23e03bd42. +// +// Solidity: event TransferRootSet(bytes32 indexed rootHash, uint256 totalAmount) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) FilterTransferRootSet(opts *bind.FilterOpts, rootHash [][32]byte) (*HopL1HopBridgeTransferRootSetIterator, error) { + + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL1HopBridge.contract.FilterLogs(opts, "TransferRootSet", rootHashRule) + if err != nil { + return nil, err + } + return &HopL1HopBridgeTransferRootSetIterator{contract: _HopL1HopBridge.contract, event: "TransferRootSet", logs: logs, sub: sub}, nil +} + +// WatchTransferRootSet is a free log subscription operation binding the contract event 0xb33d2162aead99dab59e77a7a67ea025b776bf8ca8079e132afdf9b23e03bd42. +// +// Solidity: event TransferRootSet(bytes32 indexed rootHash, uint256 totalAmount) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) WatchTransferRootSet(opts *bind.WatchOpts, sink chan<- *HopL1HopBridgeTransferRootSet, rootHash [][32]byte) (event.Subscription, error) { + + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL1HopBridge.contract.WatchLogs(opts, "TransferRootSet", rootHashRule) + 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(HopL1HopBridgeTransferRootSet) + if err := _HopL1HopBridge.contract.UnpackLog(event, "TransferRootSet", 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 +} + +// ParseTransferRootSet is a log parse operation binding the contract event 0xb33d2162aead99dab59e77a7a67ea025b776bf8ca8079e132afdf9b23e03bd42. +// +// Solidity: event TransferRootSet(bytes32 indexed rootHash, uint256 totalAmount) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) ParseTransferRootSet(log types.Log) (*HopL1HopBridgeTransferRootSet, error) { + event := new(HopL1HopBridgeTransferRootSet) + if err := _HopL1HopBridge.contract.UnpackLog(event, "TransferRootSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL1HopBridgeTransferSentToL2Iterator is returned from FilterTransferSentToL2 and is used to iterate over the raw logs and unpacked data for TransferSentToL2 events raised by the HopL1HopBridge contract. +type HopL1HopBridgeTransferSentToL2Iterator struct { + Event *HopL1HopBridgeTransferSentToL2 // 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 *HopL1HopBridgeTransferSentToL2Iterator) 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(HopL1HopBridgeTransferSentToL2) + 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(HopL1HopBridgeTransferSentToL2) + 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 *HopL1HopBridgeTransferSentToL2Iterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1HopBridgeTransferSentToL2Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1HopBridgeTransferSentToL2 represents a TransferSentToL2 event raised by the HopL1HopBridge contract. +type HopL1HopBridgeTransferSentToL2 struct { + ChainId *big.Int + Recipient common.Address + Amount *big.Int + AmountOutMin *big.Int + Deadline *big.Int + Relayer common.Address + RelayerFee *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransferSentToL2 is a free log retrieval operation binding the contract event 0x0a0607688c86ec1775abcdbab7b33a3a35a6c9cde677c9be880150c231cc6b0b. +// +// Solidity: event TransferSentToL2(uint256 indexed chainId, address indexed recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address indexed relayer, uint256 relayerFee) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) FilterTransferSentToL2(opts *bind.FilterOpts, chainId []*big.Int, recipient []common.Address, relayer []common.Address) (*HopL1HopBridgeTransferSentToL2Iterator, error) { + + var chainIdRule []interface{} + for _, chainIdItem := range chainId { + chainIdRule = append(chainIdRule, chainIdItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + var relayerRule []interface{} + for _, relayerItem := range relayer { + relayerRule = append(relayerRule, relayerItem) + } + + logs, sub, err := _HopL1HopBridge.contract.FilterLogs(opts, "TransferSentToL2", chainIdRule, recipientRule, relayerRule) + if err != nil { + return nil, err + } + return &HopL1HopBridgeTransferSentToL2Iterator{contract: _HopL1HopBridge.contract, event: "TransferSentToL2", logs: logs, sub: sub}, nil +} + +// WatchTransferSentToL2 is a free log subscription operation binding the contract event 0x0a0607688c86ec1775abcdbab7b33a3a35a6c9cde677c9be880150c231cc6b0b. +// +// Solidity: event TransferSentToL2(uint256 indexed chainId, address indexed recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address indexed relayer, uint256 relayerFee) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) WatchTransferSentToL2(opts *bind.WatchOpts, sink chan<- *HopL1HopBridgeTransferSentToL2, chainId []*big.Int, recipient []common.Address, relayer []common.Address) (event.Subscription, error) { + + var chainIdRule []interface{} + for _, chainIdItem := range chainId { + chainIdRule = append(chainIdRule, chainIdItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + var relayerRule []interface{} + for _, relayerItem := range relayer { + relayerRule = append(relayerRule, relayerItem) + } + + logs, sub, err := _HopL1HopBridge.contract.WatchLogs(opts, "TransferSentToL2", chainIdRule, recipientRule, relayerRule) + 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(HopL1HopBridgeTransferSentToL2) + if err := _HopL1HopBridge.contract.UnpackLog(event, "TransferSentToL2", 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 +} + +// ParseTransferSentToL2 is a log parse operation binding the contract event 0x0a0607688c86ec1775abcdbab7b33a3a35a6c9cde677c9be880150c231cc6b0b. +// +// Solidity: event TransferSentToL2(uint256 indexed chainId, address indexed recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address indexed relayer, uint256 relayerFee) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) ParseTransferSentToL2(log types.Log) (*HopL1HopBridgeTransferSentToL2, error) { + event := new(HopL1HopBridgeTransferSentToL2) + if err := _HopL1HopBridge.contract.UnpackLog(event, "TransferSentToL2", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL1HopBridgeUnstakeIterator is returned from FilterUnstake and is used to iterate over the raw logs and unpacked data for Unstake events raised by the HopL1HopBridge contract. +type HopL1HopBridgeUnstakeIterator struct { + Event *HopL1HopBridgeUnstake // 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 *HopL1HopBridgeUnstakeIterator) 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(HopL1HopBridgeUnstake) + 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(HopL1HopBridgeUnstake) + 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 *HopL1HopBridgeUnstakeIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1HopBridgeUnstakeIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1HopBridgeUnstake represents a Unstake event raised by the HopL1HopBridge contract. +type HopL1HopBridgeUnstake struct { + Account common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnstake is a free log retrieval operation binding the contract event 0x85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd. +// +// Solidity: event Unstake(address indexed account, uint256 amount) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) FilterUnstake(opts *bind.FilterOpts, account []common.Address) (*HopL1HopBridgeUnstakeIterator, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _HopL1HopBridge.contract.FilterLogs(opts, "Unstake", accountRule) + if err != nil { + return nil, err + } + return &HopL1HopBridgeUnstakeIterator{contract: _HopL1HopBridge.contract, event: "Unstake", logs: logs, sub: sub}, nil +} + +// WatchUnstake is a free log subscription operation binding the contract event 0x85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd. +// +// Solidity: event Unstake(address indexed account, uint256 amount) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) WatchUnstake(opts *bind.WatchOpts, sink chan<- *HopL1HopBridgeUnstake, account []common.Address) (event.Subscription, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _HopL1HopBridge.contract.WatchLogs(opts, "Unstake", accountRule) + 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(HopL1HopBridgeUnstake) + if err := _HopL1HopBridge.contract.UnpackLog(event, "Unstake", 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 +} + +// ParseUnstake is a log parse operation binding the contract event 0x85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd. +// +// Solidity: event Unstake(address indexed account, uint256 amount) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) ParseUnstake(log types.Log) (*HopL1HopBridgeUnstake, error) { + event := new(HopL1HopBridgeUnstake) + if err := _HopL1HopBridge.contract.UnpackLog(event, "Unstake", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL1HopBridgeWithdrawalBondSettledIterator is returned from FilterWithdrawalBondSettled and is used to iterate over the raw logs and unpacked data for WithdrawalBondSettled events raised by the HopL1HopBridge contract. +type HopL1HopBridgeWithdrawalBondSettledIterator struct { + Event *HopL1HopBridgeWithdrawalBondSettled // 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 *HopL1HopBridgeWithdrawalBondSettledIterator) 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(HopL1HopBridgeWithdrawalBondSettled) + 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(HopL1HopBridgeWithdrawalBondSettled) + 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 *HopL1HopBridgeWithdrawalBondSettledIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1HopBridgeWithdrawalBondSettledIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1HopBridgeWithdrawalBondSettled represents a WithdrawalBondSettled event raised by the HopL1HopBridge contract. +type HopL1HopBridgeWithdrawalBondSettled struct { + Bonder common.Address + TransferId [32]byte + RootHash [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawalBondSettled is a free log retrieval operation binding the contract event 0x84eb21b24c31b27a3bc67dde4a598aad06db6e9415cd66544492b9616996143c. +// +// Solidity: event WithdrawalBondSettled(address indexed bonder, bytes32 indexed transferId, bytes32 indexed rootHash) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) FilterWithdrawalBondSettled(opts *bind.FilterOpts, bonder []common.Address, transferId [][32]byte, rootHash [][32]byte) (*HopL1HopBridgeWithdrawalBondSettledIterator, error) { + + var bonderRule []interface{} + for _, bonderItem := range bonder { + bonderRule = append(bonderRule, bonderItem) + } + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL1HopBridge.contract.FilterLogs(opts, "WithdrawalBondSettled", bonderRule, transferIdRule, rootHashRule) + if err != nil { + return nil, err + } + return &HopL1HopBridgeWithdrawalBondSettledIterator{contract: _HopL1HopBridge.contract, event: "WithdrawalBondSettled", logs: logs, sub: sub}, nil +} + +// WatchWithdrawalBondSettled is a free log subscription operation binding the contract event 0x84eb21b24c31b27a3bc67dde4a598aad06db6e9415cd66544492b9616996143c. +// +// Solidity: event WithdrawalBondSettled(address indexed bonder, bytes32 indexed transferId, bytes32 indexed rootHash) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) WatchWithdrawalBondSettled(opts *bind.WatchOpts, sink chan<- *HopL1HopBridgeWithdrawalBondSettled, bonder []common.Address, transferId [][32]byte, rootHash [][32]byte) (event.Subscription, error) { + + var bonderRule []interface{} + for _, bonderItem := range bonder { + bonderRule = append(bonderRule, bonderItem) + } + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL1HopBridge.contract.WatchLogs(opts, "WithdrawalBondSettled", bonderRule, transferIdRule, rootHashRule) + 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(HopL1HopBridgeWithdrawalBondSettled) + if err := _HopL1HopBridge.contract.UnpackLog(event, "WithdrawalBondSettled", 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 +} + +// ParseWithdrawalBondSettled is a log parse operation binding the contract event 0x84eb21b24c31b27a3bc67dde4a598aad06db6e9415cd66544492b9616996143c. +// +// Solidity: event WithdrawalBondSettled(address indexed bonder, bytes32 indexed transferId, bytes32 indexed rootHash) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) ParseWithdrawalBondSettled(log types.Log) (*HopL1HopBridgeWithdrawalBondSettled, error) { + event := new(HopL1HopBridgeWithdrawalBondSettled) + if err := _HopL1HopBridge.contract.UnpackLog(event, "WithdrawalBondSettled", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL1HopBridgeWithdrawalBondedIterator is returned from FilterWithdrawalBonded and is used to iterate over the raw logs and unpacked data for WithdrawalBonded events raised by the HopL1HopBridge contract. +type HopL1HopBridgeWithdrawalBondedIterator struct { + Event *HopL1HopBridgeWithdrawalBonded // 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 *HopL1HopBridgeWithdrawalBondedIterator) 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(HopL1HopBridgeWithdrawalBonded) + 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(HopL1HopBridgeWithdrawalBonded) + 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 *HopL1HopBridgeWithdrawalBondedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1HopBridgeWithdrawalBondedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1HopBridgeWithdrawalBonded represents a WithdrawalBonded event raised by the HopL1HopBridge contract. +type HopL1HopBridgeWithdrawalBonded struct { + TransferId [32]byte + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawalBonded is a free log retrieval operation binding the contract event 0x0c3d250c7831051e78aa6a56679e590374c7c424415ffe4aa474491def2fe705. +// +// Solidity: event WithdrawalBonded(bytes32 indexed transferId, uint256 amount) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) FilterWithdrawalBonded(opts *bind.FilterOpts, transferId [][32]byte) (*HopL1HopBridgeWithdrawalBondedIterator, error) { + + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + + logs, sub, err := _HopL1HopBridge.contract.FilterLogs(opts, "WithdrawalBonded", transferIdRule) + if err != nil { + return nil, err + } + return &HopL1HopBridgeWithdrawalBondedIterator{contract: _HopL1HopBridge.contract, event: "WithdrawalBonded", logs: logs, sub: sub}, nil +} + +// WatchWithdrawalBonded is a free log subscription operation binding the contract event 0x0c3d250c7831051e78aa6a56679e590374c7c424415ffe4aa474491def2fe705. +// +// Solidity: event WithdrawalBonded(bytes32 indexed transferId, uint256 amount) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) WatchWithdrawalBonded(opts *bind.WatchOpts, sink chan<- *HopL1HopBridgeWithdrawalBonded, transferId [][32]byte) (event.Subscription, error) { + + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + + logs, sub, err := _HopL1HopBridge.contract.WatchLogs(opts, "WithdrawalBonded", transferIdRule) + 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(HopL1HopBridgeWithdrawalBonded) + if err := _HopL1HopBridge.contract.UnpackLog(event, "WithdrawalBonded", 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 +} + +// ParseWithdrawalBonded is a log parse operation binding the contract event 0x0c3d250c7831051e78aa6a56679e590374c7c424415ffe4aa474491def2fe705. +// +// Solidity: event WithdrawalBonded(bytes32 indexed transferId, uint256 amount) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) ParseWithdrawalBonded(log types.Log) (*HopL1HopBridgeWithdrawalBonded, error) { + event := new(HopL1HopBridgeWithdrawalBonded) + if err := _HopL1HopBridge.contract.UnpackLog(event, "WithdrawalBonded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL1HopBridgeWithdrewIterator is returned from FilterWithdrew and is used to iterate over the raw logs and unpacked data for Withdrew events raised by the HopL1HopBridge contract. +type HopL1HopBridgeWithdrewIterator struct { + Event *HopL1HopBridgeWithdrew // 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 *HopL1HopBridgeWithdrewIterator) 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(HopL1HopBridgeWithdrew) + 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(HopL1HopBridgeWithdrew) + 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 *HopL1HopBridgeWithdrewIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL1HopBridgeWithdrewIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL1HopBridgeWithdrew represents a Withdrew event raised by the HopL1HopBridge contract. +type HopL1HopBridgeWithdrew struct { + TransferId [32]byte + Recipient common.Address + Amount *big.Int + TransferNonce [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrew is a free log retrieval operation binding the contract event 0x9475cdbde5fc71fe2ccd413c82878ee54d061b9f74f9e2e1a03ff1178821502c. +// +// Solidity: event Withdrew(bytes32 indexed transferId, address indexed recipient, uint256 amount, bytes32 transferNonce) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) FilterWithdrew(opts *bind.FilterOpts, transferId [][32]byte, recipient []common.Address) (*HopL1HopBridgeWithdrewIterator, error) { + + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _HopL1HopBridge.contract.FilterLogs(opts, "Withdrew", transferIdRule, recipientRule) + if err != nil { + return nil, err + } + return &HopL1HopBridgeWithdrewIterator{contract: _HopL1HopBridge.contract, event: "Withdrew", logs: logs, sub: sub}, nil +} + +// WatchWithdrew is a free log subscription operation binding the contract event 0x9475cdbde5fc71fe2ccd413c82878ee54d061b9f74f9e2e1a03ff1178821502c. +// +// Solidity: event Withdrew(bytes32 indexed transferId, address indexed recipient, uint256 amount, bytes32 transferNonce) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) WatchWithdrew(opts *bind.WatchOpts, sink chan<- *HopL1HopBridgeWithdrew, transferId [][32]byte, recipient []common.Address) (event.Subscription, error) { + + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _HopL1HopBridge.contract.WatchLogs(opts, "Withdrew", transferIdRule, recipientRule) + 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(HopL1HopBridgeWithdrew) + if err := _HopL1HopBridge.contract.UnpackLog(event, "Withdrew", 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 +} + +// ParseWithdrew is a log parse operation binding the contract event 0x9475cdbde5fc71fe2ccd413c82878ee54d061b9f74f9e2e1a03ff1178821502c. +// +// Solidity: event Withdrew(bytes32 indexed transferId, address indexed recipient, uint256 amount, bytes32 transferNonce) +func (_HopL1HopBridge *HopL1HopBridgeFilterer) ParseWithdrew(log types.Log) (*HopL1HopBridgeWithdrew, error) { + event := new(HopL1HopBridgeWithdrew) + if err := _HopL1HopBridge.contract.UnpackLog(event, "Withdrew", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/contracts/hop/l2Contracts/l2AmmWrapper/l2AmmWrapper.go b/contracts/hop/l2Contracts/l2AmmWrapper/l2AmmWrapper.go new file mode 100644 index 000000000..1e3cdf4f9 --- /dev/null +++ b/contracts/hop/l2Contracts/l2AmmWrapper/l2AmmWrapper.go @@ -0,0 +1,399 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package hopL2AmmWrapper + +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 +) + +// HopL2AmmWrapperMetaData contains all meta data concerning the HopL2AmmWrapper contract. +var HopL2AmmWrapperMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"contractL2_Bridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contractIERC20\",\"name\":\"_l2CanonicalToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_l2CanonicalTokenIsEth\",\"type\":\"bool\"},{\"internalType\":\"contractIERC20\",\"name\":\"_hToken\",\"type\":\"address\"},{\"internalType\":\"contractSwap\",\"name\":\"_exchangeAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"attemptSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contractL2_Bridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"exchangeAddress\",\"outputs\":[{\"internalType\":\"contractSwap\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2CanonicalToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2CanonicalTokenIsEth\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"destinationAmountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"destinationDeadline\",\"type\":\"uint256\"}],\"name\":\"swapAndSend\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", +} + +// HopL2AmmWrapperABI is the input ABI used to generate the binding from. +// Deprecated: Use HopL2AmmWrapperMetaData.ABI instead. +var HopL2AmmWrapperABI = HopL2AmmWrapperMetaData.ABI + +// HopL2AmmWrapper is an auto generated Go binding around an Ethereum contract. +type HopL2AmmWrapper struct { + HopL2AmmWrapperCaller // Read-only binding to the contract + HopL2AmmWrapperTransactor // Write-only binding to the contract + HopL2AmmWrapperFilterer // Log filterer for contract events +} + +// HopL2AmmWrapperCaller is an auto generated read-only Go binding around an Ethereum contract. +type HopL2AmmWrapperCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// HopL2AmmWrapperTransactor is an auto generated write-only Go binding around an Ethereum contract. +type HopL2AmmWrapperTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// HopL2AmmWrapperFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type HopL2AmmWrapperFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// HopL2AmmWrapperSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type HopL2AmmWrapperSession struct { + Contract *HopL2AmmWrapper // 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 +} + +// HopL2AmmWrapperCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type HopL2AmmWrapperCallerSession struct { + Contract *HopL2AmmWrapperCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// HopL2AmmWrapperTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type HopL2AmmWrapperTransactorSession struct { + Contract *HopL2AmmWrapperTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// HopL2AmmWrapperRaw is an auto generated low-level Go binding around an Ethereum contract. +type HopL2AmmWrapperRaw struct { + Contract *HopL2AmmWrapper // Generic contract binding to access the raw methods on +} + +// HopL2AmmWrapperCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type HopL2AmmWrapperCallerRaw struct { + Contract *HopL2AmmWrapperCaller // Generic read-only contract binding to access the raw methods on +} + +// HopL2AmmWrapperTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type HopL2AmmWrapperTransactorRaw struct { + Contract *HopL2AmmWrapperTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewHopL2AmmWrapper creates a new instance of HopL2AmmWrapper, bound to a specific deployed contract. +func NewHopL2AmmWrapper(address common.Address, backend bind.ContractBackend) (*HopL2AmmWrapper, error) { + contract, err := bindHopL2AmmWrapper(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &HopL2AmmWrapper{HopL2AmmWrapperCaller: HopL2AmmWrapperCaller{contract: contract}, HopL2AmmWrapperTransactor: HopL2AmmWrapperTransactor{contract: contract}, HopL2AmmWrapperFilterer: HopL2AmmWrapperFilterer{contract: contract}}, nil +} + +// NewHopL2AmmWrapperCaller creates a new read-only instance of HopL2AmmWrapper, bound to a specific deployed contract. +func NewHopL2AmmWrapperCaller(address common.Address, caller bind.ContractCaller) (*HopL2AmmWrapperCaller, error) { + contract, err := bindHopL2AmmWrapper(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &HopL2AmmWrapperCaller{contract: contract}, nil +} + +// NewHopL2AmmWrapperTransactor creates a new write-only instance of HopL2AmmWrapper, bound to a specific deployed contract. +func NewHopL2AmmWrapperTransactor(address common.Address, transactor bind.ContractTransactor) (*HopL2AmmWrapperTransactor, error) { + contract, err := bindHopL2AmmWrapper(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &HopL2AmmWrapperTransactor{contract: contract}, nil +} + +// NewHopL2AmmWrapperFilterer creates a new log filterer instance of HopL2AmmWrapper, bound to a specific deployed contract. +func NewHopL2AmmWrapperFilterer(address common.Address, filterer bind.ContractFilterer) (*HopL2AmmWrapperFilterer, error) { + contract, err := bindHopL2AmmWrapper(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &HopL2AmmWrapperFilterer{contract: contract}, nil +} + +// bindHopL2AmmWrapper binds a generic wrapper to an already deployed contract. +func bindHopL2AmmWrapper(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := HopL2AmmWrapperMetaData.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 (_HopL2AmmWrapper *HopL2AmmWrapperRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _HopL2AmmWrapper.Contract.HopL2AmmWrapperCaller.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 (_HopL2AmmWrapper *HopL2AmmWrapperRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _HopL2AmmWrapper.Contract.HopL2AmmWrapperTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_HopL2AmmWrapper *HopL2AmmWrapperRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _HopL2AmmWrapper.Contract.HopL2AmmWrapperTransactor.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 (_HopL2AmmWrapper *HopL2AmmWrapperCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _HopL2AmmWrapper.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 (_HopL2AmmWrapper *HopL2AmmWrapperTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _HopL2AmmWrapper.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_HopL2AmmWrapper *HopL2AmmWrapperTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _HopL2AmmWrapper.Contract.contract.Transact(opts, method, params...) +} + +// Bridge is a free data retrieval call binding the contract method 0xe78cea92. +// +// Solidity: function bridge() view returns(address) +func (_HopL2AmmWrapper *HopL2AmmWrapperCaller) Bridge(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL2AmmWrapper.contract.Call(opts, &out, "bridge") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Bridge is a free data retrieval call binding the contract method 0xe78cea92. +// +// Solidity: function bridge() view returns(address) +func (_HopL2AmmWrapper *HopL2AmmWrapperSession) Bridge() (common.Address, error) { + return _HopL2AmmWrapper.Contract.Bridge(&_HopL2AmmWrapper.CallOpts) +} + +// Bridge is a free data retrieval call binding the contract method 0xe78cea92. +// +// Solidity: function bridge() view returns(address) +func (_HopL2AmmWrapper *HopL2AmmWrapperCallerSession) Bridge() (common.Address, error) { + return _HopL2AmmWrapper.Contract.Bridge(&_HopL2AmmWrapper.CallOpts) +} + +// ExchangeAddress is a free data retrieval call binding the contract method 0x9cd01605. +// +// Solidity: function exchangeAddress() view returns(address) +func (_HopL2AmmWrapper *HopL2AmmWrapperCaller) ExchangeAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL2AmmWrapper.contract.Call(opts, &out, "exchangeAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// ExchangeAddress is a free data retrieval call binding the contract method 0x9cd01605. +// +// Solidity: function exchangeAddress() view returns(address) +func (_HopL2AmmWrapper *HopL2AmmWrapperSession) ExchangeAddress() (common.Address, error) { + return _HopL2AmmWrapper.Contract.ExchangeAddress(&_HopL2AmmWrapper.CallOpts) +} + +// ExchangeAddress is a free data retrieval call binding the contract method 0x9cd01605. +// +// Solidity: function exchangeAddress() view returns(address) +func (_HopL2AmmWrapper *HopL2AmmWrapperCallerSession) ExchangeAddress() (common.Address, error) { + return _HopL2AmmWrapper.Contract.ExchangeAddress(&_HopL2AmmWrapper.CallOpts) +} + +// HToken is a free data retrieval call binding the contract method 0xfc6e3b3b. +// +// Solidity: function hToken() view returns(address) +func (_HopL2AmmWrapper *HopL2AmmWrapperCaller) HToken(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL2AmmWrapper.contract.Call(opts, &out, "hToken") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// HToken is a free data retrieval call binding the contract method 0xfc6e3b3b. +// +// Solidity: function hToken() view returns(address) +func (_HopL2AmmWrapper *HopL2AmmWrapperSession) HToken() (common.Address, error) { + return _HopL2AmmWrapper.Contract.HToken(&_HopL2AmmWrapper.CallOpts) +} + +// HToken is a free data retrieval call binding the contract method 0xfc6e3b3b. +// +// Solidity: function hToken() view returns(address) +func (_HopL2AmmWrapper *HopL2AmmWrapperCallerSession) HToken() (common.Address, error) { + return _HopL2AmmWrapper.Contract.HToken(&_HopL2AmmWrapper.CallOpts) +} + +// L2CanonicalToken is a free data retrieval call binding the contract method 0x1ee1bf67. +// +// Solidity: function l2CanonicalToken() view returns(address) +func (_HopL2AmmWrapper *HopL2AmmWrapperCaller) L2CanonicalToken(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL2AmmWrapper.contract.Call(opts, &out, "l2CanonicalToken") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// L2CanonicalToken is a free data retrieval call binding the contract method 0x1ee1bf67. +// +// Solidity: function l2CanonicalToken() view returns(address) +func (_HopL2AmmWrapper *HopL2AmmWrapperSession) L2CanonicalToken() (common.Address, error) { + return _HopL2AmmWrapper.Contract.L2CanonicalToken(&_HopL2AmmWrapper.CallOpts) +} + +// L2CanonicalToken is a free data retrieval call binding the contract method 0x1ee1bf67. +// +// Solidity: function l2CanonicalToken() view returns(address) +func (_HopL2AmmWrapper *HopL2AmmWrapperCallerSession) L2CanonicalToken() (common.Address, error) { + return _HopL2AmmWrapper.Contract.L2CanonicalToken(&_HopL2AmmWrapper.CallOpts) +} + +// L2CanonicalTokenIsEth is a free data retrieval call binding the contract method 0x28555125. +// +// Solidity: function l2CanonicalTokenIsEth() view returns(bool) +func (_HopL2AmmWrapper *HopL2AmmWrapperCaller) L2CanonicalTokenIsEth(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _HopL2AmmWrapper.contract.Call(opts, &out, "l2CanonicalTokenIsEth") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// L2CanonicalTokenIsEth is a free data retrieval call binding the contract method 0x28555125. +// +// Solidity: function l2CanonicalTokenIsEth() view returns(bool) +func (_HopL2AmmWrapper *HopL2AmmWrapperSession) L2CanonicalTokenIsEth() (bool, error) { + return _HopL2AmmWrapper.Contract.L2CanonicalTokenIsEth(&_HopL2AmmWrapper.CallOpts) +} + +// L2CanonicalTokenIsEth is a free data retrieval call binding the contract method 0x28555125. +// +// Solidity: function l2CanonicalTokenIsEth() view returns(bool) +func (_HopL2AmmWrapper *HopL2AmmWrapperCallerSession) L2CanonicalTokenIsEth() (bool, error) { + return _HopL2AmmWrapper.Contract.L2CanonicalTokenIsEth(&_HopL2AmmWrapper.CallOpts) +} + +// AttemptSwap is a paid mutator transaction binding the contract method 0x676c5ef6. +// +// Solidity: function attemptSwap(address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline) returns() +func (_HopL2AmmWrapper *HopL2AmmWrapperTransactor) AttemptSwap(opts *bind.TransactOpts, recipient common.Address, amount *big.Int, amountOutMin *big.Int, deadline *big.Int) (*types.Transaction, error) { + return _HopL2AmmWrapper.contract.Transact(opts, "attemptSwap", recipient, amount, amountOutMin, deadline) +} + +// AttemptSwap is a paid mutator transaction binding the contract method 0x676c5ef6. +// +// Solidity: function attemptSwap(address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline) returns() +func (_HopL2AmmWrapper *HopL2AmmWrapperSession) AttemptSwap(recipient common.Address, amount *big.Int, amountOutMin *big.Int, deadline *big.Int) (*types.Transaction, error) { + return _HopL2AmmWrapper.Contract.AttemptSwap(&_HopL2AmmWrapper.TransactOpts, recipient, amount, amountOutMin, deadline) +} + +// AttemptSwap is a paid mutator transaction binding the contract method 0x676c5ef6. +// +// Solidity: function attemptSwap(address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline) returns() +func (_HopL2AmmWrapper *HopL2AmmWrapperTransactorSession) AttemptSwap(recipient common.Address, amount *big.Int, amountOutMin *big.Int, deadline *big.Int) (*types.Transaction, error) { + return _HopL2AmmWrapper.Contract.AttemptSwap(&_HopL2AmmWrapper.TransactOpts, recipient, amount, amountOutMin, deadline) +} + +// SwapAndSend is a paid mutator transaction binding the contract method 0xeea0d7b2. +// +// Solidity: function swapAndSend(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee, uint256 amountOutMin, uint256 deadline, uint256 destinationAmountOutMin, uint256 destinationDeadline) payable returns() +func (_HopL2AmmWrapper *HopL2AmmWrapperTransactor) SwapAndSend(opts *bind.TransactOpts, chainId *big.Int, recipient common.Address, amount *big.Int, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int, destinationAmountOutMin *big.Int, destinationDeadline *big.Int) (*types.Transaction, error) { + return _HopL2AmmWrapper.contract.Transact(opts, "swapAndSend", chainId, recipient, amount, bonderFee, amountOutMin, deadline, destinationAmountOutMin, destinationDeadline) +} + +// SwapAndSend is a paid mutator transaction binding the contract method 0xeea0d7b2. +// +// Solidity: function swapAndSend(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee, uint256 amountOutMin, uint256 deadline, uint256 destinationAmountOutMin, uint256 destinationDeadline) payable returns() +func (_HopL2AmmWrapper *HopL2AmmWrapperSession) SwapAndSend(chainId *big.Int, recipient common.Address, amount *big.Int, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int, destinationAmountOutMin *big.Int, destinationDeadline *big.Int) (*types.Transaction, error) { + return _HopL2AmmWrapper.Contract.SwapAndSend(&_HopL2AmmWrapper.TransactOpts, chainId, recipient, amount, bonderFee, amountOutMin, deadline, destinationAmountOutMin, destinationDeadline) +} + +// SwapAndSend is a paid mutator transaction binding the contract method 0xeea0d7b2. +// +// Solidity: function swapAndSend(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee, uint256 amountOutMin, uint256 deadline, uint256 destinationAmountOutMin, uint256 destinationDeadline) payable returns() +func (_HopL2AmmWrapper *HopL2AmmWrapperTransactorSession) SwapAndSend(chainId *big.Int, recipient common.Address, amount *big.Int, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int, destinationAmountOutMin *big.Int, destinationDeadline *big.Int) (*types.Transaction, error) { + return _HopL2AmmWrapper.Contract.SwapAndSend(&_HopL2AmmWrapper.TransactOpts, chainId, recipient, amount, bonderFee, amountOutMin, deadline, destinationAmountOutMin, destinationDeadline) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_HopL2AmmWrapper *HopL2AmmWrapperTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _HopL2AmmWrapper.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 (_HopL2AmmWrapper *HopL2AmmWrapperSession) Receive() (*types.Transaction, error) { + return _HopL2AmmWrapper.Contract.Receive(&_HopL2AmmWrapper.TransactOpts) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_HopL2AmmWrapper *HopL2AmmWrapperTransactorSession) Receive() (*types.Transaction, error) { + return _HopL2AmmWrapper.Contract.Receive(&_HopL2AmmWrapper.TransactOpts) +} diff --git a/contracts/hop/l2Contracts/l2ArbitrumBridge/l2ArbitrumBridge.go b/contracts/hop/l2Contracts/l2ArbitrumBridge/l2ArbitrumBridge.go new file mode 100644 index 000000000..c9ac6b3bf --- /dev/null +++ b/contracts/hop/l2Contracts/l2ArbitrumBridge/l2ArbitrumBridge.go @@ -0,0 +1,3340 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package hopL2ArbitrumBridge + +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 +) + +// BridgeTransferRoot is an auto generated low-level Go binding around an user-defined struct. +type BridgeTransferRoot struct { + Total *big.Int + AmountWithdrawn *big.Int + CreatedAt *big.Int +} + +// HopL2ArbitrumBridgeMetaData contains all meta data concerning the HopL2ArbitrumBridge contract. +var HopL2ArbitrumBridgeMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"contractIArbSys\",\"name\":\"_messenger\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"l1Governance\",\"type\":\"address\"},{\"internalType\":\"contractHopBridgeToken\",\"name\":\"hToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"l1BridgeAddress\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"activeChainIds\",\"type\":\"uint256[]\"},{\"internalType\":\"address[]\",\"name\":\"bonders\",\"type\":\"address[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newBonder\",\"type\":\"address\"}],\"name\":\"BonderAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousBonder\",\"type\":\"address\"}],\"name\":\"BonderRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalBondsSettled\",\"type\":\"uint256\"}],\"name\":\"MultipleWithdrawalsSettled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Stake\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"relayerFee\",\"type\":\"uint256\"}],\"name\":\"TransferFromL1Completed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"TransferRootSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TransferSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"rootCommittedAt\",\"type\":\"uint256\"}],\"name\":\"TransfersCommitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Unstake\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"}],\"name\":\"WithdrawalBondSettled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"WithdrawalBonded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"}],\"name\":\"Withdrew\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"activeChainIds\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"chainIds\",\"type\":\"uint256[]\"}],\"name\":\"addActiveChainIds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"addBonder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ammWrapper\",\"outputs\":[{\"internalType\":\"contractI_L2_AmmWrapper\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"}],\"name\":\"bondWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"bondWithdrawalAndDistribute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"}],\"name\":\"commitTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"relayerFee\",\"type\":\"uint256\"}],\"name\":\"distribute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"}],\"name\":\"getBondedWithdrawalAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"getCredit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"getDebitAndAdditionalDebit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"maybeBonder\",\"type\":\"address\"}],\"name\":\"getIsBonder\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNextTransferNonce\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"getRawDebit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"getTransferId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"getTransferRoot\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"total\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountWithdrawn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"}],\"internalType\":\"structBridge.TransferRoot\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"getTransferRootId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hToken\",\"outputs\":[{\"internalType\":\"contractHopBridgeToken\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"}],\"name\":\"isTransferIdSpent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l1BridgeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l1BridgeCaller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l1Governance\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"lastCommitTimeForChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxPendingTransfers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"contractIArbSys\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minBonderBps\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minBonderFeeAbsolute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumForceCommitDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"pendingAmountForChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"pendingTransferIdsForChainId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"chainIds\",\"type\":\"uint256[]\"}],\"name\":\"removeActiveChainIds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"removeBonder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"originalAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"rescueTransferRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"send\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractI_L2_AmmWrapper\",\"name\":\"_ammWrapper\",\"type\":\"address\"}],\"name\":\"setAmmWrapper\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"setHopBridgeTokenOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1BridgeAddress\",\"type\":\"address\"}],\"name\":\"setL1BridgeAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1BridgeCaller\",\"type\":\"address\"}],\"name\":\"setL1BridgeCaller\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Governance\",\"type\":\"address\"}],\"name\":\"setL1Governance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxPendingTransfers\",\"type\":\"uint256\"}],\"name\":\"setMaxPendingTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIArbSys\",\"name\":\"_messenger\",\"type\":\"address\"}],\"name\":\"setMessenger\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minBonderBps\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minBonderFeeAbsolute\",\"type\":\"uint256\"}],\"name\":\"setMinimumBonderFeeRequirements\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minimumForceCommitDelay\",\"type\":\"uint256\"}],\"name\":\"setMinimumForceCommitDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"setTransferRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"transferRootTotalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"transferIdTreeIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"siblings\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"totalLeaves\",\"type\":\"uint256\"}],\"name\":\"settleBondedWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"bytes32[]\",\"name\":\"transferIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"settleBondedWithdrawals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transferNonceIncrementer\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"unstake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"transferRootTotalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"transferIdTreeIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"siblings\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"totalLeaves\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// HopL2ArbitrumBridgeABI is the input ABI used to generate the binding from. +// Deprecated: Use HopL2ArbitrumBridgeMetaData.ABI instead. +var HopL2ArbitrumBridgeABI = HopL2ArbitrumBridgeMetaData.ABI + +// HopL2ArbitrumBridge is an auto generated Go binding around an Ethereum contract. +type HopL2ArbitrumBridge struct { + HopL2ArbitrumBridgeCaller // Read-only binding to the contract + HopL2ArbitrumBridgeTransactor // Write-only binding to the contract + HopL2ArbitrumBridgeFilterer // Log filterer for contract events +} + +// HopL2ArbitrumBridgeCaller is an auto generated read-only Go binding around an Ethereum contract. +type HopL2ArbitrumBridgeCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// HopL2ArbitrumBridgeTransactor is an auto generated write-only Go binding around an Ethereum contract. +type HopL2ArbitrumBridgeTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// HopL2ArbitrumBridgeFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type HopL2ArbitrumBridgeFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// HopL2ArbitrumBridgeSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type HopL2ArbitrumBridgeSession struct { + Contract *HopL2ArbitrumBridge // 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 +} + +// HopL2ArbitrumBridgeCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type HopL2ArbitrumBridgeCallerSession struct { + Contract *HopL2ArbitrumBridgeCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// HopL2ArbitrumBridgeTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type HopL2ArbitrumBridgeTransactorSession struct { + Contract *HopL2ArbitrumBridgeTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// HopL2ArbitrumBridgeRaw is an auto generated low-level Go binding around an Ethereum contract. +type HopL2ArbitrumBridgeRaw struct { + Contract *HopL2ArbitrumBridge // Generic contract binding to access the raw methods on +} + +// HopL2ArbitrumBridgeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type HopL2ArbitrumBridgeCallerRaw struct { + Contract *HopL2ArbitrumBridgeCaller // Generic read-only contract binding to access the raw methods on +} + +// HopL2ArbitrumBridgeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type HopL2ArbitrumBridgeTransactorRaw struct { + Contract *HopL2ArbitrumBridgeTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewHopL2ArbitrumBridge creates a new instance of HopL2ArbitrumBridge, bound to a specific deployed contract. +func NewHopL2ArbitrumBridge(address common.Address, backend bind.ContractBackend) (*HopL2ArbitrumBridge, error) { + contract, err := bindHopL2ArbitrumBridge(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &HopL2ArbitrumBridge{HopL2ArbitrumBridgeCaller: HopL2ArbitrumBridgeCaller{contract: contract}, HopL2ArbitrumBridgeTransactor: HopL2ArbitrumBridgeTransactor{contract: contract}, HopL2ArbitrumBridgeFilterer: HopL2ArbitrumBridgeFilterer{contract: contract}}, nil +} + +// NewHopL2ArbitrumBridgeCaller creates a new read-only instance of HopL2ArbitrumBridge, bound to a specific deployed contract. +func NewHopL2ArbitrumBridgeCaller(address common.Address, caller bind.ContractCaller) (*HopL2ArbitrumBridgeCaller, error) { + contract, err := bindHopL2ArbitrumBridge(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &HopL2ArbitrumBridgeCaller{contract: contract}, nil +} + +// NewHopL2ArbitrumBridgeTransactor creates a new write-only instance of HopL2ArbitrumBridge, bound to a specific deployed contract. +func NewHopL2ArbitrumBridgeTransactor(address common.Address, transactor bind.ContractTransactor) (*HopL2ArbitrumBridgeTransactor, error) { + contract, err := bindHopL2ArbitrumBridge(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &HopL2ArbitrumBridgeTransactor{contract: contract}, nil +} + +// NewHopL2ArbitrumBridgeFilterer creates a new log filterer instance of HopL2ArbitrumBridge, bound to a specific deployed contract. +func NewHopL2ArbitrumBridgeFilterer(address common.Address, filterer bind.ContractFilterer) (*HopL2ArbitrumBridgeFilterer, error) { + contract, err := bindHopL2ArbitrumBridge(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &HopL2ArbitrumBridgeFilterer{contract: contract}, nil +} + +// bindHopL2ArbitrumBridge binds a generic wrapper to an already deployed contract. +func bindHopL2ArbitrumBridge(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := HopL2ArbitrumBridgeMetaData.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 (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _HopL2ArbitrumBridge.Contract.HopL2ArbitrumBridgeCaller.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 (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.HopL2ArbitrumBridgeTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.HopL2ArbitrumBridgeTransactor.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 (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _HopL2ArbitrumBridge.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 (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.contract.Transact(opts, method, params...) +} + +// ActiveChainIds is a free data retrieval call binding the contract method 0xc97d172e. +// +// Solidity: function activeChainIds(uint256 ) view returns(bool) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCaller) ActiveChainIds(opts *bind.CallOpts, arg0 *big.Int) (bool, error) { + var out []interface{} + err := _HopL2ArbitrumBridge.contract.Call(opts, &out, "activeChainIds", arg0) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// ActiveChainIds is a free data retrieval call binding the contract method 0xc97d172e. +// +// Solidity: function activeChainIds(uint256 ) view returns(bool) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) ActiveChainIds(arg0 *big.Int) (bool, error) { + return _HopL2ArbitrumBridge.Contract.ActiveChainIds(&_HopL2ArbitrumBridge.CallOpts, arg0) +} + +// ActiveChainIds is a free data retrieval call binding the contract method 0xc97d172e. +// +// Solidity: function activeChainIds(uint256 ) view returns(bool) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCallerSession) ActiveChainIds(arg0 *big.Int) (bool, error) { + return _HopL2ArbitrumBridge.Contract.ActiveChainIds(&_HopL2ArbitrumBridge.CallOpts, arg0) +} + +// AmmWrapper is a free data retrieval call binding the contract method 0xe9cdfe51. +// +// Solidity: function ammWrapper() view returns(address) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCaller) AmmWrapper(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL2ArbitrumBridge.contract.Call(opts, &out, "ammWrapper") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// AmmWrapper is a free data retrieval call binding the contract method 0xe9cdfe51. +// +// Solidity: function ammWrapper() view returns(address) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) AmmWrapper() (common.Address, error) { + return _HopL2ArbitrumBridge.Contract.AmmWrapper(&_HopL2ArbitrumBridge.CallOpts) +} + +// AmmWrapper is a free data retrieval call binding the contract method 0xe9cdfe51. +// +// Solidity: function ammWrapper() view returns(address) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCallerSession) AmmWrapper() (common.Address, error) { + return _HopL2ArbitrumBridge.Contract.AmmWrapper(&_HopL2ArbitrumBridge.CallOpts) +} + +// GetBondedWithdrawalAmount is a free data retrieval call binding the contract method 0x302830ab. +// +// Solidity: function getBondedWithdrawalAmount(address bonder, bytes32 transferId) view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCaller) GetBondedWithdrawalAmount(opts *bind.CallOpts, bonder common.Address, transferId [32]byte) (*big.Int, error) { + var out []interface{} + err := _HopL2ArbitrumBridge.contract.Call(opts, &out, "getBondedWithdrawalAmount", bonder, transferId) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetBondedWithdrawalAmount is a free data retrieval call binding the contract method 0x302830ab. +// +// Solidity: function getBondedWithdrawalAmount(address bonder, bytes32 transferId) view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) GetBondedWithdrawalAmount(bonder common.Address, transferId [32]byte) (*big.Int, error) { + return _HopL2ArbitrumBridge.Contract.GetBondedWithdrawalAmount(&_HopL2ArbitrumBridge.CallOpts, bonder, transferId) +} + +// GetBondedWithdrawalAmount is a free data retrieval call binding the contract method 0x302830ab. +// +// Solidity: function getBondedWithdrawalAmount(address bonder, bytes32 transferId) view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCallerSession) GetBondedWithdrawalAmount(bonder common.Address, transferId [32]byte) (*big.Int, error) { + return _HopL2ArbitrumBridge.Contract.GetBondedWithdrawalAmount(&_HopL2ArbitrumBridge.CallOpts, bonder, transferId) +} + +// GetChainId is a free data retrieval call binding the contract method 0x3408e470. +// +// Solidity: function getChainId() view returns(uint256 chainId) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCaller) GetChainId(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _HopL2ArbitrumBridge.contract.Call(opts, &out, "getChainId") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetChainId is a free data retrieval call binding the contract method 0x3408e470. +// +// Solidity: function getChainId() view returns(uint256 chainId) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) GetChainId() (*big.Int, error) { + return _HopL2ArbitrumBridge.Contract.GetChainId(&_HopL2ArbitrumBridge.CallOpts) +} + +// GetChainId is a free data retrieval call binding the contract method 0x3408e470. +// +// Solidity: function getChainId() view returns(uint256 chainId) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCallerSession) GetChainId() (*big.Int, error) { + return _HopL2ArbitrumBridge.Contract.GetChainId(&_HopL2ArbitrumBridge.CallOpts) +} + +// GetCredit is a free data retrieval call binding the contract method 0x57344e6f. +// +// Solidity: function getCredit(address bonder) view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCaller) GetCredit(opts *bind.CallOpts, bonder common.Address) (*big.Int, error) { + var out []interface{} + err := _HopL2ArbitrumBridge.contract.Call(opts, &out, "getCredit", bonder) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetCredit is a free data retrieval call binding the contract method 0x57344e6f. +// +// Solidity: function getCredit(address bonder) view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) GetCredit(bonder common.Address) (*big.Int, error) { + return _HopL2ArbitrumBridge.Contract.GetCredit(&_HopL2ArbitrumBridge.CallOpts, bonder) +} + +// GetCredit is a free data retrieval call binding the contract method 0x57344e6f. +// +// Solidity: function getCredit(address bonder) view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCallerSession) GetCredit(bonder common.Address) (*big.Int, error) { + return _HopL2ArbitrumBridge.Contract.GetCredit(&_HopL2ArbitrumBridge.CallOpts, bonder) +} + +// GetDebitAndAdditionalDebit is a free data retrieval call binding the contract method 0xffa9286c. +// +// Solidity: function getDebitAndAdditionalDebit(address bonder) view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCaller) GetDebitAndAdditionalDebit(opts *bind.CallOpts, bonder common.Address) (*big.Int, error) { + var out []interface{} + err := _HopL2ArbitrumBridge.contract.Call(opts, &out, "getDebitAndAdditionalDebit", bonder) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetDebitAndAdditionalDebit is a free data retrieval call binding the contract method 0xffa9286c. +// +// Solidity: function getDebitAndAdditionalDebit(address bonder) view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) GetDebitAndAdditionalDebit(bonder common.Address) (*big.Int, error) { + return _HopL2ArbitrumBridge.Contract.GetDebitAndAdditionalDebit(&_HopL2ArbitrumBridge.CallOpts, bonder) +} + +// GetDebitAndAdditionalDebit is a free data retrieval call binding the contract method 0xffa9286c. +// +// Solidity: function getDebitAndAdditionalDebit(address bonder) view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCallerSession) GetDebitAndAdditionalDebit(bonder common.Address) (*big.Int, error) { + return _HopL2ArbitrumBridge.Contract.GetDebitAndAdditionalDebit(&_HopL2ArbitrumBridge.CallOpts, bonder) +} + +// GetIsBonder is a free data retrieval call binding the contract method 0xd5ef7551. +// +// Solidity: function getIsBonder(address maybeBonder) view returns(bool) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCaller) GetIsBonder(opts *bind.CallOpts, maybeBonder common.Address) (bool, error) { + var out []interface{} + err := _HopL2ArbitrumBridge.contract.Call(opts, &out, "getIsBonder", maybeBonder) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// GetIsBonder is a free data retrieval call binding the contract method 0xd5ef7551. +// +// Solidity: function getIsBonder(address maybeBonder) view returns(bool) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) GetIsBonder(maybeBonder common.Address) (bool, error) { + return _HopL2ArbitrumBridge.Contract.GetIsBonder(&_HopL2ArbitrumBridge.CallOpts, maybeBonder) +} + +// GetIsBonder is a free data retrieval call binding the contract method 0xd5ef7551. +// +// Solidity: function getIsBonder(address maybeBonder) view returns(bool) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCallerSession) GetIsBonder(maybeBonder common.Address) (bool, error) { + return _HopL2ArbitrumBridge.Contract.GetIsBonder(&_HopL2ArbitrumBridge.CallOpts, maybeBonder) +} + +// GetNextTransferNonce is a free data retrieval call binding the contract method 0x051e7216. +// +// Solidity: function getNextTransferNonce() view returns(bytes32) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCaller) GetNextTransferNonce(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _HopL2ArbitrumBridge.contract.Call(opts, &out, "getNextTransferNonce") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetNextTransferNonce is a free data retrieval call binding the contract method 0x051e7216. +// +// Solidity: function getNextTransferNonce() view returns(bytes32) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) GetNextTransferNonce() ([32]byte, error) { + return _HopL2ArbitrumBridge.Contract.GetNextTransferNonce(&_HopL2ArbitrumBridge.CallOpts) +} + +// GetNextTransferNonce is a free data retrieval call binding the contract method 0x051e7216. +// +// Solidity: function getNextTransferNonce() view returns(bytes32) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCallerSession) GetNextTransferNonce() ([32]byte, error) { + return _HopL2ArbitrumBridge.Contract.GetNextTransferNonce(&_HopL2ArbitrumBridge.CallOpts) +} + +// GetRawDebit is a free data retrieval call binding the contract method 0x13948c76. +// +// Solidity: function getRawDebit(address bonder) view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCaller) GetRawDebit(opts *bind.CallOpts, bonder common.Address) (*big.Int, error) { + var out []interface{} + err := _HopL2ArbitrumBridge.contract.Call(opts, &out, "getRawDebit", bonder) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetRawDebit is a free data retrieval call binding the contract method 0x13948c76. +// +// Solidity: function getRawDebit(address bonder) view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) GetRawDebit(bonder common.Address) (*big.Int, error) { + return _HopL2ArbitrumBridge.Contract.GetRawDebit(&_HopL2ArbitrumBridge.CallOpts, bonder) +} + +// GetRawDebit is a free data retrieval call binding the contract method 0x13948c76. +// +// Solidity: function getRawDebit(address bonder) view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCallerSession) GetRawDebit(bonder common.Address) (*big.Int, error) { + return _HopL2ArbitrumBridge.Contract.GetRawDebit(&_HopL2ArbitrumBridge.CallOpts, bonder) +} + +// GetTransferId is a free data retrieval call binding the contract method 0xaf215f94. +// +// Solidity: function getTransferId(uint256 chainId, address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline) pure returns(bytes32) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCaller) GetTransferId(opts *bind.CallOpts, chainId *big.Int, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) ([32]byte, error) { + var out []interface{} + err := _HopL2ArbitrumBridge.contract.Call(opts, &out, "getTransferId", chainId, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetTransferId is a free data retrieval call binding the contract method 0xaf215f94. +// +// Solidity: function getTransferId(uint256 chainId, address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline) pure returns(bytes32) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) GetTransferId(chainId *big.Int, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) ([32]byte, error) { + return _HopL2ArbitrumBridge.Contract.GetTransferId(&_HopL2ArbitrumBridge.CallOpts, chainId, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline) +} + +// GetTransferId is a free data retrieval call binding the contract method 0xaf215f94. +// +// Solidity: function getTransferId(uint256 chainId, address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline) pure returns(bytes32) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCallerSession) GetTransferId(chainId *big.Int, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) ([32]byte, error) { + return _HopL2ArbitrumBridge.Contract.GetTransferId(&_HopL2ArbitrumBridge.CallOpts, chainId, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline) +} + +// GetTransferRoot is a free data retrieval call binding the contract method 0xce803b4f. +// +// Solidity: function getTransferRoot(bytes32 rootHash, uint256 totalAmount) view returns((uint256,uint256,uint256)) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCaller) GetTransferRoot(opts *bind.CallOpts, rootHash [32]byte, totalAmount *big.Int) (BridgeTransferRoot, error) { + var out []interface{} + err := _HopL2ArbitrumBridge.contract.Call(opts, &out, "getTransferRoot", rootHash, totalAmount) + + if err != nil { + return *new(BridgeTransferRoot), err + } + + out0 := *abi.ConvertType(out[0], new(BridgeTransferRoot)).(*BridgeTransferRoot) + + return out0, err + +} + +// GetTransferRoot is a free data retrieval call binding the contract method 0xce803b4f. +// +// Solidity: function getTransferRoot(bytes32 rootHash, uint256 totalAmount) view returns((uint256,uint256,uint256)) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) GetTransferRoot(rootHash [32]byte, totalAmount *big.Int) (BridgeTransferRoot, error) { + return _HopL2ArbitrumBridge.Contract.GetTransferRoot(&_HopL2ArbitrumBridge.CallOpts, rootHash, totalAmount) +} + +// GetTransferRoot is a free data retrieval call binding the contract method 0xce803b4f. +// +// Solidity: function getTransferRoot(bytes32 rootHash, uint256 totalAmount) view returns((uint256,uint256,uint256)) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCallerSession) GetTransferRoot(rootHash [32]byte, totalAmount *big.Int) (BridgeTransferRoot, error) { + return _HopL2ArbitrumBridge.Contract.GetTransferRoot(&_HopL2ArbitrumBridge.CallOpts, rootHash, totalAmount) +} + +// GetTransferRootId is a free data retrieval call binding the contract method 0x960a7afa. +// +// Solidity: function getTransferRootId(bytes32 rootHash, uint256 totalAmount) pure returns(bytes32) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCaller) GetTransferRootId(opts *bind.CallOpts, rootHash [32]byte, totalAmount *big.Int) ([32]byte, error) { + var out []interface{} + err := _HopL2ArbitrumBridge.contract.Call(opts, &out, "getTransferRootId", rootHash, totalAmount) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetTransferRootId is a free data retrieval call binding the contract method 0x960a7afa. +// +// Solidity: function getTransferRootId(bytes32 rootHash, uint256 totalAmount) pure returns(bytes32) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) GetTransferRootId(rootHash [32]byte, totalAmount *big.Int) ([32]byte, error) { + return _HopL2ArbitrumBridge.Contract.GetTransferRootId(&_HopL2ArbitrumBridge.CallOpts, rootHash, totalAmount) +} + +// GetTransferRootId is a free data retrieval call binding the contract method 0x960a7afa. +// +// Solidity: function getTransferRootId(bytes32 rootHash, uint256 totalAmount) pure returns(bytes32) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCallerSession) GetTransferRootId(rootHash [32]byte, totalAmount *big.Int) ([32]byte, error) { + return _HopL2ArbitrumBridge.Contract.GetTransferRootId(&_HopL2ArbitrumBridge.CallOpts, rootHash, totalAmount) +} + +// HToken is a free data retrieval call binding the contract method 0xfc6e3b3b. +// +// Solidity: function hToken() view returns(address) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCaller) HToken(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL2ArbitrumBridge.contract.Call(opts, &out, "hToken") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// HToken is a free data retrieval call binding the contract method 0xfc6e3b3b. +// +// Solidity: function hToken() view returns(address) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) HToken() (common.Address, error) { + return _HopL2ArbitrumBridge.Contract.HToken(&_HopL2ArbitrumBridge.CallOpts) +} + +// HToken is a free data retrieval call binding the contract method 0xfc6e3b3b. +// +// Solidity: function hToken() view returns(address) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCallerSession) HToken() (common.Address, error) { + return _HopL2ArbitrumBridge.Contract.HToken(&_HopL2ArbitrumBridge.CallOpts) +} + +// IsTransferIdSpent is a free data retrieval call binding the contract method 0x3a7af631. +// +// Solidity: function isTransferIdSpent(bytes32 transferId) view returns(bool) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCaller) IsTransferIdSpent(opts *bind.CallOpts, transferId [32]byte) (bool, error) { + var out []interface{} + err := _HopL2ArbitrumBridge.contract.Call(opts, &out, "isTransferIdSpent", transferId) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsTransferIdSpent is a free data retrieval call binding the contract method 0x3a7af631. +// +// Solidity: function isTransferIdSpent(bytes32 transferId) view returns(bool) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) IsTransferIdSpent(transferId [32]byte) (bool, error) { + return _HopL2ArbitrumBridge.Contract.IsTransferIdSpent(&_HopL2ArbitrumBridge.CallOpts, transferId) +} + +// IsTransferIdSpent is a free data retrieval call binding the contract method 0x3a7af631. +// +// Solidity: function isTransferIdSpent(bytes32 transferId) view returns(bool) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCallerSession) IsTransferIdSpent(transferId [32]byte) (bool, error) { + return _HopL2ArbitrumBridge.Contract.IsTransferIdSpent(&_HopL2ArbitrumBridge.CallOpts, transferId) +} + +// L1BridgeAddress is a free data retrieval call binding the contract method 0x5ab2a558. +// +// Solidity: function l1BridgeAddress() view returns(address) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCaller) L1BridgeAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL2ArbitrumBridge.contract.Call(opts, &out, "l1BridgeAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// L1BridgeAddress is a free data retrieval call binding the contract method 0x5ab2a558. +// +// Solidity: function l1BridgeAddress() view returns(address) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) L1BridgeAddress() (common.Address, error) { + return _HopL2ArbitrumBridge.Contract.L1BridgeAddress(&_HopL2ArbitrumBridge.CallOpts) +} + +// L1BridgeAddress is a free data retrieval call binding the contract method 0x5ab2a558. +// +// Solidity: function l1BridgeAddress() view returns(address) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCallerSession) L1BridgeAddress() (common.Address, error) { + return _HopL2ArbitrumBridge.Contract.L1BridgeAddress(&_HopL2ArbitrumBridge.CallOpts) +} + +// L1BridgeCaller is a free data retrieval call binding the contract method 0xd2442783. +// +// Solidity: function l1BridgeCaller() view returns(address) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCaller) L1BridgeCaller(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL2ArbitrumBridge.contract.Call(opts, &out, "l1BridgeCaller") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// L1BridgeCaller is a free data retrieval call binding the contract method 0xd2442783. +// +// Solidity: function l1BridgeCaller() view returns(address) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) L1BridgeCaller() (common.Address, error) { + return _HopL2ArbitrumBridge.Contract.L1BridgeCaller(&_HopL2ArbitrumBridge.CallOpts) +} + +// L1BridgeCaller is a free data retrieval call binding the contract method 0xd2442783. +// +// Solidity: function l1BridgeCaller() view returns(address) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCallerSession) L1BridgeCaller() (common.Address, error) { + return _HopL2ArbitrumBridge.Contract.L1BridgeCaller(&_HopL2ArbitrumBridge.CallOpts) +} + +// L1Governance is a free data retrieval call binding the contract method 0x3ef23f7f. +// +// Solidity: function l1Governance() view returns(address) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCaller) L1Governance(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL2ArbitrumBridge.contract.Call(opts, &out, "l1Governance") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// L1Governance is a free data retrieval call binding the contract method 0x3ef23f7f. +// +// Solidity: function l1Governance() view returns(address) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) L1Governance() (common.Address, error) { + return _HopL2ArbitrumBridge.Contract.L1Governance(&_HopL2ArbitrumBridge.CallOpts) +} + +// L1Governance is a free data retrieval call binding the contract method 0x3ef23f7f. +// +// Solidity: function l1Governance() view returns(address) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCallerSession) L1Governance() (common.Address, error) { + return _HopL2ArbitrumBridge.Contract.L1Governance(&_HopL2ArbitrumBridge.CallOpts) +} + +// LastCommitTimeForChainId is a free data retrieval call binding the contract method 0xd4e54c47. +// +// Solidity: function lastCommitTimeForChainId(uint256 ) view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCaller) LastCommitTimeForChainId(opts *bind.CallOpts, arg0 *big.Int) (*big.Int, error) { + var out []interface{} + err := _HopL2ArbitrumBridge.contract.Call(opts, &out, "lastCommitTimeForChainId", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// LastCommitTimeForChainId is a free data retrieval call binding the contract method 0xd4e54c47. +// +// Solidity: function lastCommitTimeForChainId(uint256 ) view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) LastCommitTimeForChainId(arg0 *big.Int) (*big.Int, error) { + return _HopL2ArbitrumBridge.Contract.LastCommitTimeForChainId(&_HopL2ArbitrumBridge.CallOpts, arg0) +} + +// LastCommitTimeForChainId is a free data retrieval call binding the contract method 0xd4e54c47. +// +// Solidity: function lastCommitTimeForChainId(uint256 ) view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCallerSession) LastCommitTimeForChainId(arg0 *big.Int) (*big.Int, error) { + return _HopL2ArbitrumBridge.Contract.LastCommitTimeForChainId(&_HopL2ArbitrumBridge.CallOpts, arg0) +} + +// MaxPendingTransfers is a free data retrieval call binding the contract method 0xbed93c84. +// +// Solidity: function maxPendingTransfers() view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCaller) MaxPendingTransfers(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _HopL2ArbitrumBridge.contract.Call(opts, &out, "maxPendingTransfers") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MaxPendingTransfers is a free data retrieval call binding the contract method 0xbed93c84. +// +// Solidity: function maxPendingTransfers() view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) MaxPendingTransfers() (*big.Int, error) { + return _HopL2ArbitrumBridge.Contract.MaxPendingTransfers(&_HopL2ArbitrumBridge.CallOpts) +} + +// MaxPendingTransfers is a free data retrieval call binding the contract method 0xbed93c84. +// +// Solidity: function maxPendingTransfers() view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCallerSession) MaxPendingTransfers() (*big.Int, error) { + return _HopL2ArbitrumBridge.Contract.MaxPendingTransfers(&_HopL2ArbitrumBridge.CallOpts) +} + +// Messenger is a free data retrieval call binding the contract method 0x3cb747bf. +// +// Solidity: function messenger() view returns(address) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCaller) Messenger(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL2ArbitrumBridge.contract.Call(opts, &out, "messenger") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Messenger is a free data retrieval call binding the contract method 0x3cb747bf. +// +// Solidity: function messenger() view returns(address) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) Messenger() (common.Address, error) { + return _HopL2ArbitrumBridge.Contract.Messenger(&_HopL2ArbitrumBridge.CallOpts) +} + +// Messenger is a free data retrieval call binding the contract method 0x3cb747bf. +// +// Solidity: function messenger() view returns(address) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCallerSession) Messenger() (common.Address, error) { + return _HopL2ArbitrumBridge.Contract.Messenger(&_HopL2ArbitrumBridge.CallOpts) +} + +// MinBonderBps is a free data retrieval call binding the contract method 0x35e2c4af. +// +// Solidity: function minBonderBps() view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCaller) MinBonderBps(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _HopL2ArbitrumBridge.contract.Call(opts, &out, "minBonderBps") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MinBonderBps is a free data retrieval call binding the contract method 0x35e2c4af. +// +// Solidity: function minBonderBps() view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) MinBonderBps() (*big.Int, error) { + return _HopL2ArbitrumBridge.Contract.MinBonderBps(&_HopL2ArbitrumBridge.CallOpts) +} + +// MinBonderBps is a free data retrieval call binding the contract method 0x35e2c4af. +// +// Solidity: function minBonderBps() view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCallerSession) MinBonderBps() (*big.Int, error) { + return _HopL2ArbitrumBridge.Contract.MinBonderBps(&_HopL2ArbitrumBridge.CallOpts) +} + +// MinBonderFeeAbsolute is a free data retrieval call binding the contract method 0xc3035261. +// +// Solidity: function minBonderFeeAbsolute() view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCaller) MinBonderFeeAbsolute(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _HopL2ArbitrumBridge.contract.Call(opts, &out, "minBonderFeeAbsolute") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MinBonderFeeAbsolute is a free data retrieval call binding the contract method 0xc3035261. +// +// Solidity: function minBonderFeeAbsolute() view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) MinBonderFeeAbsolute() (*big.Int, error) { + return _HopL2ArbitrumBridge.Contract.MinBonderFeeAbsolute(&_HopL2ArbitrumBridge.CallOpts) +} + +// MinBonderFeeAbsolute is a free data retrieval call binding the contract method 0xc3035261. +// +// Solidity: function minBonderFeeAbsolute() view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCallerSession) MinBonderFeeAbsolute() (*big.Int, error) { + return _HopL2ArbitrumBridge.Contract.MinBonderFeeAbsolute(&_HopL2ArbitrumBridge.CallOpts) +} + +// MinimumForceCommitDelay is a free data retrieval call binding the contract method 0x8f658198. +// +// Solidity: function minimumForceCommitDelay() view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCaller) MinimumForceCommitDelay(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _HopL2ArbitrumBridge.contract.Call(opts, &out, "minimumForceCommitDelay") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MinimumForceCommitDelay is a free data retrieval call binding the contract method 0x8f658198. +// +// Solidity: function minimumForceCommitDelay() view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) MinimumForceCommitDelay() (*big.Int, error) { + return _HopL2ArbitrumBridge.Contract.MinimumForceCommitDelay(&_HopL2ArbitrumBridge.CallOpts) +} + +// MinimumForceCommitDelay is a free data retrieval call binding the contract method 0x8f658198. +// +// Solidity: function minimumForceCommitDelay() view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCallerSession) MinimumForceCommitDelay() (*big.Int, error) { + return _HopL2ArbitrumBridge.Contract.MinimumForceCommitDelay(&_HopL2ArbitrumBridge.CallOpts) +} + +// PendingAmountForChainId is a free data retrieval call binding the contract method 0x0f5e09e7. +// +// Solidity: function pendingAmountForChainId(uint256 ) view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCaller) PendingAmountForChainId(opts *bind.CallOpts, arg0 *big.Int) (*big.Int, error) { + var out []interface{} + err := _HopL2ArbitrumBridge.contract.Call(opts, &out, "pendingAmountForChainId", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// PendingAmountForChainId is a free data retrieval call binding the contract method 0x0f5e09e7. +// +// Solidity: function pendingAmountForChainId(uint256 ) view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) PendingAmountForChainId(arg0 *big.Int) (*big.Int, error) { + return _HopL2ArbitrumBridge.Contract.PendingAmountForChainId(&_HopL2ArbitrumBridge.CallOpts, arg0) +} + +// PendingAmountForChainId is a free data retrieval call binding the contract method 0x0f5e09e7. +// +// Solidity: function pendingAmountForChainId(uint256 ) view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCallerSession) PendingAmountForChainId(arg0 *big.Int) (*big.Int, error) { + return _HopL2ArbitrumBridge.Contract.PendingAmountForChainId(&_HopL2ArbitrumBridge.CallOpts, arg0) +} + +// PendingTransferIdsForChainId is a free data retrieval call binding the contract method 0x98445caf. +// +// Solidity: function pendingTransferIdsForChainId(uint256 , uint256 ) view returns(bytes32) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCaller) PendingTransferIdsForChainId(opts *bind.CallOpts, arg0 *big.Int, arg1 *big.Int) ([32]byte, error) { + var out []interface{} + err := _HopL2ArbitrumBridge.contract.Call(opts, &out, "pendingTransferIdsForChainId", arg0, arg1) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// PendingTransferIdsForChainId is a free data retrieval call binding the contract method 0x98445caf. +// +// Solidity: function pendingTransferIdsForChainId(uint256 , uint256 ) view returns(bytes32) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) PendingTransferIdsForChainId(arg0 *big.Int, arg1 *big.Int) ([32]byte, error) { + return _HopL2ArbitrumBridge.Contract.PendingTransferIdsForChainId(&_HopL2ArbitrumBridge.CallOpts, arg0, arg1) +} + +// PendingTransferIdsForChainId is a free data retrieval call binding the contract method 0x98445caf. +// +// Solidity: function pendingTransferIdsForChainId(uint256 , uint256 ) view returns(bytes32) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCallerSession) PendingTransferIdsForChainId(arg0 *big.Int, arg1 *big.Int) ([32]byte, error) { + return _HopL2ArbitrumBridge.Contract.PendingTransferIdsForChainId(&_HopL2ArbitrumBridge.CallOpts, arg0, arg1) +} + +// TransferNonceIncrementer is a free data retrieval call binding the contract method 0x82c69f9d. +// +// Solidity: function transferNonceIncrementer() view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCaller) TransferNonceIncrementer(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _HopL2ArbitrumBridge.contract.Call(opts, &out, "transferNonceIncrementer") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TransferNonceIncrementer is a free data retrieval call binding the contract method 0x82c69f9d. +// +// Solidity: function transferNonceIncrementer() view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) TransferNonceIncrementer() (*big.Int, error) { + return _HopL2ArbitrumBridge.Contract.TransferNonceIncrementer(&_HopL2ArbitrumBridge.CallOpts) +} + +// TransferNonceIncrementer is a free data retrieval call binding the contract method 0x82c69f9d. +// +// Solidity: function transferNonceIncrementer() view returns(uint256) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeCallerSession) TransferNonceIncrementer() (*big.Int, error) { + return _HopL2ArbitrumBridge.Contract.TransferNonceIncrementer(&_HopL2ArbitrumBridge.CallOpts) +} + +// AddActiveChainIds is a paid mutator transaction binding the contract method 0xf8398fa4. +// +// Solidity: function addActiveChainIds(uint256[] chainIds) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactor) AddActiveChainIds(opts *bind.TransactOpts, chainIds []*big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.contract.Transact(opts, "addActiveChainIds", chainIds) +} + +// AddActiveChainIds is a paid mutator transaction binding the contract method 0xf8398fa4. +// +// Solidity: function addActiveChainIds(uint256[] chainIds) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) AddActiveChainIds(chainIds []*big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.AddActiveChainIds(&_HopL2ArbitrumBridge.TransactOpts, chainIds) +} + +// AddActiveChainIds is a paid mutator transaction binding the contract method 0xf8398fa4. +// +// Solidity: function addActiveChainIds(uint256[] chainIds) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorSession) AddActiveChainIds(chainIds []*big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.AddActiveChainIds(&_HopL2ArbitrumBridge.TransactOpts, chainIds) +} + +// AddBonder is a paid mutator transaction binding the contract method 0x5325937f. +// +// Solidity: function addBonder(address bonder) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactor) AddBonder(opts *bind.TransactOpts, bonder common.Address) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.contract.Transact(opts, "addBonder", bonder) +} + +// AddBonder is a paid mutator transaction binding the contract method 0x5325937f. +// +// Solidity: function addBonder(address bonder) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) AddBonder(bonder common.Address) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.AddBonder(&_HopL2ArbitrumBridge.TransactOpts, bonder) +} + +// AddBonder is a paid mutator transaction binding the contract method 0x5325937f. +// +// Solidity: function addBonder(address bonder) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorSession) AddBonder(bonder common.Address) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.AddBonder(&_HopL2ArbitrumBridge.TransactOpts, bonder) +} + +// BondWithdrawal is a paid mutator transaction binding the contract method 0x23c452cd. +// +// Solidity: function bondWithdrawal(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactor) BondWithdrawal(opts *bind.TransactOpts, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.contract.Transact(opts, "bondWithdrawal", recipient, amount, transferNonce, bonderFee) +} + +// BondWithdrawal is a paid mutator transaction binding the contract method 0x23c452cd. +// +// Solidity: function bondWithdrawal(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) BondWithdrawal(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.BondWithdrawal(&_HopL2ArbitrumBridge.TransactOpts, recipient, amount, transferNonce, bonderFee) +} + +// BondWithdrawal is a paid mutator transaction binding the contract method 0x23c452cd. +// +// Solidity: function bondWithdrawal(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorSession) BondWithdrawal(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.BondWithdrawal(&_HopL2ArbitrumBridge.TransactOpts, recipient, amount, transferNonce, bonderFee) +} + +// BondWithdrawalAndDistribute is a paid mutator transaction binding the contract method 0x3d12a85a. +// +// Solidity: function bondWithdrawalAndDistribute(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactor) BondWithdrawalAndDistribute(opts *bind.TransactOpts, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.contract.Transact(opts, "bondWithdrawalAndDistribute", recipient, amount, transferNonce, bonderFee, amountOutMin, deadline) +} + +// BondWithdrawalAndDistribute is a paid mutator transaction binding the contract method 0x3d12a85a. +// +// Solidity: function bondWithdrawalAndDistribute(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) BondWithdrawalAndDistribute(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.BondWithdrawalAndDistribute(&_HopL2ArbitrumBridge.TransactOpts, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline) +} + +// BondWithdrawalAndDistribute is a paid mutator transaction binding the contract method 0x3d12a85a. +// +// Solidity: function bondWithdrawalAndDistribute(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorSession) BondWithdrawalAndDistribute(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.BondWithdrawalAndDistribute(&_HopL2ArbitrumBridge.TransactOpts, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline) +} + +// CommitTransfers is a paid mutator transaction binding the contract method 0x32b949a2. +// +// Solidity: function commitTransfers(uint256 destinationChainId) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactor) CommitTransfers(opts *bind.TransactOpts, destinationChainId *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.contract.Transact(opts, "commitTransfers", destinationChainId) +} + +// CommitTransfers is a paid mutator transaction binding the contract method 0x32b949a2. +// +// Solidity: function commitTransfers(uint256 destinationChainId) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) CommitTransfers(destinationChainId *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.CommitTransfers(&_HopL2ArbitrumBridge.TransactOpts, destinationChainId) +} + +// CommitTransfers is a paid mutator transaction binding the contract method 0x32b949a2. +// +// Solidity: function commitTransfers(uint256 destinationChainId) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorSession) CommitTransfers(destinationChainId *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.CommitTransfers(&_HopL2ArbitrumBridge.TransactOpts, destinationChainId) +} + +// Distribute is a paid mutator transaction binding the contract method 0xcc29a306. +// +// Solidity: function distribute(address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address relayer, uint256 relayerFee) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactor) Distribute(opts *bind.TransactOpts, recipient common.Address, amount *big.Int, amountOutMin *big.Int, deadline *big.Int, relayer common.Address, relayerFee *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.contract.Transact(opts, "distribute", recipient, amount, amountOutMin, deadline, relayer, relayerFee) +} + +// Distribute is a paid mutator transaction binding the contract method 0xcc29a306. +// +// Solidity: function distribute(address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address relayer, uint256 relayerFee) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) Distribute(recipient common.Address, amount *big.Int, amountOutMin *big.Int, deadline *big.Int, relayer common.Address, relayerFee *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.Distribute(&_HopL2ArbitrumBridge.TransactOpts, recipient, amount, amountOutMin, deadline, relayer, relayerFee) +} + +// Distribute is a paid mutator transaction binding the contract method 0xcc29a306. +// +// Solidity: function distribute(address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address relayer, uint256 relayerFee) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorSession) Distribute(recipient common.Address, amount *big.Int, amountOutMin *big.Int, deadline *big.Int, relayer common.Address, relayerFee *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.Distribute(&_HopL2ArbitrumBridge.TransactOpts, recipient, amount, amountOutMin, deadline, relayer, relayerFee) +} + +// RemoveActiveChainIds is a paid mutator transaction binding the contract method 0x9f600a0b. +// +// Solidity: function removeActiveChainIds(uint256[] chainIds) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactor) RemoveActiveChainIds(opts *bind.TransactOpts, chainIds []*big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.contract.Transact(opts, "removeActiveChainIds", chainIds) +} + +// RemoveActiveChainIds is a paid mutator transaction binding the contract method 0x9f600a0b. +// +// Solidity: function removeActiveChainIds(uint256[] chainIds) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) RemoveActiveChainIds(chainIds []*big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.RemoveActiveChainIds(&_HopL2ArbitrumBridge.TransactOpts, chainIds) +} + +// RemoveActiveChainIds is a paid mutator transaction binding the contract method 0x9f600a0b. +// +// Solidity: function removeActiveChainIds(uint256[] chainIds) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorSession) RemoveActiveChainIds(chainIds []*big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.RemoveActiveChainIds(&_HopL2ArbitrumBridge.TransactOpts, chainIds) +} + +// RemoveBonder is a paid mutator transaction binding the contract method 0x04e6c2c0. +// +// Solidity: function removeBonder(address bonder) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactor) RemoveBonder(opts *bind.TransactOpts, bonder common.Address) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.contract.Transact(opts, "removeBonder", bonder) +} + +// RemoveBonder is a paid mutator transaction binding the contract method 0x04e6c2c0. +// +// Solidity: function removeBonder(address bonder) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) RemoveBonder(bonder common.Address) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.RemoveBonder(&_HopL2ArbitrumBridge.TransactOpts, bonder) +} + +// RemoveBonder is a paid mutator transaction binding the contract method 0x04e6c2c0. +// +// Solidity: function removeBonder(address bonder) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorSession) RemoveBonder(bonder common.Address) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.RemoveBonder(&_HopL2ArbitrumBridge.TransactOpts, bonder) +} + +// RescueTransferRoot is a paid mutator transaction binding the contract method 0xcbd1642e. +// +// Solidity: function rescueTransferRoot(bytes32 rootHash, uint256 originalAmount, address recipient) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactor) RescueTransferRoot(opts *bind.TransactOpts, rootHash [32]byte, originalAmount *big.Int, recipient common.Address) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.contract.Transact(opts, "rescueTransferRoot", rootHash, originalAmount, recipient) +} + +// RescueTransferRoot is a paid mutator transaction binding the contract method 0xcbd1642e. +// +// Solidity: function rescueTransferRoot(bytes32 rootHash, uint256 originalAmount, address recipient) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) RescueTransferRoot(rootHash [32]byte, originalAmount *big.Int, recipient common.Address) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.RescueTransferRoot(&_HopL2ArbitrumBridge.TransactOpts, rootHash, originalAmount, recipient) +} + +// RescueTransferRoot is a paid mutator transaction binding the contract method 0xcbd1642e. +// +// Solidity: function rescueTransferRoot(bytes32 rootHash, uint256 originalAmount, address recipient) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorSession) RescueTransferRoot(rootHash [32]byte, originalAmount *big.Int, recipient common.Address) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.RescueTransferRoot(&_HopL2ArbitrumBridge.TransactOpts, rootHash, originalAmount, recipient) +} + +// Send is a paid mutator transaction binding the contract method 0xa6bd1b33. +// +// Solidity: function send(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee, uint256 amountOutMin, uint256 deadline) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactor) Send(opts *bind.TransactOpts, chainId *big.Int, recipient common.Address, amount *big.Int, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.contract.Transact(opts, "send", chainId, recipient, amount, bonderFee, amountOutMin, deadline) +} + +// Send is a paid mutator transaction binding the contract method 0xa6bd1b33. +// +// Solidity: function send(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee, uint256 amountOutMin, uint256 deadline) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) Send(chainId *big.Int, recipient common.Address, amount *big.Int, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.Send(&_HopL2ArbitrumBridge.TransactOpts, chainId, recipient, amount, bonderFee, amountOutMin, deadline) +} + +// Send is a paid mutator transaction binding the contract method 0xa6bd1b33. +// +// Solidity: function send(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee, uint256 amountOutMin, uint256 deadline) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorSession) Send(chainId *big.Int, recipient common.Address, amount *big.Int, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.Send(&_HopL2ArbitrumBridge.TransactOpts, chainId, recipient, amount, bonderFee, amountOutMin, deadline) +} + +// SetAmmWrapper is a paid mutator transaction binding the contract method 0x64c6fdb4. +// +// Solidity: function setAmmWrapper(address _ammWrapper) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactor) SetAmmWrapper(opts *bind.TransactOpts, _ammWrapper common.Address) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.contract.Transact(opts, "setAmmWrapper", _ammWrapper) +} + +// SetAmmWrapper is a paid mutator transaction binding the contract method 0x64c6fdb4. +// +// Solidity: function setAmmWrapper(address _ammWrapper) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) SetAmmWrapper(_ammWrapper common.Address) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.SetAmmWrapper(&_HopL2ArbitrumBridge.TransactOpts, _ammWrapper) +} + +// SetAmmWrapper is a paid mutator transaction binding the contract method 0x64c6fdb4. +// +// Solidity: function setAmmWrapper(address _ammWrapper) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorSession) SetAmmWrapper(_ammWrapper common.Address) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.SetAmmWrapper(&_HopL2ArbitrumBridge.TransactOpts, _ammWrapper) +} + +// SetHopBridgeTokenOwner is a paid mutator transaction binding the contract method 0x8295f258. +// +// Solidity: function setHopBridgeTokenOwner(address newOwner) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactor) SetHopBridgeTokenOwner(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.contract.Transact(opts, "setHopBridgeTokenOwner", newOwner) +} + +// SetHopBridgeTokenOwner is a paid mutator transaction binding the contract method 0x8295f258. +// +// Solidity: function setHopBridgeTokenOwner(address newOwner) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) SetHopBridgeTokenOwner(newOwner common.Address) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.SetHopBridgeTokenOwner(&_HopL2ArbitrumBridge.TransactOpts, newOwner) +} + +// SetHopBridgeTokenOwner is a paid mutator transaction binding the contract method 0x8295f258. +// +// Solidity: function setHopBridgeTokenOwner(address newOwner) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorSession) SetHopBridgeTokenOwner(newOwner common.Address) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.SetHopBridgeTokenOwner(&_HopL2ArbitrumBridge.TransactOpts, newOwner) +} + +// SetL1BridgeAddress is a paid mutator transaction binding the contract method 0xe1825d06. +// +// Solidity: function setL1BridgeAddress(address _l1BridgeAddress) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactor) SetL1BridgeAddress(opts *bind.TransactOpts, _l1BridgeAddress common.Address) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.contract.Transact(opts, "setL1BridgeAddress", _l1BridgeAddress) +} + +// SetL1BridgeAddress is a paid mutator transaction binding the contract method 0xe1825d06. +// +// Solidity: function setL1BridgeAddress(address _l1BridgeAddress) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) SetL1BridgeAddress(_l1BridgeAddress common.Address) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.SetL1BridgeAddress(&_HopL2ArbitrumBridge.TransactOpts, _l1BridgeAddress) +} + +// SetL1BridgeAddress is a paid mutator transaction binding the contract method 0xe1825d06. +// +// Solidity: function setL1BridgeAddress(address _l1BridgeAddress) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorSession) SetL1BridgeAddress(_l1BridgeAddress common.Address) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.SetL1BridgeAddress(&_HopL2ArbitrumBridge.TransactOpts, _l1BridgeAddress) +} + +// SetL1BridgeCaller is a paid mutator transaction binding the contract method 0xaf33ae69. +// +// Solidity: function setL1BridgeCaller(address _l1BridgeCaller) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactor) SetL1BridgeCaller(opts *bind.TransactOpts, _l1BridgeCaller common.Address) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.contract.Transact(opts, "setL1BridgeCaller", _l1BridgeCaller) +} + +// SetL1BridgeCaller is a paid mutator transaction binding the contract method 0xaf33ae69. +// +// Solidity: function setL1BridgeCaller(address _l1BridgeCaller) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) SetL1BridgeCaller(_l1BridgeCaller common.Address) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.SetL1BridgeCaller(&_HopL2ArbitrumBridge.TransactOpts, _l1BridgeCaller) +} + +// SetL1BridgeCaller is a paid mutator transaction binding the contract method 0xaf33ae69. +// +// Solidity: function setL1BridgeCaller(address _l1BridgeCaller) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorSession) SetL1BridgeCaller(_l1BridgeCaller common.Address) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.SetL1BridgeCaller(&_HopL2ArbitrumBridge.TransactOpts, _l1BridgeCaller) +} + +// SetL1Governance is a paid mutator transaction binding the contract method 0xe40272d7. +// +// Solidity: function setL1Governance(address _l1Governance) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactor) SetL1Governance(opts *bind.TransactOpts, _l1Governance common.Address) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.contract.Transact(opts, "setL1Governance", _l1Governance) +} + +// SetL1Governance is a paid mutator transaction binding the contract method 0xe40272d7. +// +// Solidity: function setL1Governance(address _l1Governance) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) SetL1Governance(_l1Governance common.Address) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.SetL1Governance(&_HopL2ArbitrumBridge.TransactOpts, _l1Governance) +} + +// SetL1Governance is a paid mutator transaction binding the contract method 0xe40272d7. +// +// Solidity: function setL1Governance(address _l1Governance) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorSession) SetL1Governance(_l1Governance common.Address) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.SetL1Governance(&_HopL2ArbitrumBridge.TransactOpts, _l1Governance) +} + +// SetMaxPendingTransfers is a paid mutator transaction binding the contract method 0x4742bbfb. +// +// Solidity: function setMaxPendingTransfers(uint256 _maxPendingTransfers) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactor) SetMaxPendingTransfers(opts *bind.TransactOpts, _maxPendingTransfers *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.contract.Transact(opts, "setMaxPendingTransfers", _maxPendingTransfers) +} + +// SetMaxPendingTransfers is a paid mutator transaction binding the contract method 0x4742bbfb. +// +// Solidity: function setMaxPendingTransfers(uint256 _maxPendingTransfers) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) SetMaxPendingTransfers(_maxPendingTransfers *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.SetMaxPendingTransfers(&_HopL2ArbitrumBridge.TransactOpts, _maxPendingTransfers) +} + +// SetMaxPendingTransfers is a paid mutator transaction binding the contract method 0x4742bbfb. +// +// Solidity: function setMaxPendingTransfers(uint256 _maxPendingTransfers) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorSession) SetMaxPendingTransfers(_maxPendingTransfers *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.SetMaxPendingTransfers(&_HopL2ArbitrumBridge.TransactOpts, _maxPendingTransfers) +} + +// SetMessenger is a paid mutator transaction binding the contract method 0x66285967. +// +// Solidity: function setMessenger(address _messenger) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactor) SetMessenger(opts *bind.TransactOpts, _messenger common.Address) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.contract.Transact(opts, "setMessenger", _messenger) +} + +// SetMessenger is a paid mutator transaction binding the contract method 0x66285967. +// +// Solidity: function setMessenger(address _messenger) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) SetMessenger(_messenger common.Address) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.SetMessenger(&_HopL2ArbitrumBridge.TransactOpts, _messenger) +} + +// SetMessenger is a paid mutator transaction binding the contract method 0x66285967. +// +// Solidity: function setMessenger(address _messenger) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorSession) SetMessenger(_messenger common.Address) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.SetMessenger(&_HopL2ArbitrumBridge.TransactOpts, _messenger) +} + +// SetMinimumBonderFeeRequirements is a paid mutator transaction binding the contract method 0xa9fa4ed5. +// +// Solidity: function setMinimumBonderFeeRequirements(uint256 _minBonderBps, uint256 _minBonderFeeAbsolute) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactor) SetMinimumBonderFeeRequirements(opts *bind.TransactOpts, _minBonderBps *big.Int, _minBonderFeeAbsolute *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.contract.Transact(opts, "setMinimumBonderFeeRequirements", _minBonderBps, _minBonderFeeAbsolute) +} + +// SetMinimumBonderFeeRequirements is a paid mutator transaction binding the contract method 0xa9fa4ed5. +// +// Solidity: function setMinimumBonderFeeRequirements(uint256 _minBonderBps, uint256 _minBonderFeeAbsolute) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) SetMinimumBonderFeeRequirements(_minBonderBps *big.Int, _minBonderFeeAbsolute *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.SetMinimumBonderFeeRequirements(&_HopL2ArbitrumBridge.TransactOpts, _minBonderBps, _minBonderFeeAbsolute) +} + +// SetMinimumBonderFeeRequirements is a paid mutator transaction binding the contract method 0xa9fa4ed5. +// +// Solidity: function setMinimumBonderFeeRequirements(uint256 _minBonderBps, uint256 _minBonderFeeAbsolute) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorSession) SetMinimumBonderFeeRequirements(_minBonderBps *big.Int, _minBonderFeeAbsolute *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.SetMinimumBonderFeeRequirements(&_HopL2ArbitrumBridge.TransactOpts, _minBonderBps, _minBonderFeeAbsolute) +} + +// SetMinimumForceCommitDelay is a paid mutator transaction binding the contract method 0x9bf43028. +// +// Solidity: function setMinimumForceCommitDelay(uint256 _minimumForceCommitDelay) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactor) SetMinimumForceCommitDelay(opts *bind.TransactOpts, _minimumForceCommitDelay *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.contract.Transact(opts, "setMinimumForceCommitDelay", _minimumForceCommitDelay) +} + +// SetMinimumForceCommitDelay is a paid mutator transaction binding the contract method 0x9bf43028. +// +// Solidity: function setMinimumForceCommitDelay(uint256 _minimumForceCommitDelay) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) SetMinimumForceCommitDelay(_minimumForceCommitDelay *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.SetMinimumForceCommitDelay(&_HopL2ArbitrumBridge.TransactOpts, _minimumForceCommitDelay) +} + +// SetMinimumForceCommitDelay is a paid mutator transaction binding the contract method 0x9bf43028. +// +// Solidity: function setMinimumForceCommitDelay(uint256 _minimumForceCommitDelay) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorSession) SetMinimumForceCommitDelay(_minimumForceCommitDelay *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.SetMinimumForceCommitDelay(&_HopL2ArbitrumBridge.TransactOpts, _minimumForceCommitDelay) +} + +// SetTransferRoot is a paid mutator transaction binding the contract method 0xfd31c5ba. +// +// Solidity: function setTransferRoot(bytes32 rootHash, uint256 totalAmount) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactor) SetTransferRoot(opts *bind.TransactOpts, rootHash [32]byte, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.contract.Transact(opts, "setTransferRoot", rootHash, totalAmount) +} + +// SetTransferRoot is a paid mutator transaction binding the contract method 0xfd31c5ba. +// +// Solidity: function setTransferRoot(bytes32 rootHash, uint256 totalAmount) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) SetTransferRoot(rootHash [32]byte, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.SetTransferRoot(&_HopL2ArbitrumBridge.TransactOpts, rootHash, totalAmount) +} + +// SetTransferRoot is a paid mutator transaction binding the contract method 0xfd31c5ba. +// +// Solidity: function setTransferRoot(bytes32 rootHash, uint256 totalAmount) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorSession) SetTransferRoot(rootHash [32]byte, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.SetTransferRoot(&_HopL2ArbitrumBridge.TransactOpts, rootHash, totalAmount) +} + +// SettleBondedWithdrawal is a paid mutator transaction binding the contract method 0xc7525dd3. +// +// Solidity: function settleBondedWithdrawal(address bonder, bytes32 transferId, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactor) SettleBondedWithdrawal(opts *bind.TransactOpts, bonder common.Address, transferId [32]byte, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.contract.Transact(opts, "settleBondedWithdrawal", bonder, transferId, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +} + +// SettleBondedWithdrawal is a paid mutator transaction binding the contract method 0xc7525dd3. +// +// Solidity: function settleBondedWithdrawal(address bonder, bytes32 transferId, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) SettleBondedWithdrawal(bonder common.Address, transferId [32]byte, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.SettleBondedWithdrawal(&_HopL2ArbitrumBridge.TransactOpts, bonder, transferId, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +} + +// SettleBondedWithdrawal is a paid mutator transaction binding the contract method 0xc7525dd3. +// +// Solidity: function settleBondedWithdrawal(address bonder, bytes32 transferId, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorSession) SettleBondedWithdrawal(bonder common.Address, transferId [32]byte, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.SettleBondedWithdrawal(&_HopL2ArbitrumBridge.TransactOpts, bonder, transferId, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +} + +// SettleBondedWithdrawals is a paid mutator transaction binding the contract method 0xb162717e. +// +// Solidity: function settleBondedWithdrawals(address bonder, bytes32[] transferIds, uint256 totalAmount) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactor) SettleBondedWithdrawals(opts *bind.TransactOpts, bonder common.Address, transferIds [][32]byte, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.contract.Transact(opts, "settleBondedWithdrawals", bonder, transferIds, totalAmount) +} + +// SettleBondedWithdrawals is a paid mutator transaction binding the contract method 0xb162717e. +// +// Solidity: function settleBondedWithdrawals(address bonder, bytes32[] transferIds, uint256 totalAmount) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) SettleBondedWithdrawals(bonder common.Address, transferIds [][32]byte, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.SettleBondedWithdrawals(&_HopL2ArbitrumBridge.TransactOpts, bonder, transferIds, totalAmount) +} + +// SettleBondedWithdrawals is a paid mutator transaction binding the contract method 0xb162717e. +// +// Solidity: function settleBondedWithdrawals(address bonder, bytes32[] transferIds, uint256 totalAmount) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorSession) SettleBondedWithdrawals(bonder common.Address, transferIds [][32]byte, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.SettleBondedWithdrawals(&_HopL2ArbitrumBridge.TransactOpts, bonder, transferIds, totalAmount) +} + +// Stake is a paid mutator transaction binding the contract method 0xadc9772e. +// +// Solidity: function stake(address bonder, uint256 amount) payable returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactor) Stake(opts *bind.TransactOpts, bonder common.Address, amount *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.contract.Transact(opts, "stake", bonder, amount) +} + +// Stake is a paid mutator transaction binding the contract method 0xadc9772e. +// +// Solidity: function stake(address bonder, uint256 amount) payable returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) Stake(bonder common.Address, amount *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.Stake(&_HopL2ArbitrumBridge.TransactOpts, bonder, amount) +} + +// Stake is a paid mutator transaction binding the contract method 0xadc9772e. +// +// Solidity: function stake(address bonder, uint256 amount) payable returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorSession) Stake(bonder common.Address, amount *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.Stake(&_HopL2ArbitrumBridge.TransactOpts, bonder, amount) +} + +// Unstake is a paid mutator transaction binding the contract method 0x2e17de78. +// +// Solidity: function unstake(uint256 amount) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactor) Unstake(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.contract.Transact(opts, "unstake", amount) +} + +// Unstake is a paid mutator transaction binding the contract method 0x2e17de78. +// +// Solidity: function unstake(uint256 amount) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) Unstake(amount *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.Unstake(&_HopL2ArbitrumBridge.TransactOpts, amount) +} + +// Unstake is a paid mutator transaction binding the contract method 0x2e17de78. +// +// Solidity: function unstake(uint256 amount) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorSession) Unstake(amount *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.Unstake(&_HopL2ArbitrumBridge.TransactOpts, amount) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x0f7aadb7. +// +// Solidity: function withdraw(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactor) Withdraw(opts *bind.TransactOpts, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.contract.Transact(opts, "withdraw", recipient, amount, transferNonce, bonderFee, amountOutMin, deadline, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x0f7aadb7. +// +// Solidity: function withdraw(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeSession) Withdraw(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.Withdraw(&_HopL2ArbitrumBridge.TransactOpts, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x0f7aadb7. +// +// Solidity: function withdraw(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorSession) Withdraw(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL2ArbitrumBridge.Contract.Withdraw(&_HopL2ArbitrumBridge.TransactOpts, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +} + +// HopL2ArbitrumBridgeBonderAddedIterator is returned from FilterBonderAdded and is used to iterate over the raw logs and unpacked data for BonderAdded events raised by the HopL2ArbitrumBridge contract. +type HopL2ArbitrumBridgeBonderAddedIterator struct { + Event *HopL2ArbitrumBridgeBonderAdded // 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 *HopL2ArbitrumBridgeBonderAddedIterator) 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(HopL2ArbitrumBridgeBonderAdded) + 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(HopL2ArbitrumBridgeBonderAdded) + 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 *HopL2ArbitrumBridgeBonderAddedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL2ArbitrumBridgeBonderAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL2ArbitrumBridgeBonderAdded represents a BonderAdded event raised by the HopL2ArbitrumBridge contract. +type HopL2ArbitrumBridgeBonderAdded struct { + NewBonder common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBonderAdded is a free log retrieval operation binding the contract event 0x2cec73b7434d3b91198ad1a618f63e6a0761ce281af5ec9ec76606d948d03e23. +// +// Solidity: event BonderAdded(address indexed newBonder) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) FilterBonderAdded(opts *bind.FilterOpts, newBonder []common.Address) (*HopL2ArbitrumBridgeBonderAddedIterator, error) { + + var newBonderRule []interface{} + for _, newBonderItem := range newBonder { + newBonderRule = append(newBonderRule, newBonderItem) + } + + logs, sub, err := _HopL2ArbitrumBridge.contract.FilterLogs(opts, "BonderAdded", newBonderRule) + if err != nil { + return nil, err + } + return &HopL2ArbitrumBridgeBonderAddedIterator{contract: _HopL2ArbitrumBridge.contract, event: "BonderAdded", logs: logs, sub: sub}, nil +} + +// WatchBonderAdded is a free log subscription operation binding the contract event 0x2cec73b7434d3b91198ad1a618f63e6a0761ce281af5ec9ec76606d948d03e23. +// +// Solidity: event BonderAdded(address indexed newBonder) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) WatchBonderAdded(opts *bind.WatchOpts, sink chan<- *HopL2ArbitrumBridgeBonderAdded, newBonder []common.Address) (event.Subscription, error) { + + var newBonderRule []interface{} + for _, newBonderItem := range newBonder { + newBonderRule = append(newBonderRule, newBonderItem) + } + + logs, sub, err := _HopL2ArbitrumBridge.contract.WatchLogs(opts, "BonderAdded", newBonderRule) + 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(HopL2ArbitrumBridgeBonderAdded) + if err := _HopL2ArbitrumBridge.contract.UnpackLog(event, "BonderAdded", 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 +} + +// ParseBonderAdded is a log parse operation binding the contract event 0x2cec73b7434d3b91198ad1a618f63e6a0761ce281af5ec9ec76606d948d03e23. +// +// Solidity: event BonderAdded(address indexed newBonder) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) ParseBonderAdded(log types.Log) (*HopL2ArbitrumBridgeBonderAdded, error) { + event := new(HopL2ArbitrumBridgeBonderAdded) + if err := _HopL2ArbitrumBridge.contract.UnpackLog(event, "BonderAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL2ArbitrumBridgeBonderRemovedIterator is returned from FilterBonderRemoved and is used to iterate over the raw logs and unpacked data for BonderRemoved events raised by the HopL2ArbitrumBridge contract. +type HopL2ArbitrumBridgeBonderRemovedIterator struct { + Event *HopL2ArbitrumBridgeBonderRemoved // 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 *HopL2ArbitrumBridgeBonderRemovedIterator) 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(HopL2ArbitrumBridgeBonderRemoved) + 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(HopL2ArbitrumBridgeBonderRemoved) + 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 *HopL2ArbitrumBridgeBonderRemovedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL2ArbitrumBridgeBonderRemovedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL2ArbitrumBridgeBonderRemoved represents a BonderRemoved event raised by the HopL2ArbitrumBridge contract. +type HopL2ArbitrumBridgeBonderRemoved struct { + PreviousBonder common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBonderRemoved is a free log retrieval operation binding the contract event 0x4234ba611d325b3ba434c4e1b037967b955b1274d4185ee9847b7491111a48ff. +// +// Solidity: event BonderRemoved(address indexed previousBonder) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) FilterBonderRemoved(opts *bind.FilterOpts, previousBonder []common.Address) (*HopL2ArbitrumBridgeBonderRemovedIterator, error) { + + var previousBonderRule []interface{} + for _, previousBonderItem := range previousBonder { + previousBonderRule = append(previousBonderRule, previousBonderItem) + } + + logs, sub, err := _HopL2ArbitrumBridge.contract.FilterLogs(opts, "BonderRemoved", previousBonderRule) + if err != nil { + return nil, err + } + return &HopL2ArbitrumBridgeBonderRemovedIterator{contract: _HopL2ArbitrumBridge.contract, event: "BonderRemoved", logs: logs, sub: sub}, nil +} + +// WatchBonderRemoved is a free log subscription operation binding the contract event 0x4234ba611d325b3ba434c4e1b037967b955b1274d4185ee9847b7491111a48ff. +// +// Solidity: event BonderRemoved(address indexed previousBonder) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) WatchBonderRemoved(opts *bind.WatchOpts, sink chan<- *HopL2ArbitrumBridgeBonderRemoved, previousBonder []common.Address) (event.Subscription, error) { + + var previousBonderRule []interface{} + for _, previousBonderItem := range previousBonder { + previousBonderRule = append(previousBonderRule, previousBonderItem) + } + + logs, sub, err := _HopL2ArbitrumBridge.contract.WatchLogs(opts, "BonderRemoved", previousBonderRule) + 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(HopL2ArbitrumBridgeBonderRemoved) + if err := _HopL2ArbitrumBridge.contract.UnpackLog(event, "BonderRemoved", 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 +} + +// ParseBonderRemoved is a log parse operation binding the contract event 0x4234ba611d325b3ba434c4e1b037967b955b1274d4185ee9847b7491111a48ff. +// +// Solidity: event BonderRemoved(address indexed previousBonder) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) ParseBonderRemoved(log types.Log) (*HopL2ArbitrumBridgeBonderRemoved, error) { + event := new(HopL2ArbitrumBridgeBonderRemoved) + if err := _HopL2ArbitrumBridge.contract.UnpackLog(event, "BonderRemoved", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL2ArbitrumBridgeMultipleWithdrawalsSettledIterator is returned from FilterMultipleWithdrawalsSettled and is used to iterate over the raw logs and unpacked data for MultipleWithdrawalsSettled events raised by the HopL2ArbitrumBridge contract. +type HopL2ArbitrumBridgeMultipleWithdrawalsSettledIterator struct { + Event *HopL2ArbitrumBridgeMultipleWithdrawalsSettled // 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 *HopL2ArbitrumBridgeMultipleWithdrawalsSettledIterator) 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(HopL2ArbitrumBridgeMultipleWithdrawalsSettled) + 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(HopL2ArbitrumBridgeMultipleWithdrawalsSettled) + 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 *HopL2ArbitrumBridgeMultipleWithdrawalsSettledIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL2ArbitrumBridgeMultipleWithdrawalsSettledIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL2ArbitrumBridgeMultipleWithdrawalsSettled represents a MultipleWithdrawalsSettled event raised by the HopL2ArbitrumBridge contract. +type HopL2ArbitrumBridgeMultipleWithdrawalsSettled struct { + Bonder common.Address + RootHash [32]byte + TotalBondsSettled *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMultipleWithdrawalsSettled is a free log retrieval operation binding the contract event 0x78e830d08be9d5f957414c84d685c061ecbd8467be98b42ebb64f0118b57d2ff. +// +// Solidity: event MultipleWithdrawalsSettled(address indexed bonder, bytes32 indexed rootHash, uint256 totalBondsSettled) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) FilterMultipleWithdrawalsSettled(opts *bind.FilterOpts, bonder []common.Address, rootHash [][32]byte) (*HopL2ArbitrumBridgeMultipleWithdrawalsSettledIterator, error) { + + var bonderRule []interface{} + for _, bonderItem := range bonder { + bonderRule = append(bonderRule, bonderItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL2ArbitrumBridge.contract.FilterLogs(opts, "MultipleWithdrawalsSettled", bonderRule, rootHashRule) + if err != nil { + return nil, err + } + return &HopL2ArbitrumBridgeMultipleWithdrawalsSettledIterator{contract: _HopL2ArbitrumBridge.contract, event: "MultipleWithdrawalsSettled", logs: logs, sub: sub}, nil +} + +// WatchMultipleWithdrawalsSettled is a free log subscription operation binding the contract event 0x78e830d08be9d5f957414c84d685c061ecbd8467be98b42ebb64f0118b57d2ff. +// +// Solidity: event MultipleWithdrawalsSettled(address indexed bonder, bytes32 indexed rootHash, uint256 totalBondsSettled) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) WatchMultipleWithdrawalsSettled(opts *bind.WatchOpts, sink chan<- *HopL2ArbitrumBridgeMultipleWithdrawalsSettled, bonder []common.Address, rootHash [][32]byte) (event.Subscription, error) { + + var bonderRule []interface{} + for _, bonderItem := range bonder { + bonderRule = append(bonderRule, bonderItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL2ArbitrumBridge.contract.WatchLogs(opts, "MultipleWithdrawalsSettled", bonderRule, rootHashRule) + 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(HopL2ArbitrumBridgeMultipleWithdrawalsSettled) + if err := _HopL2ArbitrumBridge.contract.UnpackLog(event, "MultipleWithdrawalsSettled", 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 +} + +// ParseMultipleWithdrawalsSettled is a log parse operation binding the contract event 0x78e830d08be9d5f957414c84d685c061ecbd8467be98b42ebb64f0118b57d2ff. +// +// Solidity: event MultipleWithdrawalsSettled(address indexed bonder, bytes32 indexed rootHash, uint256 totalBondsSettled) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) ParseMultipleWithdrawalsSettled(log types.Log) (*HopL2ArbitrumBridgeMultipleWithdrawalsSettled, error) { + event := new(HopL2ArbitrumBridgeMultipleWithdrawalsSettled) + if err := _HopL2ArbitrumBridge.contract.UnpackLog(event, "MultipleWithdrawalsSettled", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL2ArbitrumBridgeStakeIterator is returned from FilterStake and is used to iterate over the raw logs and unpacked data for Stake events raised by the HopL2ArbitrumBridge contract. +type HopL2ArbitrumBridgeStakeIterator struct { + Event *HopL2ArbitrumBridgeStake // 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 *HopL2ArbitrumBridgeStakeIterator) 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(HopL2ArbitrumBridgeStake) + 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(HopL2ArbitrumBridgeStake) + 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 *HopL2ArbitrumBridgeStakeIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL2ArbitrumBridgeStakeIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL2ArbitrumBridgeStake represents a Stake event raised by the HopL2ArbitrumBridge contract. +type HopL2ArbitrumBridgeStake struct { + Account common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterStake is a free log retrieval operation binding the contract event 0xebedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a. +// +// Solidity: event Stake(address indexed account, uint256 amount) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) FilterStake(opts *bind.FilterOpts, account []common.Address) (*HopL2ArbitrumBridgeStakeIterator, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _HopL2ArbitrumBridge.contract.FilterLogs(opts, "Stake", accountRule) + if err != nil { + return nil, err + } + return &HopL2ArbitrumBridgeStakeIterator{contract: _HopL2ArbitrumBridge.contract, event: "Stake", logs: logs, sub: sub}, nil +} + +// WatchStake is a free log subscription operation binding the contract event 0xebedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a. +// +// Solidity: event Stake(address indexed account, uint256 amount) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) WatchStake(opts *bind.WatchOpts, sink chan<- *HopL2ArbitrumBridgeStake, account []common.Address) (event.Subscription, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _HopL2ArbitrumBridge.contract.WatchLogs(opts, "Stake", accountRule) + 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(HopL2ArbitrumBridgeStake) + if err := _HopL2ArbitrumBridge.contract.UnpackLog(event, "Stake", 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 +} + +// ParseStake is a log parse operation binding the contract event 0xebedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a. +// +// Solidity: event Stake(address indexed account, uint256 amount) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) ParseStake(log types.Log) (*HopL2ArbitrumBridgeStake, error) { + event := new(HopL2ArbitrumBridgeStake) + if err := _HopL2ArbitrumBridge.contract.UnpackLog(event, "Stake", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL2ArbitrumBridgeTransferFromL1CompletedIterator is returned from FilterTransferFromL1Completed and is used to iterate over the raw logs and unpacked data for TransferFromL1Completed events raised by the HopL2ArbitrumBridge contract. +type HopL2ArbitrumBridgeTransferFromL1CompletedIterator struct { + Event *HopL2ArbitrumBridgeTransferFromL1Completed // 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 *HopL2ArbitrumBridgeTransferFromL1CompletedIterator) 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(HopL2ArbitrumBridgeTransferFromL1Completed) + 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(HopL2ArbitrumBridgeTransferFromL1Completed) + 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 *HopL2ArbitrumBridgeTransferFromL1CompletedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL2ArbitrumBridgeTransferFromL1CompletedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL2ArbitrumBridgeTransferFromL1Completed represents a TransferFromL1Completed event raised by the HopL2ArbitrumBridge contract. +type HopL2ArbitrumBridgeTransferFromL1Completed struct { + Recipient common.Address + Amount *big.Int + AmountOutMin *big.Int + Deadline *big.Int + Relayer common.Address + RelayerFee *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransferFromL1Completed is a free log retrieval operation binding the contract event 0x320958176930804eb66c2343c7343fc0367dc16249590c0f195783bee199d094. +// +// Solidity: event TransferFromL1Completed(address indexed recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address indexed relayer, uint256 relayerFee) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) FilterTransferFromL1Completed(opts *bind.FilterOpts, recipient []common.Address, relayer []common.Address) (*HopL2ArbitrumBridgeTransferFromL1CompletedIterator, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + var relayerRule []interface{} + for _, relayerItem := range relayer { + relayerRule = append(relayerRule, relayerItem) + } + + logs, sub, err := _HopL2ArbitrumBridge.contract.FilterLogs(opts, "TransferFromL1Completed", recipientRule, relayerRule) + if err != nil { + return nil, err + } + return &HopL2ArbitrumBridgeTransferFromL1CompletedIterator{contract: _HopL2ArbitrumBridge.contract, event: "TransferFromL1Completed", logs: logs, sub: sub}, nil +} + +// WatchTransferFromL1Completed is a free log subscription operation binding the contract event 0x320958176930804eb66c2343c7343fc0367dc16249590c0f195783bee199d094. +// +// Solidity: event TransferFromL1Completed(address indexed recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address indexed relayer, uint256 relayerFee) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) WatchTransferFromL1Completed(opts *bind.WatchOpts, sink chan<- *HopL2ArbitrumBridgeTransferFromL1Completed, recipient []common.Address, relayer []common.Address) (event.Subscription, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + var relayerRule []interface{} + for _, relayerItem := range relayer { + relayerRule = append(relayerRule, relayerItem) + } + + logs, sub, err := _HopL2ArbitrumBridge.contract.WatchLogs(opts, "TransferFromL1Completed", recipientRule, relayerRule) + 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(HopL2ArbitrumBridgeTransferFromL1Completed) + if err := _HopL2ArbitrumBridge.contract.UnpackLog(event, "TransferFromL1Completed", 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 +} + +// ParseTransferFromL1Completed is a log parse operation binding the contract event 0x320958176930804eb66c2343c7343fc0367dc16249590c0f195783bee199d094. +// +// Solidity: event TransferFromL1Completed(address indexed recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address indexed relayer, uint256 relayerFee) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) ParseTransferFromL1Completed(log types.Log) (*HopL2ArbitrumBridgeTransferFromL1Completed, error) { + event := new(HopL2ArbitrumBridgeTransferFromL1Completed) + if err := _HopL2ArbitrumBridge.contract.UnpackLog(event, "TransferFromL1Completed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL2ArbitrumBridgeTransferRootSetIterator is returned from FilterTransferRootSet and is used to iterate over the raw logs and unpacked data for TransferRootSet events raised by the HopL2ArbitrumBridge contract. +type HopL2ArbitrumBridgeTransferRootSetIterator struct { + Event *HopL2ArbitrumBridgeTransferRootSet // 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 *HopL2ArbitrumBridgeTransferRootSetIterator) 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(HopL2ArbitrumBridgeTransferRootSet) + 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(HopL2ArbitrumBridgeTransferRootSet) + 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 *HopL2ArbitrumBridgeTransferRootSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL2ArbitrumBridgeTransferRootSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL2ArbitrumBridgeTransferRootSet represents a TransferRootSet event raised by the HopL2ArbitrumBridge contract. +type HopL2ArbitrumBridgeTransferRootSet struct { + RootHash [32]byte + TotalAmount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransferRootSet is a free log retrieval operation binding the contract event 0xb33d2162aead99dab59e77a7a67ea025b776bf8ca8079e132afdf9b23e03bd42. +// +// Solidity: event TransferRootSet(bytes32 indexed rootHash, uint256 totalAmount) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) FilterTransferRootSet(opts *bind.FilterOpts, rootHash [][32]byte) (*HopL2ArbitrumBridgeTransferRootSetIterator, error) { + + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL2ArbitrumBridge.contract.FilterLogs(opts, "TransferRootSet", rootHashRule) + if err != nil { + return nil, err + } + return &HopL2ArbitrumBridgeTransferRootSetIterator{contract: _HopL2ArbitrumBridge.contract, event: "TransferRootSet", logs: logs, sub: sub}, nil +} + +// WatchTransferRootSet is a free log subscription operation binding the contract event 0xb33d2162aead99dab59e77a7a67ea025b776bf8ca8079e132afdf9b23e03bd42. +// +// Solidity: event TransferRootSet(bytes32 indexed rootHash, uint256 totalAmount) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) WatchTransferRootSet(opts *bind.WatchOpts, sink chan<- *HopL2ArbitrumBridgeTransferRootSet, rootHash [][32]byte) (event.Subscription, error) { + + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL2ArbitrumBridge.contract.WatchLogs(opts, "TransferRootSet", rootHashRule) + 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(HopL2ArbitrumBridgeTransferRootSet) + if err := _HopL2ArbitrumBridge.contract.UnpackLog(event, "TransferRootSet", 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 +} + +// ParseTransferRootSet is a log parse operation binding the contract event 0xb33d2162aead99dab59e77a7a67ea025b776bf8ca8079e132afdf9b23e03bd42. +// +// Solidity: event TransferRootSet(bytes32 indexed rootHash, uint256 totalAmount) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) ParseTransferRootSet(log types.Log) (*HopL2ArbitrumBridgeTransferRootSet, error) { + event := new(HopL2ArbitrumBridgeTransferRootSet) + if err := _HopL2ArbitrumBridge.contract.UnpackLog(event, "TransferRootSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL2ArbitrumBridgeTransferSentIterator is returned from FilterTransferSent and is used to iterate over the raw logs and unpacked data for TransferSent events raised by the HopL2ArbitrumBridge contract. +type HopL2ArbitrumBridgeTransferSentIterator struct { + Event *HopL2ArbitrumBridgeTransferSent // 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 *HopL2ArbitrumBridgeTransferSentIterator) 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(HopL2ArbitrumBridgeTransferSent) + 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(HopL2ArbitrumBridgeTransferSent) + 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 *HopL2ArbitrumBridgeTransferSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL2ArbitrumBridgeTransferSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL2ArbitrumBridgeTransferSent represents a TransferSent event raised by the HopL2ArbitrumBridge contract. +type HopL2ArbitrumBridgeTransferSent struct { + TransferId [32]byte + ChainId *big.Int + Recipient common.Address + Amount *big.Int + TransferNonce [32]byte + BonderFee *big.Int + Index *big.Int + AmountOutMin *big.Int + Deadline *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransferSent is a free log retrieval operation binding the contract event 0xe35dddd4ea75d7e9b3fe93af4f4e40e778c3da4074c9d93e7c6536f1e803c1eb. +// +// Solidity: event TransferSent(bytes32 indexed transferId, uint256 indexed chainId, address indexed recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 index, uint256 amountOutMin, uint256 deadline) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) FilterTransferSent(opts *bind.FilterOpts, transferId [][32]byte, chainId []*big.Int, recipient []common.Address) (*HopL2ArbitrumBridgeTransferSentIterator, error) { + + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + var chainIdRule []interface{} + for _, chainIdItem := range chainId { + chainIdRule = append(chainIdRule, chainIdItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _HopL2ArbitrumBridge.contract.FilterLogs(opts, "TransferSent", transferIdRule, chainIdRule, recipientRule) + if err != nil { + return nil, err + } + return &HopL2ArbitrumBridgeTransferSentIterator{contract: _HopL2ArbitrumBridge.contract, event: "TransferSent", logs: logs, sub: sub}, nil +} + +// WatchTransferSent is a free log subscription operation binding the contract event 0xe35dddd4ea75d7e9b3fe93af4f4e40e778c3da4074c9d93e7c6536f1e803c1eb. +// +// Solidity: event TransferSent(bytes32 indexed transferId, uint256 indexed chainId, address indexed recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 index, uint256 amountOutMin, uint256 deadline) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) WatchTransferSent(opts *bind.WatchOpts, sink chan<- *HopL2ArbitrumBridgeTransferSent, transferId [][32]byte, chainId []*big.Int, recipient []common.Address) (event.Subscription, error) { + + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + var chainIdRule []interface{} + for _, chainIdItem := range chainId { + chainIdRule = append(chainIdRule, chainIdItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _HopL2ArbitrumBridge.contract.WatchLogs(opts, "TransferSent", transferIdRule, chainIdRule, recipientRule) + 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(HopL2ArbitrumBridgeTransferSent) + if err := _HopL2ArbitrumBridge.contract.UnpackLog(event, "TransferSent", 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 +} + +// ParseTransferSent is a log parse operation binding the contract event 0xe35dddd4ea75d7e9b3fe93af4f4e40e778c3da4074c9d93e7c6536f1e803c1eb. +// +// Solidity: event TransferSent(bytes32 indexed transferId, uint256 indexed chainId, address indexed recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 index, uint256 amountOutMin, uint256 deadline) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) ParseTransferSent(log types.Log) (*HopL2ArbitrumBridgeTransferSent, error) { + event := new(HopL2ArbitrumBridgeTransferSent) + if err := _HopL2ArbitrumBridge.contract.UnpackLog(event, "TransferSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL2ArbitrumBridgeTransfersCommittedIterator is returned from FilterTransfersCommitted and is used to iterate over the raw logs and unpacked data for TransfersCommitted events raised by the HopL2ArbitrumBridge contract. +type HopL2ArbitrumBridgeTransfersCommittedIterator struct { + Event *HopL2ArbitrumBridgeTransfersCommitted // 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 *HopL2ArbitrumBridgeTransfersCommittedIterator) 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(HopL2ArbitrumBridgeTransfersCommitted) + 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(HopL2ArbitrumBridgeTransfersCommitted) + 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 *HopL2ArbitrumBridgeTransfersCommittedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL2ArbitrumBridgeTransfersCommittedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL2ArbitrumBridgeTransfersCommitted represents a TransfersCommitted event raised by the HopL2ArbitrumBridge contract. +type HopL2ArbitrumBridgeTransfersCommitted struct { + DestinationChainId *big.Int + RootHash [32]byte + TotalAmount *big.Int + RootCommittedAt *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfersCommitted is a free log retrieval operation binding the contract event 0xf52ad20d3b4f50d1c40901dfb95a9ce5270b2fc32694e5c668354721cd87aa74. +// +// Solidity: event TransfersCommitted(uint256 indexed destinationChainId, bytes32 indexed rootHash, uint256 totalAmount, uint256 rootCommittedAt) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) FilterTransfersCommitted(opts *bind.FilterOpts, destinationChainId []*big.Int, rootHash [][32]byte) (*HopL2ArbitrumBridgeTransfersCommittedIterator, error) { + + var destinationChainIdRule []interface{} + for _, destinationChainIdItem := range destinationChainId { + destinationChainIdRule = append(destinationChainIdRule, destinationChainIdItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL2ArbitrumBridge.contract.FilterLogs(opts, "TransfersCommitted", destinationChainIdRule, rootHashRule) + if err != nil { + return nil, err + } + return &HopL2ArbitrumBridgeTransfersCommittedIterator{contract: _HopL2ArbitrumBridge.contract, event: "TransfersCommitted", logs: logs, sub: sub}, nil +} + +// WatchTransfersCommitted is a free log subscription operation binding the contract event 0xf52ad20d3b4f50d1c40901dfb95a9ce5270b2fc32694e5c668354721cd87aa74. +// +// Solidity: event TransfersCommitted(uint256 indexed destinationChainId, bytes32 indexed rootHash, uint256 totalAmount, uint256 rootCommittedAt) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) WatchTransfersCommitted(opts *bind.WatchOpts, sink chan<- *HopL2ArbitrumBridgeTransfersCommitted, destinationChainId []*big.Int, rootHash [][32]byte) (event.Subscription, error) { + + var destinationChainIdRule []interface{} + for _, destinationChainIdItem := range destinationChainId { + destinationChainIdRule = append(destinationChainIdRule, destinationChainIdItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL2ArbitrumBridge.contract.WatchLogs(opts, "TransfersCommitted", destinationChainIdRule, rootHashRule) + 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(HopL2ArbitrumBridgeTransfersCommitted) + if err := _HopL2ArbitrumBridge.contract.UnpackLog(event, "TransfersCommitted", 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 +} + +// ParseTransfersCommitted is a log parse operation binding the contract event 0xf52ad20d3b4f50d1c40901dfb95a9ce5270b2fc32694e5c668354721cd87aa74. +// +// Solidity: event TransfersCommitted(uint256 indexed destinationChainId, bytes32 indexed rootHash, uint256 totalAmount, uint256 rootCommittedAt) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) ParseTransfersCommitted(log types.Log) (*HopL2ArbitrumBridgeTransfersCommitted, error) { + event := new(HopL2ArbitrumBridgeTransfersCommitted) + if err := _HopL2ArbitrumBridge.contract.UnpackLog(event, "TransfersCommitted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL2ArbitrumBridgeUnstakeIterator is returned from FilterUnstake and is used to iterate over the raw logs and unpacked data for Unstake events raised by the HopL2ArbitrumBridge contract. +type HopL2ArbitrumBridgeUnstakeIterator struct { + Event *HopL2ArbitrumBridgeUnstake // 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 *HopL2ArbitrumBridgeUnstakeIterator) 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(HopL2ArbitrumBridgeUnstake) + 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(HopL2ArbitrumBridgeUnstake) + 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 *HopL2ArbitrumBridgeUnstakeIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL2ArbitrumBridgeUnstakeIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL2ArbitrumBridgeUnstake represents a Unstake event raised by the HopL2ArbitrumBridge contract. +type HopL2ArbitrumBridgeUnstake struct { + Account common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnstake is a free log retrieval operation binding the contract event 0x85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd. +// +// Solidity: event Unstake(address indexed account, uint256 amount) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) FilterUnstake(opts *bind.FilterOpts, account []common.Address) (*HopL2ArbitrumBridgeUnstakeIterator, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _HopL2ArbitrumBridge.contract.FilterLogs(opts, "Unstake", accountRule) + if err != nil { + return nil, err + } + return &HopL2ArbitrumBridgeUnstakeIterator{contract: _HopL2ArbitrumBridge.contract, event: "Unstake", logs: logs, sub: sub}, nil +} + +// WatchUnstake is a free log subscription operation binding the contract event 0x85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd. +// +// Solidity: event Unstake(address indexed account, uint256 amount) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) WatchUnstake(opts *bind.WatchOpts, sink chan<- *HopL2ArbitrumBridgeUnstake, account []common.Address) (event.Subscription, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _HopL2ArbitrumBridge.contract.WatchLogs(opts, "Unstake", accountRule) + 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(HopL2ArbitrumBridgeUnstake) + if err := _HopL2ArbitrumBridge.contract.UnpackLog(event, "Unstake", 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 +} + +// ParseUnstake is a log parse operation binding the contract event 0x85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd. +// +// Solidity: event Unstake(address indexed account, uint256 amount) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) ParseUnstake(log types.Log) (*HopL2ArbitrumBridgeUnstake, error) { + event := new(HopL2ArbitrumBridgeUnstake) + if err := _HopL2ArbitrumBridge.contract.UnpackLog(event, "Unstake", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL2ArbitrumBridgeWithdrawalBondSettledIterator is returned from FilterWithdrawalBondSettled and is used to iterate over the raw logs and unpacked data for WithdrawalBondSettled events raised by the HopL2ArbitrumBridge contract. +type HopL2ArbitrumBridgeWithdrawalBondSettledIterator struct { + Event *HopL2ArbitrumBridgeWithdrawalBondSettled // 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 *HopL2ArbitrumBridgeWithdrawalBondSettledIterator) 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(HopL2ArbitrumBridgeWithdrawalBondSettled) + 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(HopL2ArbitrumBridgeWithdrawalBondSettled) + 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 *HopL2ArbitrumBridgeWithdrawalBondSettledIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL2ArbitrumBridgeWithdrawalBondSettledIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL2ArbitrumBridgeWithdrawalBondSettled represents a WithdrawalBondSettled event raised by the HopL2ArbitrumBridge contract. +type HopL2ArbitrumBridgeWithdrawalBondSettled struct { + Bonder common.Address + TransferId [32]byte + RootHash [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawalBondSettled is a free log retrieval operation binding the contract event 0x84eb21b24c31b27a3bc67dde4a598aad06db6e9415cd66544492b9616996143c. +// +// Solidity: event WithdrawalBondSettled(address indexed bonder, bytes32 indexed transferId, bytes32 indexed rootHash) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) FilterWithdrawalBondSettled(opts *bind.FilterOpts, bonder []common.Address, transferId [][32]byte, rootHash [][32]byte) (*HopL2ArbitrumBridgeWithdrawalBondSettledIterator, error) { + + var bonderRule []interface{} + for _, bonderItem := range bonder { + bonderRule = append(bonderRule, bonderItem) + } + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL2ArbitrumBridge.contract.FilterLogs(opts, "WithdrawalBondSettled", bonderRule, transferIdRule, rootHashRule) + if err != nil { + return nil, err + } + return &HopL2ArbitrumBridgeWithdrawalBondSettledIterator{contract: _HopL2ArbitrumBridge.contract, event: "WithdrawalBondSettled", logs: logs, sub: sub}, nil +} + +// WatchWithdrawalBondSettled is a free log subscription operation binding the contract event 0x84eb21b24c31b27a3bc67dde4a598aad06db6e9415cd66544492b9616996143c. +// +// Solidity: event WithdrawalBondSettled(address indexed bonder, bytes32 indexed transferId, bytes32 indexed rootHash) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) WatchWithdrawalBondSettled(opts *bind.WatchOpts, sink chan<- *HopL2ArbitrumBridgeWithdrawalBondSettled, bonder []common.Address, transferId [][32]byte, rootHash [][32]byte) (event.Subscription, error) { + + var bonderRule []interface{} + for _, bonderItem := range bonder { + bonderRule = append(bonderRule, bonderItem) + } + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL2ArbitrumBridge.contract.WatchLogs(opts, "WithdrawalBondSettled", bonderRule, transferIdRule, rootHashRule) + 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(HopL2ArbitrumBridgeWithdrawalBondSettled) + if err := _HopL2ArbitrumBridge.contract.UnpackLog(event, "WithdrawalBondSettled", 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 +} + +// ParseWithdrawalBondSettled is a log parse operation binding the contract event 0x84eb21b24c31b27a3bc67dde4a598aad06db6e9415cd66544492b9616996143c. +// +// Solidity: event WithdrawalBondSettled(address indexed bonder, bytes32 indexed transferId, bytes32 indexed rootHash) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) ParseWithdrawalBondSettled(log types.Log) (*HopL2ArbitrumBridgeWithdrawalBondSettled, error) { + event := new(HopL2ArbitrumBridgeWithdrawalBondSettled) + if err := _HopL2ArbitrumBridge.contract.UnpackLog(event, "WithdrawalBondSettled", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL2ArbitrumBridgeWithdrawalBondedIterator is returned from FilterWithdrawalBonded and is used to iterate over the raw logs and unpacked data for WithdrawalBonded events raised by the HopL2ArbitrumBridge contract. +type HopL2ArbitrumBridgeWithdrawalBondedIterator struct { + Event *HopL2ArbitrumBridgeWithdrawalBonded // 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 *HopL2ArbitrumBridgeWithdrawalBondedIterator) 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(HopL2ArbitrumBridgeWithdrawalBonded) + 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(HopL2ArbitrumBridgeWithdrawalBonded) + 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 *HopL2ArbitrumBridgeWithdrawalBondedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL2ArbitrumBridgeWithdrawalBondedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL2ArbitrumBridgeWithdrawalBonded represents a WithdrawalBonded event raised by the HopL2ArbitrumBridge contract. +type HopL2ArbitrumBridgeWithdrawalBonded struct { + TransferId [32]byte + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawalBonded is a free log retrieval operation binding the contract event 0x0c3d250c7831051e78aa6a56679e590374c7c424415ffe4aa474491def2fe705. +// +// Solidity: event WithdrawalBonded(bytes32 indexed transferId, uint256 amount) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) FilterWithdrawalBonded(opts *bind.FilterOpts, transferId [][32]byte) (*HopL2ArbitrumBridgeWithdrawalBondedIterator, error) { + + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + + logs, sub, err := _HopL2ArbitrumBridge.contract.FilterLogs(opts, "WithdrawalBonded", transferIdRule) + if err != nil { + return nil, err + } + return &HopL2ArbitrumBridgeWithdrawalBondedIterator{contract: _HopL2ArbitrumBridge.contract, event: "WithdrawalBonded", logs: logs, sub: sub}, nil +} + +// WatchWithdrawalBonded is a free log subscription operation binding the contract event 0x0c3d250c7831051e78aa6a56679e590374c7c424415ffe4aa474491def2fe705. +// +// Solidity: event WithdrawalBonded(bytes32 indexed transferId, uint256 amount) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) WatchWithdrawalBonded(opts *bind.WatchOpts, sink chan<- *HopL2ArbitrumBridgeWithdrawalBonded, transferId [][32]byte) (event.Subscription, error) { + + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + + logs, sub, err := _HopL2ArbitrumBridge.contract.WatchLogs(opts, "WithdrawalBonded", transferIdRule) + 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(HopL2ArbitrumBridgeWithdrawalBonded) + if err := _HopL2ArbitrumBridge.contract.UnpackLog(event, "WithdrawalBonded", 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 +} + +// ParseWithdrawalBonded is a log parse operation binding the contract event 0x0c3d250c7831051e78aa6a56679e590374c7c424415ffe4aa474491def2fe705. +// +// Solidity: event WithdrawalBonded(bytes32 indexed transferId, uint256 amount) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) ParseWithdrawalBonded(log types.Log) (*HopL2ArbitrumBridgeWithdrawalBonded, error) { + event := new(HopL2ArbitrumBridgeWithdrawalBonded) + if err := _HopL2ArbitrumBridge.contract.UnpackLog(event, "WithdrawalBonded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL2ArbitrumBridgeWithdrewIterator is returned from FilterWithdrew and is used to iterate over the raw logs and unpacked data for Withdrew events raised by the HopL2ArbitrumBridge contract. +type HopL2ArbitrumBridgeWithdrewIterator struct { + Event *HopL2ArbitrumBridgeWithdrew // 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 *HopL2ArbitrumBridgeWithdrewIterator) 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(HopL2ArbitrumBridgeWithdrew) + 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(HopL2ArbitrumBridgeWithdrew) + 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 *HopL2ArbitrumBridgeWithdrewIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL2ArbitrumBridgeWithdrewIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL2ArbitrumBridgeWithdrew represents a Withdrew event raised by the HopL2ArbitrumBridge contract. +type HopL2ArbitrumBridgeWithdrew struct { + TransferId [32]byte + Recipient common.Address + Amount *big.Int + TransferNonce [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrew is a free log retrieval operation binding the contract event 0x9475cdbde5fc71fe2ccd413c82878ee54d061b9f74f9e2e1a03ff1178821502c. +// +// Solidity: event Withdrew(bytes32 indexed transferId, address indexed recipient, uint256 amount, bytes32 transferNonce) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) FilterWithdrew(opts *bind.FilterOpts, transferId [][32]byte, recipient []common.Address) (*HopL2ArbitrumBridgeWithdrewIterator, error) { + + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _HopL2ArbitrumBridge.contract.FilterLogs(opts, "Withdrew", transferIdRule, recipientRule) + if err != nil { + return nil, err + } + return &HopL2ArbitrumBridgeWithdrewIterator{contract: _HopL2ArbitrumBridge.contract, event: "Withdrew", logs: logs, sub: sub}, nil +} + +// WatchWithdrew is a free log subscription operation binding the contract event 0x9475cdbde5fc71fe2ccd413c82878ee54d061b9f74f9e2e1a03ff1178821502c. +// +// Solidity: event Withdrew(bytes32 indexed transferId, address indexed recipient, uint256 amount, bytes32 transferNonce) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) WatchWithdrew(opts *bind.WatchOpts, sink chan<- *HopL2ArbitrumBridgeWithdrew, transferId [][32]byte, recipient []common.Address) (event.Subscription, error) { + + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _HopL2ArbitrumBridge.contract.WatchLogs(opts, "Withdrew", transferIdRule, recipientRule) + 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(HopL2ArbitrumBridgeWithdrew) + if err := _HopL2ArbitrumBridge.contract.UnpackLog(event, "Withdrew", 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 +} + +// ParseWithdrew is a log parse operation binding the contract event 0x9475cdbde5fc71fe2ccd413c82878ee54d061b9f74f9e2e1a03ff1178821502c. +// +// Solidity: event Withdrew(bytes32 indexed transferId, address indexed recipient, uint256 amount, bytes32 transferNonce) +func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeFilterer) ParseWithdrew(log types.Log) (*HopL2ArbitrumBridgeWithdrew, error) { + event := new(HopL2ArbitrumBridgeWithdrew) + if err := _HopL2ArbitrumBridge.contract.UnpackLog(event, "Withdrew", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/contracts/hop/l2Contracts/l2CctpImplementation/l2CctpImplementation.go b/contracts/hop/l2Contracts/l2CctpImplementation/l2CctpImplementation.go new file mode 100644 index 000000000..79ea823d4 --- /dev/null +++ b/contracts/hop/l2Contracts/l2CctpImplementation/l2CctpImplementation.go @@ -0,0 +1,643 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package hopL2CctpImplementation + +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 +) + +// IAMMExactInputParams is an auto generated low-level Go binding around an user-defined struct. +type IAMMExactInputParams struct { + Path []byte + Recipient common.Address + AmountIn *big.Int + AmountOutMinimum *big.Int +} + +// HopL2CctpImplementationMetaData contains all meta data concerning the HopL2CctpImplementation contract. +var HopL2CctpImplementationMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nativeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"cctpAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeCollectorAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minBonderFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"chainIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32[]\",\"name\":\"domains\",\"type\":\"uint32[]\"},{\"internalType\":\"address\",\"name\":\"bridgedTokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ammAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"cctpNonce\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"}],\"name\":\"CCTPTransferSent\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"activeChainIds\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"amm\",\"outputs\":[{\"internalType\":\"contractIAMM\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgedToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"cctp\",\"outputs\":[{\"internalType\":\"contractICCTP\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"destinationDomains\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeCollectorAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minBonderFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nativeToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"}],\"name\":\"send\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"path\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMinimum\",\"type\":\"uint256\"}],\"internalType\":\"structIAMM.ExactInputParams\",\"name\":\"swapParams\",\"type\":\"tuple\"}],\"name\":\"swapAndSend\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// HopL2CctpImplementationABI is the input ABI used to generate the binding from. +// Deprecated: Use HopL2CctpImplementationMetaData.ABI instead. +var HopL2CctpImplementationABI = HopL2CctpImplementationMetaData.ABI + +// HopL2CctpImplementation is an auto generated Go binding around an Ethereum contract. +type HopL2CctpImplementation struct { + HopL2CctpImplementationCaller // Read-only binding to the contract + HopL2CctpImplementationTransactor // Write-only binding to the contract + HopL2CctpImplementationFilterer // Log filterer for contract events +} + +// HopL2CctpImplementationCaller is an auto generated read-only Go binding around an Ethereum contract. +type HopL2CctpImplementationCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// HopL2CctpImplementationTransactor is an auto generated write-only Go binding around an Ethereum contract. +type HopL2CctpImplementationTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// HopL2CctpImplementationFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type HopL2CctpImplementationFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// HopL2CctpImplementationSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type HopL2CctpImplementationSession struct { + Contract *HopL2CctpImplementation // 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 +} + +// HopL2CctpImplementationCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type HopL2CctpImplementationCallerSession struct { + Contract *HopL2CctpImplementationCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// HopL2CctpImplementationTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type HopL2CctpImplementationTransactorSession struct { + Contract *HopL2CctpImplementationTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// HopL2CctpImplementationRaw is an auto generated low-level Go binding around an Ethereum contract. +type HopL2CctpImplementationRaw struct { + Contract *HopL2CctpImplementation // Generic contract binding to access the raw methods on +} + +// HopL2CctpImplementationCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type HopL2CctpImplementationCallerRaw struct { + Contract *HopL2CctpImplementationCaller // Generic read-only contract binding to access the raw methods on +} + +// HopL2CctpImplementationTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type HopL2CctpImplementationTransactorRaw struct { + Contract *HopL2CctpImplementationTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewHopL2CctpImplementation creates a new instance of HopL2CctpImplementation, bound to a specific deployed contract. +func NewHopL2CctpImplementation(address common.Address, backend bind.ContractBackend) (*HopL2CctpImplementation, error) { + contract, err := bindHopL2CctpImplementation(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &HopL2CctpImplementation{HopL2CctpImplementationCaller: HopL2CctpImplementationCaller{contract: contract}, HopL2CctpImplementationTransactor: HopL2CctpImplementationTransactor{contract: contract}, HopL2CctpImplementationFilterer: HopL2CctpImplementationFilterer{contract: contract}}, nil +} + +// NewHopL2CctpImplementationCaller creates a new read-only instance of HopL2CctpImplementation, bound to a specific deployed contract. +func NewHopL2CctpImplementationCaller(address common.Address, caller bind.ContractCaller) (*HopL2CctpImplementationCaller, error) { + contract, err := bindHopL2CctpImplementation(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &HopL2CctpImplementationCaller{contract: contract}, nil +} + +// NewHopL2CctpImplementationTransactor creates a new write-only instance of HopL2CctpImplementation, bound to a specific deployed contract. +func NewHopL2CctpImplementationTransactor(address common.Address, transactor bind.ContractTransactor) (*HopL2CctpImplementationTransactor, error) { + contract, err := bindHopL2CctpImplementation(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &HopL2CctpImplementationTransactor{contract: contract}, nil +} + +// NewHopL2CctpImplementationFilterer creates a new log filterer instance of HopL2CctpImplementation, bound to a specific deployed contract. +func NewHopL2CctpImplementationFilterer(address common.Address, filterer bind.ContractFilterer) (*HopL2CctpImplementationFilterer, error) { + contract, err := bindHopL2CctpImplementation(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &HopL2CctpImplementationFilterer{contract: contract}, nil +} + +// bindHopL2CctpImplementation binds a generic wrapper to an already deployed contract. +func bindHopL2CctpImplementation(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := HopL2CctpImplementationMetaData.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 (_HopL2CctpImplementation *HopL2CctpImplementationRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _HopL2CctpImplementation.Contract.HopL2CctpImplementationCaller.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 (_HopL2CctpImplementation *HopL2CctpImplementationRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _HopL2CctpImplementation.Contract.HopL2CctpImplementationTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_HopL2CctpImplementation *HopL2CctpImplementationRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _HopL2CctpImplementation.Contract.HopL2CctpImplementationTransactor.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 (_HopL2CctpImplementation *HopL2CctpImplementationCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _HopL2CctpImplementation.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 (_HopL2CctpImplementation *HopL2CctpImplementationTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _HopL2CctpImplementation.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_HopL2CctpImplementation *HopL2CctpImplementationTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _HopL2CctpImplementation.Contract.contract.Transact(opts, method, params...) +} + +// ActiveChainIds is a free data retrieval call binding the contract method 0xc97d172e. +// +// Solidity: function activeChainIds(uint256 ) view returns(bool) +func (_HopL2CctpImplementation *HopL2CctpImplementationCaller) ActiveChainIds(opts *bind.CallOpts, arg0 *big.Int) (bool, error) { + var out []interface{} + err := _HopL2CctpImplementation.contract.Call(opts, &out, "activeChainIds", arg0) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// ActiveChainIds is a free data retrieval call binding the contract method 0xc97d172e. +// +// Solidity: function activeChainIds(uint256 ) view returns(bool) +func (_HopL2CctpImplementation *HopL2CctpImplementationSession) ActiveChainIds(arg0 *big.Int) (bool, error) { + return _HopL2CctpImplementation.Contract.ActiveChainIds(&_HopL2CctpImplementation.CallOpts, arg0) +} + +// ActiveChainIds is a free data retrieval call binding the contract method 0xc97d172e. +// +// Solidity: function activeChainIds(uint256 ) view returns(bool) +func (_HopL2CctpImplementation *HopL2CctpImplementationCallerSession) ActiveChainIds(arg0 *big.Int) (bool, error) { + return _HopL2CctpImplementation.Contract.ActiveChainIds(&_HopL2CctpImplementation.CallOpts, arg0) +} + +// Amm is a free data retrieval call binding the contract method 0x2a943945. +// +// Solidity: function amm() view returns(address) +func (_HopL2CctpImplementation *HopL2CctpImplementationCaller) Amm(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL2CctpImplementation.contract.Call(opts, &out, "amm") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Amm is a free data retrieval call binding the contract method 0x2a943945. +// +// Solidity: function amm() view returns(address) +func (_HopL2CctpImplementation *HopL2CctpImplementationSession) Amm() (common.Address, error) { + return _HopL2CctpImplementation.Contract.Amm(&_HopL2CctpImplementation.CallOpts) +} + +// Amm is a free data retrieval call binding the contract method 0x2a943945. +// +// Solidity: function amm() view returns(address) +func (_HopL2CctpImplementation *HopL2CctpImplementationCallerSession) Amm() (common.Address, error) { + return _HopL2CctpImplementation.Contract.Amm(&_HopL2CctpImplementation.CallOpts) +} + +// BridgedToken is a free data retrieval call binding the contract method 0xee383937. +// +// Solidity: function bridgedToken() view returns(address) +func (_HopL2CctpImplementation *HopL2CctpImplementationCaller) BridgedToken(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL2CctpImplementation.contract.Call(opts, &out, "bridgedToken") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// BridgedToken is a free data retrieval call binding the contract method 0xee383937. +// +// Solidity: function bridgedToken() view returns(address) +func (_HopL2CctpImplementation *HopL2CctpImplementationSession) BridgedToken() (common.Address, error) { + return _HopL2CctpImplementation.Contract.BridgedToken(&_HopL2CctpImplementation.CallOpts) +} + +// BridgedToken is a free data retrieval call binding the contract method 0xee383937. +// +// Solidity: function bridgedToken() view returns(address) +func (_HopL2CctpImplementation *HopL2CctpImplementationCallerSession) BridgedToken() (common.Address, error) { + return _HopL2CctpImplementation.Contract.BridgedToken(&_HopL2CctpImplementation.CallOpts) +} + +// Cctp is a free data retrieval call binding the contract method 0xe3329e32. +// +// Solidity: function cctp() view returns(address) +func (_HopL2CctpImplementation *HopL2CctpImplementationCaller) Cctp(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL2CctpImplementation.contract.Call(opts, &out, "cctp") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Cctp is a free data retrieval call binding the contract method 0xe3329e32. +// +// Solidity: function cctp() view returns(address) +func (_HopL2CctpImplementation *HopL2CctpImplementationSession) Cctp() (common.Address, error) { + return _HopL2CctpImplementation.Contract.Cctp(&_HopL2CctpImplementation.CallOpts) +} + +// Cctp is a free data retrieval call binding the contract method 0xe3329e32. +// +// Solidity: function cctp() view returns(address) +func (_HopL2CctpImplementation *HopL2CctpImplementationCallerSession) Cctp() (common.Address, error) { + return _HopL2CctpImplementation.Contract.Cctp(&_HopL2CctpImplementation.CallOpts) +} + +// DestinationDomains is a free data retrieval call binding the contract method 0x89aad5dc. +// +// Solidity: function destinationDomains(uint256 ) view returns(uint32) +func (_HopL2CctpImplementation *HopL2CctpImplementationCaller) DestinationDomains(opts *bind.CallOpts, arg0 *big.Int) (uint32, error) { + var out []interface{} + err := _HopL2CctpImplementation.contract.Call(opts, &out, "destinationDomains", arg0) + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +// DestinationDomains is a free data retrieval call binding the contract method 0x89aad5dc. +// +// Solidity: function destinationDomains(uint256 ) view returns(uint32) +func (_HopL2CctpImplementation *HopL2CctpImplementationSession) DestinationDomains(arg0 *big.Int) (uint32, error) { + return _HopL2CctpImplementation.Contract.DestinationDomains(&_HopL2CctpImplementation.CallOpts, arg0) +} + +// DestinationDomains is a free data retrieval call binding the contract method 0x89aad5dc. +// +// Solidity: function destinationDomains(uint256 ) view returns(uint32) +func (_HopL2CctpImplementation *HopL2CctpImplementationCallerSession) DestinationDomains(arg0 *big.Int) (uint32, error) { + return _HopL2CctpImplementation.Contract.DestinationDomains(&_HopL2CctpImplementation.CallOpts, arg0) +} + +// FeeCollectorAddress is a free data retrieval call binding the contract method 0xf108e225. +// +// Solidity: function feeCollectorAddress() view returns(address) +func (_HopL2CctpImplementation *HopL2CctpImplementationCaller) FeeCollectorAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL2CctpImplementation.contract.Call(opts, &out, "feeCollectorAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// FeeCollectorAddress is a free data retrieval call binding the contract method 0xf108e225. +// +// Solidity: function feeCollectorAddress() view returns(address) +func (_HopL2CctpImplementation *HopL2CctpImplementationSession) FeeCollectorAddress() (common.Address, error) { + return _HopL2CctpImplementation.Contract.FeeCollectorAddress(&_HopL2CctpImplementation.CallOpts) +} + +// FeeCollectorAddress is a free data retrieval call binding the contract method 0xf108e225. +// +// Solidity: function feeCollectorAddress() view returns(address) +func (_HopL2CctpImplementation *HopL2CctpImplementationCallerSession) FeeCollectorAddress() (common.Address, error) { + return _HopL2CctpImplementation.Contract.FeeCollectorAddress(&_HopL2CctpImplementation.CallOpts) +} + +// MinBonderFee is a free data retrieval call binding the contract method 0x50fc2401. +// +// Solidity: function minBonderFee() view returns(uint256) +func (_HopL2CctpImplementation *HopL2CctpImplementationCaller) MinBonderFee(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _HopL2CctpImplementation.contract.Call(opts, &out, "minBonderFee") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MinBonderFee is a free data retrieval call binding the contract method 0x50fc2401. +// +// Solidity: function minBonderFee() view returns(uint256) +func (_HopL2CctpImplementation *HopL2CctpImplementationSession) MinBonderFee() (*big.Int, error) { + return _HopL2CctpImplementation.Contract.MinBonderFee(&_HopL2CctpImplementation.CallOpts) +} + +// MinBonderFee is a free data retrieval call binding the contract method 0x50fc2401. +// +// Solidity: function minBonderFee() view returns(uint256) +func (_HopL2CctpImplementation *HopL2CctpImplementationCallerSession) MinBonderFee() (*big.Int, error) { + return _HopL2CctpImplementation.Contract.MinBonderFee(&_HopL2CctpImplementation.CallOpts) +} + +// NativeToken is a free data retrieval call binding the contract method 0xe1758bd8. +// +// Solidity: function nativeToken() view returns(address) +func (_HopL2CctpImplementation *HopL2CctpImplementationCaller) NativeToken(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL2CctpImplementation.contract.Call(opts, &out, "nativeToken") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// NativeToken is a free data retrieval call binding the contract method 0xe1758bd8. +// +// Solidity: function nativeToken() view returns(address) +func (_HopL2CctpImplementation *HopL2CctpImplementationSession) NativeToken() (common.Address, error) { + return _HopL2CctpImplementation.Contract.NativeToken(&_HopL2CctpImplementation.CallOpts) +} + +// NativeToken is a free data retrieval call binding the contract method 0xe1758bd8. +// +// Solidity: function nativeToken() view returns(address) +func (_HopL2CctpImplementation *HopL2CctpImplementationCallerSession) NativeToken() (common.Address, error) { + return _HopL2CctpImplementation.Contract.NativeToken(&_HopL2CctpImplementation.CallOpts) +} + +// Send is a paid mutator transaction binding the contract method 0xa134ce5b. +// +// Solidity: function send(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee) returns() +func (_HopL2CctpImplementation *HopL2CctpImplementationTransactor) Send(opts *bind.TransactOpts, chainId *big.Int, recipient common.Address, amount *big.Int, bonderFee *big.Int) (*types.Transaction, error) { + return _HopL2CctpImplementation.contract.Transact(opts, "send", chainId, recipient, amount, bonderFee) +} + +// Send is a paid mutator transaction binding the contract method 0xa134ce5b. +// +// Solidity: function send(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee) returns() +func (_HopL2CctpImplementation *HopL2CctpImplementationSession) Send(chainId *big.Int, recipient common.Address, amount *big.Int, bonderFee *big.Int) (*types.Transaction, error) { + return _HopL2CctpImplementation.Contract.Send(&_HopL2CctpImplementation.TransactOpts, chainId, recipient, amount, bonderFee) +} + +// Send is a paid mutator transaction binding the contract method 0xa134ce5b. +// +// Solidity: function send(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee) returns() +func (_HopL2CctpImplementation *HopL2CctpImplementationTransactorSession) Send(chainId *big.Int, recipient common.Address, amount *big.Int, bonderFee *big.Int) (*types.Transaction, error) { + return _HopL2CctpImplementation.Contract.Send(&_HopL2CctpImplementation.TransactOpts, chainId, recipient, amount, bonderFee) +} + +// SwapAndSend is a paid mutator transaction binding the contract method 0x070d46e4. +// +// Solidity: function swapAndSend(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee, (bytes,address,uint256,uint256) swapParams) returns() +func (_HopL2CctpImplementation *HopL2CctpImplementationTransactor) SwapAndSend(opts *bind.TransactOpts, chainId *big.Int, recipient common.Address, amount *big.Int, bonderFee *big.Int, swapParams IAMMExactInputParams) (*types.Transaction, error) { + return _HopL2CctpImplementation.contract.Transact(opts, "swapAndSend", chainId, recipient, amount, bonderFee, swapParams) +} + +// SwapAndSend is a paid mutator transaction binding the contract method 0x070d46e4. +// +// Solidity: function swapAndSend(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee, (bytes,address,uint256,uint256) swapParams) returns() +func (_HopL2CctpImplementation *HopL2CctpImplementationSession) SwapAndSend(chainId *big.Int, recipient common.Address, amount *big.Int, bonderFee *big.Int, swapParams IAMMExactInputParams) (*types.Transaction, error) { + return _HopL2CctpImplementation.Contract.SwapAndSend(&_HopL2CctpImplementation.TransactOpts, chainId, recipient, amount, bonderFee, swapParams) +} + +// SwapAndSend is a paid mutator transaction binding the contract method 0x070d46e4. +// +// Solidity: function swapAndSend(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee, (bytes,address,uint256,uint256) swapParams) returns() +func (_HopL2CctpImplementation *HopL2CctpImplementationTransactorSession) SwapAndSend(chainId *big.Int, recipient common.Address, amount *big.Int, bonderFee *big.Int, swapParams IAMMExactInputParams) (*types.Transaction, error) { + return _HopL2CctpImplementation.Contract.SwapAndSend(&_HopL2CctpImplementation.TransactOpts, chainId, recipient, amount, bonderFee, swapParams) +} + +// HopL2CctpImplementationCCTPTransferSentIterator is returned from FilterCCTPTransferSent and is used to iterate over the raw logs and unpacked data for CCTPTransferSent events raised by the HopL2CctpImplementation contract. +type HopL2CctpImplementationCCTPTransferSentIterator struct { + Event *HopL2CctpImplementationCCTPTransferSent // 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 *HopL2CctpImplementationCCTPTransferSentIterator) 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(HopL2CctpImplementationCCTPTransferSent) + 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(HopL2CctpImplementationCCTPTransferSent) + 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 *HopL2CctpImplementationCCTPTransferSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL2CctpImplementationCCTPTransferSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL2CctpImplementationCCTPTransferSent represents a CCTPTransferSent event raised by the HopL2CctpImplementation contract. +type HopL2CctpImplementationCCTPTransferSent struct { + CctpNonce uint64 + ChainId *big.Int + Recipient common.Address + Amount *big.Int + BonderFee *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCCTPTransferSent is a free log retrieval operation binding the contract event 0x10bf4019e09db5876a05d237bfcc676cd84eee2c23f820284906dd7cfa70d2c4. +// +// Solidity: event CCTPTransferSent(uint64 indexed cctpNonce, uint256 indexed chainId, address indexed recipient, uint256 amount, uint256 bonderFee) +func (_HopL2CctpImplementation *HopL2CctpImplementationFilterer) FilterCCTPTransferSent(opts *bind.FilterOpts, cctpNonce []uint64, chainId []*big.Int, recipient []common.Address) (*HopL2CctpImplementationCCTPTransferSentIterator, error) { + + var cctpNonceRule []interface{} + for _, cctpNonceItem := range cctpNonce { + cctpNonceRule = append(cctpNonceRule, cctpNonceItem) + } + var chainIdRule []interface{} + for _, chainIdItem := range chainId { + chainIdRule = append(chainIdRule, chainIdItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _HopL2CctpImplementation.contract.FilterLogs(opts, "CCTPTransferSent", cctpNonceRule, chainIdRule, recipientRule) + if err != nil { + return nil, err + } + return &HopL2CctpImplementationCCTPTransferSentIterator{contract: _HopL2CctpImplementation.contract, event: "CCTPTransferSent", logs: logs, sub: sub}, nil +} + +// WatchCCTPTransferSent is a free log subscription operation binding the contract event 0x10bf4019e09db5876a05d237bfcc676cd84eee2c23f820284906dd7cfa70d2c4. +// +// Solidity: event CCTPTransferSent(uint64 indexed cctpNonce, uint256 indexed chainId, address indexed recipient, uint256 amount, uint256 bonderFee) +func (_HopL2CctpImplementation *HopL2CctpImplementationFilterer) WatchCCTPTransferSent(opts *bind.WatchOpts, sink chan<- *HopL2CctpImplementationCCTPTransferSent, cctpNonce []uint64, chainId []*big.Int, recipient []common.Address) (event.Subscription, error) { + + var cctpNonceRule []interface{} + for _, cctpNonceItem := range cctpNonce { + cctpNonceRule = append(cctpNonceRule, cctpNonceItem) + } + var chainIdRule []interface{} + for _, chainIdItem := range chainId { + chainIdRule = append(chainIdRule, chainIdItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _HopL2CctpImplementation.contract.WatchLogs(opts, "CCTPTransferSent", cctpNonceRule, chainIdRule, recipientRule) + 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(HopL2CctpImplementationCCTPTransferSent) + if err := _HopL2CctpImplementation.contract.UnpackLog(event, "CCTPTransferSent", 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 +} + +// ParseCCTPTransferSent is a log parse operation binding the contract event 0x10bf4019e09db5876a05d237bfcc676cd84eee2c23f820284906dd7cfa70d2c4. +// +// Solidity: event CCTPTransferSent(uint64 indexed cctpNonce, uint256 indexed chainId, address indexed recipient, uint256 amount, uint256 bonderFee) +func (_HopL2CctpImplementation *HopL2CctpImplementationFilterer) ParseCCTPTransferSent(log types.Log) (*HopL2CctpImplementationCCTPTransferSent, error) { + event := new(HopL2CctpImplementationCCTPTransferSent) + if err := _HopL2CctpImplementation.contract.UnpackLog(event, "CCTPTransferSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/contracts/hop/l2Contracts/l2OptimismBridge/l2OptimismBridge.go b/contracts/hop/l2Contracts/l2OptimismBridge/l2OptimismBridge.go new file mode 100644 index 000000000..1f82f2ed5 --- /dev/null +++ b/contracts/hop/l2Contracts/l2OptimismBridge/l2OptimismBridge.go @@ -0,0 +1,3392 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package hopL2OptimismBridge + +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 +) + +// BridgeTransferRoot is an auto generated low-level Go binding around an user-defined struct. +type BridgeTransferRoot struct { + Total *big.Int + AmountWithdrawn *big.Int + CreatedAt *big.Int +} + +// HopL2OptimismBridgeMetaData contains all meta data concerning the HopL2OptimismBridge contract. +var HopL2OptimismBridgeMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"contractiOVM_L2CrossDomainMessenger\",\"name\":\"_messenger\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"l1Governance\",\"type\":\"address\"},{\"internalType\":\"contractHopBridgeToken\",\"name\":\"hToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"l1BridgeAddress\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"activeChainIds\",\"type\":\"uint256[]\"},{\"internalType\":\"address[]\",\"name\":\"bonders\",\"type\":\"address[]\"},{\"internalType\":\"uint32\",\"name\":\"_defaultGasLimit\",\"type\":\"uint32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newBonder\",\"type\":\"address\"}],\"name\":\"BonderAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousBonder\",\"type\":\"address\"}],\"name\":\"BonderRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalBondsSettled\",\"type\":\"uint256\"}],\"name\":\"MultipleWithdrawalsSettled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Stake\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"relayerFee\",\"type\":\"uint256\"}],\"name\":\"TransferFromL1Completed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"TransferRootSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TransferSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"rootCommittedAt\",\"type\":\"uint256\"}],\"name\":\"TransfersCommitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Unstake\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"}],\"name\":\"WithdrawalBondSettled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"WithdrawalBonded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"}],\"name\":\"Withdrew\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"activeChainIds\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"chainIds\",\"type\":\"uint256[]\"}],\"name\":\"addActiveChainIds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"addBonder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ammWrapper\",\"outputs\":[{\"internalType\":\"contractI_L2_AmmWrapper\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"}],\"name\":\"bondWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"bondWithdrawalAndDistribute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"}],\"name\":\"commitTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"defaultGasLimit\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"relayerFee\",\"type\":\"uint256\"}],\"name\":\"distribute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"}],\"name\":\"getBondedWithdrawalAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"getCredit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"getDebitAndAdditionalDebit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"maybeBonder\",\"type\":\"address\"}],\"name\":\"getIsBonder\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNextTransferNonce\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"getRawDebit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"getTransferId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"getTransferRoot\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"total\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountWithdrawn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"}],\"internalType\":\"structBridge.TransferRoot\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"getTransferRootId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hToken\",\"outputs\":[{\"internalType\":\"contractHopBridgeToken\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"}],\"name\":\"isTransferIdSpent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l1BridgeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l1BridgeCaller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l1Governance\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"lastCommitTimeForChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxPendingTransfers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"contractiOVM_L2CrossDomainMessenger\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minBonderBps\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minBonderFeeAbsolute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumForceCommitDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"pendingAmountForChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"pendingTransferIdsForChainId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"chainIds\",\"type\":\"uint256[]\"}],\"name\":\"removeActiveChainIds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"}],\"name\":\"removeBonder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"originalAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"rescueTransferRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"send\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractI_L2_AmmWrapper\",\"name\":\"_ammWrapper\",\"type\":\"address\"}],\"name\":\"setAmmWrapper\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_defaultGasLimit\",\"type\":\"uint32\"}],\"name\":\"setDefaultGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"setHopBridgeTokenOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1BridgeAddress\",\"type\":\"address\"}],\"name\":\"setL1BridgeAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1BridgeCaller\",\"type\":\"address\"}],\"name\":\"setL1BridgeCaller\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Governance\",\"type\":\"address\"}],\"name\":\"setL1Governance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxPendingTransfers\",\"type\":\"uint256\"}],\"name\":\"setMaxPendingTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractiOVM_L2CrossDomainMessenger\",\"name\":\"_messenger\",\"type\":\"address\"}],\"name\":\"setMessenger\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minBonderBps\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minBonderFeeAbsolute\",\"type\":\"uint256\"}],\"name\":\"setMinimumBonderFeeRequirements\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minimumForceCommitDelay\",\"type\":\"uint256\"}],\"name\":\"setMinimumForceCommitDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"setTransferRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"transferId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"transferRootTotalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"transferIdTreeIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"siblings\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"totalLeaves\",\"type\":\"uint256\"}],\"name\":\"settleBondedWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"bytes32[]\",\"name\":\"transferIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"settleBondedWithdrawals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bonder\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transferNonceIncrementer\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"unstake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"transferNonce\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"transferRootTotalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"transferIdTreeIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"siblings\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"totalLeaves\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// HopL2OptimismBridgeABI is the input ABI used to generate the binding from. +// Deprecated: Use HopL2OptimismBridgeMetaData.ABI instead. +var HopL2OptimismBridgeABI = HopL2OptimismBridgeMetaData.ABI + +// HopL2OptimismBridge is an auto generated Go binding around an Ethereum contract. +type HopL2OptimismBridge struct { + HopL2OptimismBridgeCaller // Read-only binding to the contract + HopL2OptimismBridgeTransactor // Write-only binding to the contract + HopL2OptimismBridgeFilterer // Log filterer for contract events +} + +// HopL2OptimismBridgeCaller is an auto generated read-only Go binding around an Ethereum contract. +type HopL2OptimismBridgeCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// HopL2OptimismBridgeTransactor is an auto generated write-only Go binding around an Ethereum contract. +type HopL2OptimismBridgeTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// HopL2OptimismBridgeFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type HopL2OptimismBridgeFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// HopL2OptimismBridgeSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type HopL2OptimismBridgeSession struct { + Contract *HopL2OptimismBridge // 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 +} + +// HopL2OptimismBridgeCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type HopL2OptimismBridgeCallerSession struct { + Contract *HopL2OptimismBridgeCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// HopL2OptimismBridgeTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type HopL2OptimismBridgeTransactorSession struct { + Contract *HopL2OptimismBridgeTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// HopL2OptimismBridgeRaw is an auto generated low-level Go binding around an Ethereum contract. +type HopL2OptimismBridgeRaw struct { + Contract *HopL2OptimismBridge // Generic contract binding to access the raw methods on +} + +// HopL2OptimismBridgeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type HopL2OptimismBridgeCallerRaw struct { + Contract *HopL2OptimismBridgeCaller // Generic read-only contract binding to access the raw methods on +} + +// HopL2OptimismBridgeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type HopL2OptimismBridgeTransactorRaw struct { + Contract *HopL2OptimismBridgeTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewHopL2OptimismBridge creates a new instance of HopL2OptimismBridge, bound to a specific deployed contract. +func NewHopL2OptimismBridge(address common.Address, backend bind.ContractBackend) (*HopL2OptimismBridge, error) { + contract, err := bindHopL2OptimismBridge(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &HopL2OptimismBridge{HopL2OptimismBridgeCaller: HopL2OptimismBridgeCaller{contract: contract}, HopL2OptimismBridgeTransactor: HopL2OptimismBridgeTransactor{contract: contract}, HopL2OptimismBridgeFilterer: HopL2OptimismBridgeFilterer{contract: contract}}, nil +} + +// NewHopL2OptimismBridgeCaller creates a new read-only instance of HopL2OptimismBridge, bound to a specific deployed contract. +func NewHopL2OptimismBridgeCaller(address common.Address, caller bind.ContractCaller) (*HopL2OptimismBridgeCaller, error) { + contract, err := bindHopL2OptimismBridge(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &HopL2OptimismBridgeCaller{contract: contract}, nil +} + +// NewHopL2OptimismBridgeTransactor creates a new write-only instance of HopL2OptimismBridge, bound to a specific deployed contract. +func NewHopL2OptimismBridgeTransactor(address common.Address, transactor bind.ContractTransactor) (*HopL2OptimismBridgeTransactor, error) { + contract, err := bindHopL2OptimismBridge(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &HopL2OptimismBridgeTransactor{contract: contract}, nil +} + +// NewHopL2OptimismBridgeFilterer creates a new log filterer instance of HopL2OptimismBridge, bound to a specific deployed contract. +func NewHopL2OptimismBridgeFilterer(address common.Address, filterer bind.ContractFilterer) (*HopL2OptimismBridgeFilterer, error) { + contract, err := bindHopL2OptimismBridge(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &HopL2OptimismBridgeFilterer{contract: contract}, nil +} + +// bindHopL2OptimismBridge binds a generic wrapper to an already deployed contract. +func bindHopL2OptimismBridge(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := HopL2OptimismBridgeMetaData.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 (_HopL2OptimismBridge *HopL2OptimismBridgeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _HopL2OptimismBridge.Contract.HopL2OptimismBridgeCaller.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 (_HopL2OptimismBridge *HopL2OptimismBridgeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.HopL2OptimismBridgeTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_HopL2OptimismBridge *HopL2OptimismBridgeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.HopL2OptimismBridgeTransactor.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 (_HopL2OptimismBridge *HopL2OptimismBridgeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _HopL2OptimismBridge.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 (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.contract.Transact(opts, method, params...) +} + +// ActiveChainIds is a free data retrieval call binding the contract method 0xc97d172e. +// +// Solidity: function activeChainIds(uint256 ) view returns(bool) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCaller) ActiveChainIds(opts *bind.CallOpts, arg0 *big.Int) (bool, error) { + var out []interface{} + err := _HopL2OptimismBridge.contract.Call(opts, &out, "activeChainIds", arg0) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// ActiveChainIds is a free data retrieval call binding the contract method 0xc97d172e. +// +// Solidity: function activeChainIds(uint256 ) view returns(bool) +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) ActiveChainIds(arg0 *big.Int) (bool, error) { + return _HopL2OptimismBridge.Contract.ActiveChainIds(&_HopL2OptimismBridge.CallOpts, arg0) +} + +// ActiveChainIds is a free data retrieval call binding the contract method 0xc97d172e. +// +// Solidity: function activeChainIds(uint256 ) view returns(bool) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCallerSession) ActiveChainIds(arg0 *big.Int) (bool, error) { + return _HopL2OptimismBridge.Contract.ActiveChainIds(&_HopL2OptimismBridge.CallOpts, arg0) +} + +// AmmWrapper is a free data retrieval call binding the contract method 0xe9cdfe51. +// +// Solidity: function ammWrapper() view returns(address) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCaller) AmmWrapper(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL2OptimismBridge.contract.Call(opts, &out, "ammWrapper") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// AmmWrapper is a free data retrieval call binding the contract method 0xe9cdfe51. +// +// Solidity: function ammWrapper() view returns(address) +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) AmmWrapper() (common.Address, error) { + return _HopL2OptimismBridge.Contract.AmmWrapper(&_HopL2OptimismBridge.CallOpts) +} + +// AmmWrapper is a free data retrieval call binding the contract method 0xe9cdfe51. +// +// Solidity: function ammWrapper() view returns(address) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCallerSession) AmmWrapper() (common.Address, error) { + return _HopL2OptimismBridge.Contract.AmmWrapper(&_HopL2OptimismBridge.CallOpts) +} + +// DefaultGasLimit is a free data retrieval call binding the contract method 0x95368d2e. +// +// Solidity: function defaultGasLimit() view returns(uint32) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCaller) DefaultGasLimit(opts *bind.CallOpts) (uint32, error) { + var out []interface{} + err := _HopL2OptimismBridge.contract.Call(opts, &out, "defaultGasLimit") + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +// DefaultGasLimit is a free data retrieval call binding the contract method 0x95368d2e. +// +// Solidity: function defaultGasLimit() view returns(uint32) +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) DefaultGasLimit() (uint32, error) { + return _HopL2OptimismBridge.Contract.DefaultGasLimit(&_HopL2OptimismBridge.CallOpts) +} + +// DefaultGasLimit is a free data retrieval call binding the contract method 0x95368d2e. +// +// Solidity: function defaultGasLimit() view returns(uint32) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCallerSession) DefaultGasLimit() (uint32, error) { + return _HopL2OptimismBridge.Contract.DefaultGasLimit(&_HopL2OptimismBridge.CallOpts) +} + +// GetBondedWithdrawalAmount is a free data retrieval call binding the contract method 0x302830ab. +// +// Solidity: function getBondedWithdrawalAmount(address bonder, bytes32 transferId) view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCaller) GetBondedWithdrawalAmount(opts *bind.CallOpts, bonder common.Address, transferId [32]byte) (*big.Int, error) { + var out []interface{} + err := _HopL2OptimismBridge.contract.Call(opts, &out, "getBondedWithdrawalAmount", bonder, transferId) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetBondedWithdrawalAmount is a free data retrieval call binding the contract method 0x302830ab. +// +// Solidity: function getBondedWithdrawalAmount(address bonder, bytes32 transferId) view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) GetBondedWithdrawalAmount(bonder common.Address, transferId [32]byte) (*big.Int, error) { + return _HopL2OptimismBridge.Contract.GetBondedWithdrawalAmount(&_HopL2OptimismBridge.CallOpts, bonder, transferId) +} + +// GetBondedWithdrawalAmount is a free data retrieval call binding the contract method 0x302830ab. +// +// Solidity: function getBondedWithdrawalAmount(address bonder, bytes32 transferId) view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCallerSession) GetBondedWithdrawalAmount(bonder common.Address, transferId [32]byte) (*big.Int, error) { + return _HopL2OptimismBridge.Contract.GetBondedWithdrawalAmount(&_HopL2OptimismBridge.CallOpts, bonder, transferId) +} + +// GetChainId is a free data retrieval call binding the contract method 0x3408e470. +// +// Solidity: function getChainId() view returns(uint256 chainId) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCaller) GetChainId(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _HopL2OptimismBridge.contract.Call(opts, &out, "getChainId") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetChainId is a free data retrieval call binding the contract method 0x3408e470. +// +// Solidity: function getChainId() view returns(uint256 chainId) +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) GetChainId() (*big.Int, error) { + return _HopL2OptimismBridge.Contract.GetChainId(&_HopL2OptimismBridge.CallOpts) +} + +// GetChainId is a free data retrieval call binding the contract method 0x3408e470. +// +// Solidity: function getChainId() view returns(uint256 chainId) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCallerSession) GetChainId() (*big.Int, error) { + return _HopL2OptimismBridge.Contract.GetChainId(&_HopL2OptimismBridge.CallOpts) +} + +// GetCredit is a free data retrieval call binding the contract method 0x57344e6f. +// +// Solidity: function getCredit(address bonder) view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCaller) GetCredit(opts *bind.CallOpts, bonder common.Address) (*big.Int, error) { + var out []interface{} + err := _HopL2OptimismBridge.contract.Call(opts, &out, "getCredit", bonder) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetCredit is a free data retrieval call binding the contract method 0x57344e6f. +// +// Solidity: function getCredit(address bonder) view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) GetCredit(bonder common.Address) (*big.Int, error) { + return _HopL2OptimismBridge.Contract.GetCredit(&_HopL2OptimismBridge.CallOpts, bonder) +} + +// GetCredit is a free data retrieval call binding the contract method 0x57344e6f. +// +// Solidity: function getCredit(address bonder) view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCallerSession) GetCredit(bonder common.Address) (*big.Int, error) { + return _HopL2OptimismBridge.Contract.GetCredit(&_HopL2OptimismBridge.CallOpts, bonder) +} + +// GetDebitAndAdditionalDebit is a free data retrieval call binding the contract method 0xffa9286c. +// +// Solidity: function getDebitAndAdditionalDebit(address bonder) view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCaller) GetDebitAndAdditionalDebit(opts *bind.CallOpts, bonder common.Address) (*big.Int, error) { + var out []interface{} + err := _HopL2OptimismBridge.contract.Call(opts, &out, "getDebitAndAdditionalDebit", bonder) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetDebitAndAdditionalDebit is a free data retrieval call binding the contract method 0xffa9286c. +// +// Solidity: function getDebitAndAdditionalDebit(address bonder) view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) GetDebitAndAdditionalDebit(bonder common.Address) (*big.Int, error) { + return _HopL2OptimismBridge.Contract.GetDebitAndAdditionalDebit(&_HopL2OptimismBridge.CallOpts, bonder) +} + +// GetDebitAndAdditionalDebit is a free data retrieval call binding the contract method 0xffa9286c. +// +// Solidity: function getDebitAndAdditionalDebit(address bonder) view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCallerSession) GetDebitAndAdditionalDebit(bonder common.Address) (*big.Int, error) { + return _HopL2OptimismBridge.Contract.GetDebitAndAdditionalDebit(&_HopL2OptimismBridge.CallOpts, bonder) +} + +// GetIsBonder is a free data retrieval call binding the contract method 0xd5ef7551. +// +// Solidity: function getIsBonder(address maybeBonder) view returns(bool) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCaller) GetIsBonder(opts *bind.CallOpts, maybeBonder common.Address) (bool, error) { + var out []interface{} + err := _HopL2OptimismBridge.contract.Call(opts, &out, "getIsBonder", maybeBonder) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// GetIsBonder is a free data retrieval call binding the contract method 0xd5ef7551. +// +// Solidity: function getIsBonder(address maybeBonder) view returns(bool) +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) GetIsBonder(maybeBonder common.Address) (bool, error) { + return _HopL2OptimismBridge.Contract.GetIsBonder(&_HopL2OptimismBridge.CallOpts, maybeBonder) +} + +// GetIsBonder is a free data retrieval call binding the contract method 0xd5ef7551. +// +// Solidity: function getIsBonder(address maybeBonder) view returns(bool) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCallerSession) GetIsBonder(maybeBonder common.Address) (bool, error) { + return _HopL2OptimismBridge.Contract.GetIsBonder(&_HopL2OptimismBridge.CallOpts, maybeBonder) +} + +// GetNextTransferNonce is a free data retrieval call binding the contract method 0x051e7216. +// +// Solidity: function getNextTransferNonce() view returns(bytes32) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCaller) GetNextTransferNonce(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _HopL2OptimismBridge.contract.Call(opts, &out, "getNextTransferNonce") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetNextTransferNonce is a free data retrieval call binding the contract method 0x051e7216. +// +// Solidity: function getNextTransferNonce() view returns(bytes32) +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) GetNextTransferNonce() ([32]byte, error) { + return _HopL2OptimismBridge.Contract.GetNextTransferNonce(&_HopL2OptimismBridge.CallOpts) +} + +// GetNextTransferNonce is a free data retrieval call binding the contract method 0x051e7216. +// +// Solidity: function getNextTransferNonce() view returns(bytes32) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCallerSession) GetNextTransferNonce() ([32]byte, error) { + return _HopL2OptimismBridge.Contract.GetNextTransferNonce(&_HopL2OptimismBridge.CallOpts) +} + +// GetRawDebit is a free data retrieval call binding the contract method 0x13948c76. +// +// Solidity: function getRawDebit(address bonder) view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCaller) GetRawDebit(opts *bind.CallOpts, bonder common.Address) (*big.Int, error) { + var out []interface{} + err := _HopL2OptimismBridge.contract.Call(opts, &out, "getRawDebit", bonder) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetRawDebit is a free data retrieval call binding the contract method 0x13948c76. +// +// Solidity: function getRawDebit(address bonder) view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) GetRawDebit(bonder common.Address) (*big.Int, error) { + return _HopL2OptimismBridge.Contract.GetRawDebit(&_HopL2OptimismBridge.CallOpts, bonder) +} + +// GetRawDebit is a free data retrieval call binding the contract method 0x13948c76. +// +// Solidity: function getRawDebit(address bonder) view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCallerSession) GetRawDebit(bonder common.Address) (*big.Int, error) { + return _HopL2OptimismBridge.Contract.GetRawDebit(&_HopL2OptimismBridge.CallOpts, bonder) +} + +// GetTransferId is a free data retrieval call binding the contract method 0xaf215f94. +// +// Solidity: function getTransferId(uint256 chainId, address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline) pure returns(bytes32) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCaller) GetTransferId(opts *bind.CallOpts, chainId *big.Int, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) ([32]byte, error) { + var out []interface{} + err := _HopL2OptimismBridge.contract.Call(opts, &out, "getTransferId", chainId, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetTransferId is a free data retrieval call binding the contract method 0xaf215f94. +// +// Solidity: function getTransferId(uint256 chainId, address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline) pure returns(bytes32) +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) GetTransferId(chainId *big.Int, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) ([32]byte, error) { + return _HopL2OptimismBridge.Contract.GetTransferId(&_HopL2OptimismBridge.CallOpts, chainId, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline) +} + +// GetTransferId is a free data retrieval call binding the contract method 0xaf215f94. +// +// Solidity: function getTransferId(uint256 chainId, address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline) pure returns(bytes32) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCallerSession) GetTransferId(chainId *big.Int, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) ([32]byte, error) { + return _HopL2OptimismBridge.Contract.GetTransferId(&_HopL2OptimismBridge.CallOpts, chainId, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline) +} + +// GetTransferRoot is a free data retrieval call binding the contract method 0xce803b4f. +// +// Solidity: function getTransferRoot(bytes32 rootHash, uint256 totalAmount) view returns((uint256,uint256,uint256)) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCaller) GetTransferRoot(opts *bind.CallOpts, rootHash [32]byte, totalAmount *big.Int) (BridgeTransferRoot, error) { + var out []interface{} + err := _HopL2OptimismBridge.contract.Call(opts, &out, "getTransferRoot", rootHash, totalAmount) + + if err != nil { + return *new(BridgeTransferRoot), err + } + + out0 := *abi.ConvertType(out[0], new(BridgeTransferRoot)).(*BridgeTransferRoot) + + return out0, err + +} + +// GetTransferRoot is a free data retrieval call binding the contract method 0xce803b4f. +// +// Solidity: function getTransferRoot(bytes32 rootHash, uint256 totalAmount) view returns((uint256,uint256,uint256)) +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) GetTransferRoot(rootHash [32]byte, totalAmount *big.Int) (BridgeTransferRoot, error) { + return _HopL2OptimismBridge.Contract.GetTransferRoot(&_HopL2OptimismBridge.CallOpts, rootHash, totalAmount) +} + +// GetTransferRoot is a free data retrieval call binding the contract method 0xce803b4f. +// +// Solidity: function getTransferRoot(bytes32 rootHash, uint256 totalAmount) view returns((uint256,uint256,uint256)) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCallerSession) GetTransferRoot(rootHash [32]byte, totalAmount *big.Int) (BridgeTransferRoot, error) { + return _HopL2OptimismBridge.Contract.GetTransferRoot(&_HopL2OptimismBridge.CallOpts, rootHash, totalAmount) +} + +// GetTransferRootId is a free data retrieval call binding the contract method 0x960a7afa. +// +// Solidity: function getTransferRootId(bytes32 rootHash, uint256 totalAmount) pure returns(bytes32) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCaller) GetTransferRootId(opts *bind.CallOpts, rootHash [32]byte, totalAmount *big.Int) ([32]byte, error) { + var out []interface{} + err := _HopL2OptimismBridge.contract.Call(opts, &out, "getTransferRootId", rootHash, totalAmount) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetTransferRootId is a free data retrieval call binding the contract method 0x960a7afa. +// +// Solidity: function getTransferRootId(bytes32 rootHash, uint256 totalAmount) pure returns(bytes32) +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) GetTransferRootId(rootHash [32]byte, totalAmount *big.Int) ([32]byte, error) { + return _HopL2OptimismBridge.Contract.GetTransferRootId(&_HopL2OptimismBridge.CallOpts, rootHash, totalAmount) +} + +// GetTransferRootId is a free data retrieval call binding the contract method 0x960a7afa. +// +// Solidity: function getTransferRootId(bytes32 rootHash, uint256 totalAmount) pure returns(bytes32) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCallerSession) GetTransferRootId(rootHash [32]byte, totalAmount *big.Int) ([32]byte, error) { + return _HopL2OptimismBridge.Contract.GetTransferRootId(&_HopL2OptimismBridge.CallOpts, rootHash, totalAmount) +} + +// HToken is a free data retrieval call binding the contract method 0xfc6e3b3b. +// +// Solidity: function hToken() view returns(address) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCaller) HToken(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL2OptimismBridge.contract.Call(opts, &out, "hToken") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// HToken is a free data retrieval call binding the contract method 0xfc6e3b3b. +// +// Solidity: function hToken() view returns(address) +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) HToken() (common.Address, error) { + return _HopL2OptimismBridge.Contract.HToken(&_HopL2OptimismBridge.CallOpts) +} + +// HToken is a free data retrieval call binding the contract method 0xfc6e3b3b. +// +// Solidity: function hToken() view returns(address) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCallerSession) HToken() (common.Address, error) { + return _HopL2OptimismBridge.Contract.HToken(&_HopL2OptimismBridge.CallOpts) +} + +// IsTransferIdSpent is a free data retrieval call binding the contract method 0x3a7af631. +// +// Solidity: function isTransferIdSpent(bytes32 transferId) view returns(bool) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCaller) IsTransferIdSpent(opts *bind.CallOpts, transferId [32]byte) (bool, error) { + var out []interface{} + err := _HopL2OptimismBridge.contract.Call(opts, &out, "isTransferIdSpent", transferId) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsTransferIdSpent is a free data retrieval call binding the contract method 0x3a7af631. +// +// Solidity: function isTransferIdSpent(bytes32 transferId) view returns(bool) +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) IsTransferIdSpent(transferId [32]byte) (bool, error) { + return _HopL2OptimismBridge.Contract.IsTransferIdSpent(&_HopL2OptimismBridge.CallOpts, transferId) +} + +// IsTransferIdSpent is a free data retrieval call binding the contract method 0x3a7af631. +// +// Solidity: function isTransferIdSpent(bytes32 transferId) view returns(bool) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCallerSession) IsTransferIdSpent(transferId [32]byte) (bool, error) { + return _HopL2OptimismBridge.Contract.IsTransferIdSpent(&_HopL2OptimismBridge.CallOpts, transferId) +} + +// L1BridgeAddress is a free data retrieval call binding the contract method 0x5ab2a558. +// +// Solidity: function l1BridgeAddress() view returns(address) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCaller) L1BridgeAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL2OptimismBridge.contract.Call(opts, &out, "l1BridgeAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// L1BridgeAddress is a free data retrieval call binding the contract method 0x5ab2a558. +// +// Solidity: function l1BridgeAddress() view returns(address) +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) L1BridgeAddress() (common.Address, error) { + return _HopL2OptimismBridge.Contract.L1BridgeAddress(&_HopL2OptimismBridge.CallOpts) +} + +// L1BridgeAddress is a free data retrieval call binding the contract method 0x5ab2a558. +// +// Solidity: function l1BridgeAddress() view returns(address) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCallerSession) L1BridgeAddress() (common.Address, error) { + return _HopL2OptimismBridge.Contract.L1BridgeAddress(&_HopL2OptimismBridge.CallOpts) +} + +// L1BridgeCaller is a free data retrieval call binding the contract method 0xd2442783. +// +// Solidity: function l1BridgeCaller() view returns(address) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCaller) L1BridgeCaller(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL2OptimismBridge.contract.Call(opts, &out, "l1BridgeCaller") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// L1BridgeCaller is a free data retrieval call binding the contract method 0xd2442783. +// +// Solidity: function l1BridgeCaller() view returns(address) +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) L1BridgeCaller() (common.Address, error) { + return _HopL2OptimismBridge.Contract.L1BridgeCaller(&_HopL2OptimismBridge.CallOpts) +} + +// L1BridgeCaller is a free data retrieval call binding the contract method 0xd2442783. +// +// Solidity: function l1BridgeCaller() view returns(address) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCallerSession) L1BridgeCaller() (common.Address, error) { + return _HopL2OptimismBridge.Contract.L1BridgeCaller(&_HopL2OptimismBridge.CallOpts) +} + +// L1Governance is a free data retrieval call binding the contract method 0x3ef23f7f. +// +// Solidity: function l1Governance() view returns(address) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCaller) L1Governance(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL2OptimismBridge.contract.Call(opts, &out, "l1Governance") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// L1Governance is a free data retrieval call binding the contract method 0x3ef23f7f. +// +// Solidity: function l1Governance() view returns(address) +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) L1Governance() (common.Address, error) { + return _HopL2OptimismBridge.Contract.L1Governance(&_HopL2OptimismBridge.CallOpts) +} + +// L1Governance is a free data retrieval call binding the contract method 0x3ef23f7f. +// +// Solidity: function l1Governance() view returns(address) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCallerSession) L1Governance() (common.Address, error) { + return _HopL2OptimismBridge.Contract.L1Governance(&_HopL2OptimismBridge.CallOpts) +} + +// LastCommitTimeForChainId is a free data retrieval call binding the contract method 0xd4e54c47. +// +// Solidity: function lastCommitTimeForChainId(uint256 ) view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCaller) LastCommitTimeForChainId(opts *bind.CallOpts, arg0 *big.Int) (*big.Int, error) { + var out []interface{} + err := _HopL2OptimismBridge.contract.Call(opts, &out, "lastCommitTimeForChainId", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// LastCommitTimeForChainId is a free data retrieval call binding the contract method 0xd4e54c47. +// +// Solidity: function lastCommitTimeForChainId(uint256 ) view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) LastCommitTimeForChainId(arg0 *big.Int) (*big.Int, error) { + return _HopL2OptimismBridge.Contract.LastCommitTimeForChainId(&_HopL2OptimismBridge.CallOpts, arg0) +} + +// LastCommitTimeForChainId is a free data retrieval call binding the contract method 0xd4e54c47. +// +// Solidity: function lastCommitTimeForChainId(uint256 ) view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCallerSession) LastCommitTimeForChainId(arg0 *big.Int) (*big.Int, error) { + return _HopL2OptimismBridge.Contract.LastCommitTimeForChainId(&_HopL2OptimismBridge.CallOpts, arg0) +} + +// MaxPendingTransfers is a free data retrieval call binding the contract method 0xbed93c84. +// +// Solidity: function maxPendingTransfers() view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCaller) MaxPendingTransfers(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _HopL2OptimismBridge.contract.Call(opts, &out, "maxPendingTransfers") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MaxPendingTransfers is a free data retrieval call binding the contract method 0xbed93c84. +// +// Solidity: function maxPendingTransfers() view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) MaxPendingTransfers() (*big.Int, error) { + return _HopL2OptimismBridge.Contract.MaxPendingTransfers(&_HopL2OptimismBridge.CallOpts) +} + +// MaxPendingTransfers is a free data retrieval call binding the contract method 0xbed93c84. +// +// Solidity: function maxPendingTransfers() view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCallerSession) MaxPendingTransfers() (*big.Int, error) { + return _HopL2OptimismBridge.Contract.MaxPendingTransfers(&_HopL2OptimismBridge.CallOpts) +} + +// Messenger is a free data retrieval call binding the contract method 0x3cb747bf. +// +// Solidity: function messenger() view returns(address) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCaller) Messenger(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _HopL2OptimismBridge.contract.Call(opts, &out, "messenger") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Messenger is a free data retrieval call binding the contract method 0x3cb747bf. +// +// Solidity: function messenger() view returns(address) +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) Messenger() (common.Address, error) { + return _HopL2OptimismBridge.Contract.Messenger(&_HopL2OptimismBridge.CallOpts) +} + +// Messenger is a free data retrieval call binding the contract method 0x3cb747bf. +// +// Solidity: function messenger() view returns(address) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCallerSession) Messenger() (common.Address, error) { + return _HopL2OptimismBridge.Contract.Messenger(&_HopL2OptimismBridge.CallOpts) +} + +// MinBonderBps is a free data retrieval call binding the contract method 0x35e2c4af. +// +// Solidity: function minBonderBps() view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCaller) MinBonderBps(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _HopL2OptimismBridge.contract.Call(opts, &out, "minBonderBps") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MinBonderBps is a free data retrieval call binding the contract method 0x35e2c4af. +// +// Solidity: function minBonderBps() view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) MinBonderBps() (*big.Int, error) { + return _HopL2OptimismBridge.Contract.MinBonderBps(&_HopL2OptimismBridge.CallOpts) +} + +// MinBonderBps is a free data retrieval call binding the contract method 0x35e2c4af. +// +// Solidity: function minBonderBps() view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCallerSession) MinBonderBps() (*big.Int, error) { + return _HopL2OptimismBridge.Contract.MinBonderBps(&_HopL2OptimismBridge.CallOpts) +} + +// MinBonderFeeAbsolute is a free data retrieval call binding the contract method 0xc3035261. +// +// Solidity: function minBonderFeeAbsolute() view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCaller) MinBonderFeeAbsolute(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _HopL2OptimismBridge.contract.Call(opts, &out, "minBonderFeeAbsolute") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MinBonderFeeAbsolute is a free data retrieval call binding the contract method 0xc3035261. +// +// Solidity: function minBonderFeeAbsolute() view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) MinBonderFeeAbsolute() (*big.Int, error) { + return _HopL2OptimismBridge.Contract.MinBonderFeeAbsolute(&_HopL2OptimismBridge.CallOpts) +} + +// MinBonderFeeAbsolute is a free data retrieval call binding the contract method 0xc3035261. +// +// Solidity: function minBonderFeeAbsolute() view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCallerSession) MinBonderFeeAbsolute() (*big.Int, error) { + return _HopL2OptimismBridge.Contract.MinBonderFeeAbsolute(&_HopL2OptimismBridge.CallOpts) +} + +// MinimumForceCommitDelay is a free data retrieval call binding the contract method 0x8f658198. +// +// Solidity: function minimumForceCommitDelay() view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCaller) MinimumForceCommitDelay(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _HopL2OptimismBridge.contract.Call(opts, &out, "minimumForceCommitDelay") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MinimumForceCommitDelay is a free data retrieval call binding the contract method 0x8f658198. +// +// Solidity: function minimumForceCommitDelay() view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) MinimumForceCommitDelay() (*big.Int, error) { + return _HopL2OptimismBridge.Contract.MinimumForceCommitDelay(&_HopL2OptimismBridge.CallOpts) +} + +// MinimumForceCommitDelay is a free data retrieval call binding the contract method 0x8f658198. +// +// Solidity: function minimumForceCommitDelay() view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCallerSession) MinimumForceCommitDelay() (*big.Int, error) { + return _HopL2OptimismBridge.Contract.MinimumForceCommitDelay(&_HopL2OptimismBridge.CallOpts) +} + +// PendingAmountForChainId is a free data retrieval call binding the contract method 0x0f5e09e7. +// +// Solidity: function pendingAmountForChainId(uint256 ) view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCaller) PendingAmountForChainId(opts *bind.CallOpts, arg0 *big.Int) (*big.Int, error) { + var out []interface{} + err := _HopL2OptimismBridge.contract.Call(opts, &out, "pendingAmountForChainId", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// PendingAmountForChainId is a free data retrieval call binding the contract method 0x0f5e09e7. +// +// Solidity: function pendingAmountForChainId(uint256 ) view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) PendingAmountForChainId(arg0 *big.Int) (*big.Int, error) { + return _HopL2OptimismBridge.Contract.PendingAmountForChainId(&_HopL2OptimismBridge.CallOpts, arg0) +} + +// PendingAmountForChainId is a free data retrieval call binding the contract method 0x0f5e09e7. +// +// Solidity: function pendingAmountForChainId(uint256 ) view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCallerSession) PendingAmountForChainId(arg0 *big.Int) (*big.Int, error) { + return _HopL2OptimismBridge.Contract.PendingAmountForChainId(&_HopL2OptimismBridge.CallOpts, arg0) +} + +// PendingTransferIdsForChainId is a free data retrieval call binding the contract method 0x98445caf. +// +// Solidity: function pendingTransferIdsForChainId(uint256 , uint256 ) view returns(bytes32) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCaller) PendingTransferIdsForChainId(opts *bind.CallOpts, arg0 *big.Int, arg1 *big.Int) ([32]byte, error) { + var out []interface{} + err := _HopL2OptimismBridge.contract.Call(opts, &out, "pendingTransferIdsForChainId", arg0, arg1) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// PendingTransferIdsForChainId is a free data retrieval call binding the contract method 0x98445caf. +// +// Solidity: function pendingTransferIdsForChainId(uint256 , uint256 ) view returns(bytes32) +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) PendingTransferIdsForChainId(arg0 *big.Int, arg1 *big.Int) ([32]byte, error) { + return _HopL2OptimismBridge.Contract.PendingTransferIdsForChainId(&_HopL2OptimismBridge.CallOpts, arg0, arg1) +} + +// PendingTransferIdsForChainId is a free data retrieval call binding the contract method 0x98445caf. +// +// Solidity: function pendingTransferIdsForChainId(uint256 , uint256 ) view returns(bytes32) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCallerSession) PendingTransferIdsForChainId(arg0 *big.Int, arg1 *big.Int) ([32]byte, error) { + return _HopL2OptimismBridge.Contract.PendingTransferIdsForChainId(&_HopL2OptimismBridge.CallOpts, arg0, arg1) +} + +// TransferNonceIncrementer is a free data retrieval call binding the contract method 0x82c69f9d. +// +// Solidity: function transferNonceIncrementer() view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCaller) TransferNonceIncrementer(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _HopL2OptimismBridge.contract.Call(opts, &out, "transferNonceIncrementer") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TransferNonceIncrementer is a free data retrieval call binding the contract method 0x82c69f9d. +// +// Solidity: function transferNonceIncrementer() view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) TransferNonceIncrementer() (*big.Int, error) { + return _HopL2OptimismBridge.Contract.TransferNonceIncrementer(&_HopL2OptimismBridge.CallOpts) +} + +// TransferNonceIncrementer is a free data retrieval call binding the contract method 0x82c69f9d. +// +// Solidity: function transferNonceIncrementer() view returns(uint256) +func (_HopL2OptimismBridge *HopL2OptimismBridgeCallerSession) TransferNonceIncrementer() (*big.Int, error) { + return _HopL2OptimismBridge.Contract.TransferNonceIncrementer(&_HopL2OptimismBridge.CallOpts) +} + +// AddActiveChainIds is a paid mutator transaction binding the contract method 0xf8398fa4. +// +// Solidity: function addActiveChainIds(uint256[] chainIds) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactor) AddActiveChainIds(opts *bind.TransactOpts, chainIds []*big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.contract.Transact(opts, "addActiveChainIds", chainIds) +} + +// AddActiveChainIds is a paid mutator transaction binding the contract method 0xf8398fa4. +// +// Solidity: function addActiveChainIds(uint256[] chainIds) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) AddActiveChainIds(chainIds []*big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.AddActiveChainIds(&_HopL2OptimismBridge.TransactOpts, chainIds) +} + +// AddActiveChainIds is a paid mutator transaction binding the contract method 0xf8398fa4. +// +// Solidity: function addActiveChainIds(uint256[] chainIds) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorSession) AddActiveChainIds(chainIds []*big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.AddActiveChainIds(&_HopL2OptimismBridge.TransactOpts, chainIds) +} + +// AddBonder is a paid mutator transaction binding the contract method 0x5325937f. +// +// Solidity: function addBonder(address bonder) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactor) AddBonder(opts *bind.TransactOpts, bonder common.Address) (*types.Transaction, error) { + return _HopL2OptimismBridge.contract.Transact(opts, "addBonder", bonder) +} + +// AddBonder is a paid mutator transaction binding the contract method 0x5325937f. +// +// Solidity: function addBonder(address bonder) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) AddBonder(bonder common.Address) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.AddBonder(&_HopL2OptimismBridge.TransactOpts, bonder) +} + +// AddBonder is a paid mutator transaction binding the contract method 0x5325937f. +// +// Solidity: function addBonder(address bonder) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorSession) AddBonder(bonder common.Address) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.AddBonder(&_HopL2OptimismBridge.TransactOpts, bonder) +} + +// BondWithdrawal is a paid mutator transaction binding the contract method 0x23c452cd. +// +// Solidity: function bondWithdrawal(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactor) BondWithdrawal(opts *bind.TransactOpts, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.contract.Transact(opts, "bondWithdrawal", recipient, amount, transferNonce, bonderFee) +} + +// BondWithdrawal is a paid mutator transaction binding the contract method 0x23c452cd. +// +// Solidity: function bondWithdrawal(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) BondWithdrawal(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.BondWithdrawal(&_HopL2OptimismBridge.TransactOpts, recipient, amount, transferNonce, bonderFee) +} + +// BondWithdrawal is a paid mutator transaction binding the contract method 0x23c452cd. +// +// Solidity: function bondWithdrawal(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorSession) BondWithdrawal(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.BondWithdrawal(&_HopL2OptimismBridge.TransactOpts, recipient, amount, transferNonce, bonderFee) +} + +// BondWithdrawalAndDistribute is a paid mutator transaction binding the contract method 0x3d12a85a. +// +// Solidity: function bondWithdrawalAndDistribute(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactor) BondWithdrawalAndDistribute(opts *bind.TransactOpts, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.contract.Transact(opts, "bondWithdrawalAndDistribute", recipient, amount, transferNonce, bonderFee, amountOutMin, deadline) +} + +// BondWithdrawalAndDistribute is a paid mutator transaction binding the contract method 0x3d12a85a. +// +// Solidity: function bondWithdrawalAndDistribute(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) BondWithdrawalAndDistribute(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.BondWithdrawalAndDistribute(&_HopL2OptimismBridge.TransactOpts, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline) +} + +// BondWithdrawalAndDistribute is a paid mutator transaction binding the contract method 0x3d12a85a. +// +// Solidity: function bondWithdrawalAndDistribute(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorSession) BondWithdrawalAndDistribute(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.BondWithdrawalAndDistribute(&_HopL2OptimismBridge.TransactOpts, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline) +} + +// CommitTransfers is a paid mutator transaction binding the contract method 0x32b949a2. +// +// Solidity: function commitTransfers(uint256 destinationChainId) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactor) CommitTransfers(opts *bind.TransactOpts, destinationChainId *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.contract.Transact(opts, "commitTransfers", destinationChainId) +} + +// CommitTransfers is a paid mutator transaction binding the contract method 0x32b949a2. +// +// Solidity: function commitTransfers(uint256 destinationChainId) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) CommitTransfers(destinationChainId *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.CommitTransfers(&_HopL2OptimismBridge.TransactOpts, destinationChainId) +} + +// CommitTransfers is a paid mutator transaction binding the contract method 0x32b949a2. +// +// Solidity: function commitTransfers(uint256 destinationChainId) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorSession) CommitTransfers(destinationChainId *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.CommitTransfers(&_HopL2OptimismBridge.TransactOpts, destinationChainId) +} + +// Distribute is a paid mutator transaction binding the contract method 0xcc29a306. +// +// Solidity: function distribute(address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address relayer, uint256 relayerFee) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactor) Distribute(opts *bind.TransactOpts, recipient common.Address, amount *big.Int, amountOutMin *big.Int, deadline *big.Int, relayer common.Address, relayerFee *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.contract.Transact(opts, "distribute", recipient, amount, amountOutMin, deadline, relayer, relayerFee) +} + +// Distribute is a paid mutator transaction binding the contract method 0xcc29a306. +// +// Solidity: function distribute(address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address relayer, uint256 relayerFee) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) Distribute(recipient common.Address, amount *big.Int, amountOutMin *big.Int, deadline *big.Int, relayer common.Address, relayerFee *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.Distribute(&_HopL2OptimismBridge.TransactOpts, recipient, amount, amountOutMin, deadline, relayer, relayerFee) +} + +// Distribute is a paid mutator transaction binding the contract method 0xcc29a306. +// +// Solidity: function distribute(address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address relayer, uint256 relayerFee) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorSession) Distribute(recipient common.Address, amount *big.Int, amountOutMin *big.Int, deadline *big.Int, relayer common.Address, relayerFee *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.Distribute(&_HopL2OptimismBridge.TransactOpts, recipient, amount, amountOutMin, deadline, relayer, relayerFee) +} + +// RemoveActiveChainIds is a paid mutator transaction binding the contract method 0x9f600a0b. +// +// Solidity: function removeActiveChainIds(uint256[] chainIds) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactor) RemoveActiveChainIds(opts *bind.TransactOpts, chainIds []*big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.contract.Transact(opts, "removeActiveChainIds", chainIds) +} + +// RemoveActiveChainIds is a paid mutator transaction binding the contract method 0x9f600a0b. +// +// Solidity: function removeActiveChainIds(uint256[] chainIds) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) RemoveActiveChainIds(chainIds []*big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.RemoveActiveChainIds(&_HopL2OptimismBridge.TransactOpts, chainIds) +} + +// RemoveActiveChainIds is a paid mutator transaction binding the contract method 0x9f600a0b. +// +// Solidity: function removeActiveChainIds(uint256[] chainIds) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorSession) RemoveActiveChainIds(chainIds []*big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.RemoveActiveChainIds(&_HopL2OptimismBridge.TransactOpts, chainIds) +} + +// RemoveBonder is a paid mutator transaction binding the contract method 0x04e6c2c0. +// +// Solidity: function removeBonder(address bonder) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactor) RemoveBonder(opts *bind.TransactOpts, bonder common.Address) (*types.Transaction, error) { + return _HopL2OptimismBridge.contract.Transact(opts, "removeBonder", bonder) +} + +// RemoveBonder is a paid mutator transaction binding the contract method 0x04e6c2c0. +// +// Solidity: function removeBonder(address bonder) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) RemoveBonder(bonder common.Address) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.RemoveBonder(&_HopL2OptimismBridge.TransactOpts, bonder) +} + +// RemoveBonder is a paid mutator transaction binding the contract method 0x04e6c2c0. +// +// Solidity: function removeBonder(address bonder) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorSession) RemoveBonder(bonder common.Address) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.RemoveBonder(&_HopL2OptimismBridge.TransactOpts, bonder) +} + +// RescueTransferRoot is a paid mutator transaction binding the contract method 0xcbd1642e. +// +// Solidity: function rescueTransferRoot(bytes32 rootHash, uint256 originalAmount, address recipient) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactor) RescueTransferRoot(opts *bind.TransactOpts, rootHash [32]byte, originalAmount *big.Int, recipient common.Address) (*types.Transaction, error) { + return _HopL2OptimismBridge.contract.Transact(opts, "rescueTransferRoot", rootHash, originalAmount, recipient) +} + +// RescueTransferRoot is a paid mutator transaction binding the contract method 0xcbd1642e. +// +// Solidity: function rescueTransferRoot(bytes32 rootHash, uint256 originalAmount, address recipient) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) RescueTransferRoot(rootHash [32]byte, originalAmount *big.Int, recipient common.Address) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.RescueTransferRoot(&_HopL2OptimismBridge.TransactOpts, rootHash, originalAmount, recipient) +} + +// RescueTransferRoot is a paid mutator transaction binding the contract method 0xcbd1642e. +// +// Solidity: function rescueTransferRoot(bytes32 rootHash, uint256 originalAmount, address recipient) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorSession) RescueTransferRoot(rootHash [32]byte, originalAmount *big.Int, recipient common.Address) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.RescueTransferRoot(&_HopL2OptimismBridge.TransactOpts, rootHash, originalAmount, recipient) +} + +// Send is a paid mutator transaction binding the contract method 0xa6bd1b33. +// +// Solidity: function send(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee, uint256 amountOutMin, uint256 deadline) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactor) Send(opts *bind.TransactOpts, chainId *big.Int, recipient common.Address, amount *big.Int, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.contract.Transact(opts, "send", chainId, recipient, amount, bonderFee, amountOutMin, deadline) +} + +// Send is a paid mutator transaction binding the contract method 0xa6bd1b33. +// +// Solidity: function send(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee, uint256 amountOutMin, uint256 deadline) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) Send(chainId *big.Int, recipient common.Address, amount *big.Int, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.Send(&_HopL2OptimismBridge.TransactOpts, chainId, recipient, amount, bonderFee, amountOutMin, deadline) +} + +// Send is a paid mutator transaction binding the contract method 0xa6bd1b33. +// +// Solidity: function send(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee, uint256 amountOutMin, uint256 deadline) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorSession) Send(chainId *big.Int, recipient common.Address, amount *big.Int, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.Send(&_HopL2OptimismBridge.TransactOpts, chainId, recipient, amount, bonderFee, amountOutMin, deadline) +} + +// SetAmmWrapper is a paid mutator transaction binding the contract method 0x64c6fdb4. +// +// Solidity: function setAmmWrapper(address _ammWrapper) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactor) SetAmmWrapper(opts *bind.TransactOpts, _ammWrapper common.Address) (*types.Transaction, error) { + return _HopL2OptimismBridge.contract.Transact(opts, "setAmmWrapper", _ammWrapper) +} + +// SetAmmWrapper is a paid mutator transaction binding the contract method 0x64c6fdb4. +// +// Solidity: function setAmmWrapper(address _ammWrapper) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) SetAmmWrapper(_ammWrapper common.Address) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.SetAmmWrapper(&_HopL2OptimismBridge.TransactOpts, _ammWrapper) +} + +// SetAmmWrapper is a paid mutator transaction binding the contract method 0x64c6fdb4. +// +// Solidity: function setAmmWrapper(address _ammWrapper) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorSession) SetAmmWrapper(_ammWrapper common.Address) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.SetAmmWrapper(&_HopL2OptimismBridge.TransactOpts, _ammWrapper) +} + +// SetDefaultGasLimit is a paid mutator transaction binding the contract method 0x524b6f70. +// +// Solidity: function setDefaultGasLimit(uint32 _defaultGasLimit) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactor) SetDefaultGasLimit(opts *bind.TransactOpts, _defaultGasLimit uint32) (*types.Transaction, error) { + return _HopL2OptimismBridge.contract.Transact(opts, "setDefaultGasLimit", _defaultGasLimit) +} + +// SetDefaultGasLimit is a paid mutator transaction binding the contract method 0x524b6f70. +// +// Solidity: function setDefaultGasLimit(uint32 _defaultGasLimit) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) SetDefaultGasLimit(_defaultGasLimit uint32) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.SetDefaultGasLimit(&_HopL2OptimismBridge.TransactOpts, _defaultGasLimit) +} + +// SetDefaultGasLimit is a paid mutator transaction binding the contract method 0x524b6f70. +// +// Solidity: function setDefaultGasLimit(uint32 _defaultGasLimit) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorSession) SetDefaultGasLimit(_defaultGasLimit uint32) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.SetDefaultGasLimit(&_HopL2OptimismBridge.TransactOpts, _defaultGasLimit) +} + +// SetHopBridgeTokenOwner is a paid mutator transaction binding the contract method 0x8295f258. +// +// Solidity: function setHopBridgeTokenOwner(address newOwner) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactor) SetHopBridgeTokenOwner(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _HopL2OptimismBridge.contract.Transact(opts, "setHopBridgeTokenOwner", newOwner) +} + +// SetHopBridgeTokenOwner is a paid mutator transaction binding the contract method 0x8295f258. +// +// Solidity: function setHopBridgeTokenOwner(address newOwner) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) SetHopBridgeTokenOwner(newOwner common.Address) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.SetHopBridgeTokenOwner(&_HopL2OptimismBridge.TransactOpts, newOwner) +} + +// SetHopBridgeTokenOwner is a paid mutator transaction binding the contract method 0x8295f258. +// +// Solidity: function setHopBridgeTokenOwner(address newOwner) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorSession) SetHopBridgeTokenOwner(newOwner common.Address) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.SetHopBridgeTokenOwner(&_HopL2OptimismBridge.TransactOpts, newOwner) +} + +// SetL1BridgeAddress is a paid mutator transaction binding the contract method 0xe1825d06. +// +// Solidity: function setL1BridgeAddress(address _l1BridgeAddress) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactor) SetL1BridgeAddress(opts *bind.TransactOpts, _l1BridgeAddress common.Address) (*types.Transaction, error) { + return _HopL2OptimismBridge.contract.Transact(opts, "setL1BridgeAddress", _l1BridgeAddress) +} + +// SetL1BridgeAddress is a paid mutator transaction binding the contract method 0xe1825d06. +// +// Solidity: function setL1BridgeAddress(address _l1BridgeAddress) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) SetL1BridgeAddress(_l1BridgeAddress common.Address) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.SetL1BridgeAddress(&_HopL2OptimismBridge.TransactOpts, _l1BridgeAddress) +} + +// SetL1BridgeAddress is a paid mutator transaction binding the contract method 0xe1825d06. +// +// Solidity: function setL1BridgeAddress(address _l1BridgeAddress) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorSession) SetL1BridgeAddress(_l1BridgeAddress common.Address) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.SetL1BridgeAddress(&_HopL2OptimismBridge.TransactOpts, _l1BridgeAddress) +} + +// SetL1BridgeCaller is a paid mutator transaction binding the contract method 0xaf33ae69. +// +// Solidity: function setL1BridgeCaller(address _l1BridgeCaller) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactor) SetL1BridgeCaller(opts *bind.TransactOpts, _l1BridgeCaller common.Address) (*types.Transaction, error) { + return _HopL2OptimismBridge.contract.Transact(opts, "setL1BridgeCaller", _l1BridgeCaller) +} + +// SetL1BridgeCaller is a paid mutator transaction binding the contract method 0xaf33ae69. +// +// Solidity: function setL1BridgeCaller(address _l1BridgeCaller) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) SetL1BridgeCaller(_l1BridgeCaller common.Address) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.SetL1BridgeCaller(&_HopL2OptimismBridge.TransactOpts, _l1BridgeCaller) +} + +// SetL1BridgeCaller is a paid mutator transaction binding the contract method 0xaf33ae69. +// +// Solidity: function setL1BridgeCaller(address _l1BridgeCaller) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorSession) SetL1BridgeCaller(_l1BridgeCaller common.Address) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.SetL1BridgeCaller(&_HopL2OptimismBridge.TransactOpts, _l1BridgeCaller) +} + +// SetL1Governance is a paid mutator transaction binding the contract method 0xe40272d7. +// +// Solidity: function setL1Governance(address _l1Governance) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactor) SetL1Governance(opts *bind.TransactOpts, _l1Governance common.Address) (*types.Transaction, error) { + return _HopL2OptimismBridge.contract.Transact(opts, "setL1Governance", _l1Governance) +} + +// SetL1Governance is a paid mutator transaction binding the contract method 0xe40272d7. +// +// Solidity: function setL1Governance(address _l1Governance) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) SetL1Governance(_l1Governance common.Address) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.SetL1Governance(&_HopL2OptimismBridge.TransactOpts, _l1Governance) +} + +// SetL1Governance is a paid mutator transaction binding the contract method 0xe40272d7. +// +// Solidity: function setL1Governance(address _l1Governance) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorSession) SetL1Governance(_l1Governance common.Address) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.SetL1Governance(&_HopL2OptimismBridge.TransactOpts, _l1Governance) +} + +// SetMaxPendingTransfers is a paid mutator transaction binding the contract method 0x4742bbfb. +// +// Solidity: function setMaxPendingTransfers(uint256 _maxPendingTransfers) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactor) SetMaxPendingTransfers(opts *bind.TransactOpts, _maxPendingTransfers *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.contract.Transact(opts, "setMaxPendingTransfers", _maxPendingTransfers) +} + +// SetMaxPendingTransfers is a paid mutator transaction binding the contract method 0x4742bbfb. +// +// Solidity: function setMaxPendingTransfers(uint256 _maxPendingTransfers) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) SetMaxPendingTransfers(_maxPendingTransfers *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.SetMaxPendingTransfers(&_HopL2OptimismBridge.TransactOpts, _maxPendingTransfers) +} + +// SetMaxPendingTransfers is a paid mutator transaction binding the contract method 0x4742bbfb. +// +// Solidity: function setMaxPendingTransfers(uint256 _maxPendingTransfers) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorSession) SetMaxPendingTransfers(_maxPendingTransfers *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.SetMaxPendingTransfers(&_HopL2OptimismBridge.TransactOpts, _maxPendingTransfers) +} + +// SetMessenger is a paid mutator transaction binding the contract method 0x66285967. +// +// Solidity: function setMessenger(address _messenger) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactor) SetMessenger(opts *bind.TransactOpts, _messenger common.Address) (*types.Transaction, error) { + return _HopL2OptimismBridge.contract.Transact(opts, "setMessenger", _messenger) +} + +// SetMessenger is a paid mutator transaction binding the contract method 0x66285967. +// +// Solidity: function setMessenger(address _messenger) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) SetMessenger(_messenger common.Address) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.SetMessenger(&_HopL2OptimismBridge.TransactOpts, _messenger) +} + +// SetMessenger is a paid mutator transaction binding the contract method 0x66285967. +// +// Solidity: function setMessenger(address _messenger) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorSession) SetMessenger(_messenger common.Address) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.SetMessenger(&_HopL2OptimismBridge.TransactOpts, _messenger) +} + +// SetMinimumBonderFeeRequirements is a paid mutator transaction binding the contract method 0xa9fa4ed5. +// +// Solidity: function setMinimumBonderFeeRequirements(uint256 _minBonderBps, uint256 _minBonderFeeAbsolute) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactor) SetMinimumBonderFeeRequirements(opts *bind.TransactOpts, _minBonderBps *big.Int, _minBonderFeeAbsolute *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.contract.Transact(opts, "setMinimumBonderFeeRequirements", _minBonderBps, _minBonderFeeAbsolute) +} + +// SetMinimumBonderFeeRequirements is a paid mutator transaction binding the contract method 0xa9fa4ed5. +// +// Solidity: function setMinimumBonderFeeRequirements(uint256 _minBonderBps, uint256 _minBonderFeeAbsolute) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) SetMinimumBonderFeeRequirements(_minBonderBps *big.Int, _minBonderFeeAbsolute *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.SetMinimumBonderFeeRequirements(&_HopL2OptimismBridge.TransactOpts, _minBonderBps, _minBonderFeeAbsolute) +} + +// SetMinimumBonderFeeRequirements is a paid mutator transaction binding the contract method 0xa9fa4ed5. +// +// Solidity: function setMinimumBonderFeeRequirements(uint256 _minBonderBps, uint256 _minBonderFeeAbsolute) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorSession) SetMinimumBonderFeeRequirements(_minBonderBps *big.Int, _minBonderFeeAbsolute *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.SetMinimumBonderFeeRequirements(&_HopL2OptimismBridge.TransactOpts, _minBonderBps, _minBonderFeeAbsolute) +} + +// SetMinimumForceCommitDelay is a paid mutator transaction binding the contract method 0x9bf43028. +// +// Solidity: function setMinimumForceCommitDelay(uint256 _minimumForceCommitDelay) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactor) SetMinimumForceCommitDelay(opts *bind.TransactOpts, _minimumForceCommitDelay *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.contract.Transact(opts, "setMinimumForceCommitDelay", _minimumForceCommitDelay) +} + +// SetMinimumForceCommitDelay is a paid mutator transaction binding the contract method 0x9bf43028. +// +// Solidity: function setMinimumForceCommitDelay(uint256 _minimumForceCommitDelay) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) SetMinimumForceCommitDelay(_minimumForceCommitDelay *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.SetMinimumForceCommitDelay(&_HopL2OptimismBridge.TransactOpts, _minimumForceCommitDelay) +} + +// SetMinimumForceCommitDelay is a paid mutator transaction binding the contract method 0x9bf43028. +// +// Solidity: function setMinimumForceCommitDelay(uint256 _minimumForceCommitDelay) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorSession) SetMinimumForceCommitDelay(_minimumForceCommitDelay *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.SetMinimumForceCommitDelay(&_HopL2OptimismBridge.TransactOpts, _minimumForceCommitDelay) +} + +// SetTransferRoot is a paid mutator transaction binding the contract method 0xfd31c5ba. +// +// Solidity: function setTransferRoot(bytes32 rootHash, uint256 totalAmount) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactor) SetTransferRoot(opts *bind.TransactOpts, rootHash [32]byte, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.contract.Transact(opts, "setTransferRoot", rootHash, totalAmount) +} + +// SetTransferRoot is a paid mutator transaction binding the contract method 0xfd31c5ba. +// +// Solidity: function setTransferRoot(bytes32 rootHash, uint256 totalAmount) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) SetTransferRoot(rootHash [32]byte, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.SetTransferRoot(&_HopL2OptimismBridge.TransactOpts, rootHash, totalAmount) +} + +// SetTransferRoot is a paid mutator transaction binding the contract method 0xfd31c5ba. +// +// Solidity: function setTransferRoot(bytes32 rootHash, uint256 totalAmount) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorSession) SetTransferRoot(rootHash [32]byte, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.SetTransferRoot(&_HopL2OptimismBridge.TransactOpts, rootHash, totalAmount) +} + +// SettleBondedWithdrawal is a paid mutator transaction binding the contract method 0xc7525dd3. +// +// Solidity: function settleBondedWithdrawal(address bonder, bytes32 transferId, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactor) SettleBondedWithdrawal(opts *bind.TransactOpts, bonder common.Address, transferId [32]byte, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.contract.Transact(opts, "settleBondedWithdrawal", bonder, transferId, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +} + +// SettleBondedWithdrawal is a paid mutator transaction binding the contract method 0xc7525dd3. +// +// Solidity: function settleBondedWithdrawal(address bonder, bytes32 transferId, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) SettleBondedWithdrawal(bonder common.Address, transferId [32]byte, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.SettleBondedWithdrawal(&_HopL2OptimismBridge.TransactOpts, bonder, transferId, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +} + +// SettleBondedWithdrawal is a paid mutator transaction binding the contract method 0xc7525dd3. +// +// Solidity: function settleBondedWithdrawal(address bonder, bytes32 transferId, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorSession) SettleBondedWithdrawal(bonder common.Address, transferId [32]byte, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.SettleBondedWithdrawal(&_HopL2OptimismBridge.TransactOpts, bonder, transferId, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +} + +// SettleBondedWithdrawals is a paid mutator transaction binding the contract method 0xb162717e. +// +// Solidity: function settleBondedWithdrawals(address bonder, bytes32[] transferIds, uint256 totalAmount) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactor) SettleBondedWithdrawals(opts *bind.TransactOpts, bonder common.Address, transferIds [][32]byte, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.contract.Transact(opts, "settleBondedWithdrawals", bonder, transferIds, totalAmount) +} + +// SettleBondedWithdrawals is a paid mutator transaction binding the contract method 0xb162717e. +// +// Solidity: function settleBondedWithdrawals(address bonder, bytes32[] transferIds, uint256 totalAmount) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) SettleBondedWithdrawals(bonder common.Address, transferIds [][32]byte, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.SettleBondedWithdrawals(&_HopL2OptimismBridge.TransactOpts, bonder, transferIds, totalAmount) +} + +// SettleBondedWithdrawals is a paid mutator transaction binding the contract method 0xb162717e. +// +// Solidity: function settleBondedWithdrawals(address bonder, bytes32[] transferIds, uint256 totalAmount) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorSession) SettleBondedWithdrawals(bonder common.Address, transferIds [][32]byte, totalAmount *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.SettleBondedWithdrawals(&_HopL2OptimismBridge.TransactOpts, bonder, transferIds, totalAmount) +} + +// Stake is a paid mutator transaction binding the contract method 0xadc9772e. +// +// Solidity: function stake(address bonder, uint256 amount) payable returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactor) Stake(opts *bind.TransactOpts, bonder common.Address, amount *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.contract.Transact(opts, "stake", bonder, amount) +} + +// Stake is a paid mutator transaction binding the contract method 0xadc9772e. +// +// Solidity: function stake(address bonder, uint256 amount) payable returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) Stake(bonder common.Address, amount *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.Stake(&_HopL2OptimismBridge.TransactOpts, bonder, amount) +} + +// Stake is a paid mutator transaction binding the contract method 0xadc9772e. +// +// Solidity: function stake(address bonder, uint256 amount) payable returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorSession) Stake(bonder common.Address, amount *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.Stake(&_HopL2OptimismBridge.TransactOpts, bonder, amount) +} + +// Unstake is a paid mutator transaction binding the contract method 0x2e17de78. +// +// Solidity: function unstake(uint256 amount) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactor) Unstake(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.contract.Transact(opts, "unstake", amount) +} + +// Unstake is a paid mutator transaction binding the contract method 0x2e17de78. +// +// Solidity: function unstake(uint256 amount) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) Unstake(amount *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.Unstake(&_HopL2OptimismBridge.TransactOpts, amount) +} + +// Unstake is a paid mutator transaction binding the contract method 0x2e17de78. +// +// Solidity: function unstake(uint256 amount) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorSession) Unstake(amount *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.Unstake(&_HopL2OptimismBridge.TransactOpts, amount) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x0f7aadb7. +// +// Solidity: function withdraw(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactor) Withdraw(opts *bind.TransactOpts, recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.contract.Transact(opts, "withdraw", recipient, amount, transferNonce, bonderFee, amountOutMin, deadline, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x0f7aadb7. +// +// Solidity: function withdraw(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeSession) Withdraw(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.Withdraw(&_HopL2OptimismBridge.TransactOpts, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x0f7aadb7. +// +// Solidity: function withdraw(address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] siblings, uint256 totalLeaves) returns() +func (_HopL2OptimismBridge *HopL2OptimismBridgeTransactorSession) Withdraw(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) { + return _HopL2OptimismBridge.Contract.Withdraw(&_HopL2OptimismBridge.TransactOpts, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline, rootHash, transferRootTotalAmount, transferIdTreeIndex, siblings, totalLeaves) +} + +// HopL2OptimismBridgeBonderAddedIterator is returned from FilterBonderAdded and is used to iterate over the raw logs and unpacked data for BonderAdded events raised by the HopL2OptimismBridge contract. +type HopL2OptimismBridgeBonderAddedIterator struct { + Event *HopL2OptimismBridgeBonderAdded // 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 *HopL2OptimismBridgeBonderAddedIterator) 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(HopL2OptimismBridgeBonderAdded) + 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(HopL2OptimismBridgeBonderAdded) + 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 *HopL2OptimismBridgeBonderAddedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL2OptimismBridgeBonderAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL2OptimismBridgeBonderAdded represents a BonderAdded event raised by the HopL2OptimismBridge contract. +type HopL2OptimismBridgeBonderAdded struct { + NewBonder common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBonderAdded is a free log retrieval operation binding the contract event 0x2cec73b7434d3b91198ad1a618f63e6a0761ce281af5ec9ec76606d948d03e23. +// +// Solidity: event BonderAdded(address indexed newBonder) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) FilterBonderAdded(opts *bind.FilterOpts, newBonder []common.Address) (*HopL2OptimismBridgeBonderAddedIterator, error) { + + var newBonderRule []interface{} + for _, newBonderItem := range newBonder { + newBonderRule = append(newBonderRule, newBonderItem) + } + + logs, sub, err := _HopL2OptimismBridge.contract.FilterLogs(opts, "BonderAdded", newBonderRule) + if err != nil { + return nil, err + } + return &HopL2OptimismBridgeBonderAddedIterator{contract: _HopL2OptimismBridge.contract, event: "BonderAdded", logs: logs, sub: sub}, nil +} + +// WatchBonderAdded is a free log subscription operation binding the contract event 0x2cec73b7434d3b91198ad1a618f63e6a0761ce281af5ec9ec76606d948d03e23. +// +// Solidity: event BonderAdded(address indexed newBonder) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) WatchBonderAdded(opts *bind.WatchOpts, sink chan<- *HopL2OptimismBridgeBonderAdded, newBonder []common.Address) (event.Subscription, error) { + + var newBonderRule []interface{} + for _, newBonderItem := range newBonder { + newBonderRule = append(newBonderRule, newBonderItem) + } + + logs, sub, err := _HopL2OptimismBridge.contract.WatchLogs(opts, "BonderAdded", newBonderRule) + 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(HopL2OptimismBridgeBonderAdded) + if err := _HopL2OptimismBridge.contract.UnpackLog(event, "BonderAdded", 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 +} + +// ParseBonderAdded is a log parse operation binding the contract event 0x2cec73b7434d3b91198ad1a618f63e6a0761ce281af5ec9ec76606d948d03e23. +// +// Solidity: event BonderAdded(address indexed newBonder) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) ParseBonderAdded(log types.Log) (*HopL2OptimismBridgeBonderAdded, error) { + event := new(HopL2OptimismBridgeBonderAdded) + if err := _HopL2OptimismBridge.contract.UnpackLog(event, "BonderAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL2OptimismBridgeBonderRemovedIterator is returned from FilterBonderRemoved and is used to iterate over the raw logs and unpacked data for BonderRemoved events raised by the HopL2OptimismBridge contract. +type HopL2OptimismBridgeBonderRemovedIterator struct { + Event *HopL2OptimismBridgeBonderRemoved // 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 *HopL2OptimismBridgeBonderRemovedIterator) 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(HopL2OptimismBridgeBonderRemoved) + 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(HopL2OptimismBridgeBonderRemoved) + 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 *HopL2OptimismBridgeBonderRemovedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL2OptimismBridgeBonderRemovedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL2OptimismBridgeBonderRemoved represents a BonderRemoved event raised by the HopL2OptimismBridge contract. +type HopL2OptimismBridgeBonderRemoved struct { + PreviousBonder common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBonderRemoved is a free log retrieval operation binding the contract event 0x4234ba611d325b3ba434c4e1b037967b955b1274d4185ee9847b7491111a48ff. +// +// Solidity: event BonderRemoved(address indexed previousBonder) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) FilterBonderRemoved(opts *bind.FilterOpts, previousBonder []common.Address) (*HopL2OptimismBridgeBonderRemovedIterator, error) { + + var previousBonderRule []interface{} + for _, previousBonderItem := range previousBonder { + previousBonderRule = append(previousBonderRule, previousBonderItem) + } + + logs, sub, err := _HopL2OptimismBridge.contract.FilterLogs(opts, "BonderRemoved", previousBonderRule) + if err != nil { + return nil, err + } + return &HopL2OptimismBridgeBonderRemovedIterator{contract: _HopL2OptimismBridge.contract, event: "BonderRemoved", logs: logs, sub: sub}, nil +} + +// WatchBonderRemoved is a free log subscription operation binding the contract event 0x4234ba611d325b3ba434c4e1b037967b955b1274d4185ee9847b7491111a48ff. +// +// Solidity: event BonderRemoved(address indexed previousBonder) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) WatchBonderRemoved(opts *bind.WatchOpts, sink chan<- *HopL2OptimismBridgeBonderRemoved, previousBonder []common.Address) (event.Subscription, error) { + + var previousBonderRule []interface{} + for _, previousBonderItem := range previousBonder { + previousBonderRule = append(previousBonderRule, previousBonderItem) + } + + logs, sub, err := _HopL2OptimismBridge.contract.WatchLogs(opts, "BonderRemoved", previousBonderRule) + 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(HopL2OptimismBridgeBonderRemoved) + if err := _HopL2OptimismBridge.contract.UnpackLog(event, "BonderRemoved", 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 +} + +// ParseBonderRemoved is a log parse operation binding the contract event 0x4234ba611d325b3ba434c4e1b037967b955b1274d4185ee9847b7491111a48ff. +// +// Solidity: event BonderRemoved(address indexed previousBonder) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) ParseBonderRemoved(log types.Log) (*HopL2OptimismBridgeBonderRemoved, error) { + event := new(HopL2OptimismBridgeBonderRemoved) + if err := _HopL2OptimismBridge.contract.UnpackLog(event, "BonderRemoved", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL2OptimismBridgeMultipleWithdrawalsSettledIterator is returned from FilterMultipleWithdrawalsSettled and is used to iterate over the raw logs and unpacked data for MultipleWithdrawalsSettled events raised by the HopL2OptimismBridge contract. +type HopL2OptimismBridgeMultipleWithdrawalsSettledIterator struct { + Event *HopL2OptimismBridgeMultipleWithdrawalsSettled // 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 *HopL2OptimismBridgeMultipleWithdrawalsSettledIterator) 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(HopL2OptimismBridgeMultipleWithdrawalsSettled) + 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(HopL2OptimismBridgeMultipleWithdrawalsSettled) + 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 *HopL2OptimismBridgeMultipleWithdrawalsSettledIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL2OptimismBridgeMultipleWithdrawalsSettledIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL2OptimismBridgeMultipleWithdrawalsSettled represents a MultipleWithdrawalsSettled event raised by the HopL2OptimismBridge contract. +type HopL2OptimismBridgeMultipleWithdrawalsSettled struct { + Bonder common.Address + RootHash [32]byte + TotalBondsSettled *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMultipleWithdrawalsSettled is a free log retrieval operation binding the contract event 0x78e830d08be9d5f957414c84d685c061ecbd8467be98b42ebb64f0118b57d2ff. +// +// Solidity: event MultipleWithdrawalsSettled(address indexed bonder, bytes32 indexed rootHash, uint256 totalBondsSettled) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) FilterMultipleWithdrawalsSettled(opts *bind.FilterOpts, bonder []common.Address, rootHash [][32]byte) (*HopL2OptimismBridgeMultipleWithdrawalsSettledIterator, error) { + + var bonderRule []interface{} + for _, bonderItem := range bonder { + bonderRule = append(bonderRule, bonderItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL2OptimismBridge.contract.FilterLogs(opts, "MultipleWithdrawalsSettled", bonderRule, rootHashRule) + if err != nil { + return nil, err + } + return &HopL2OptimismBridgeMultipleWithdrawalsSettledIterator{contract: _HopL2OptimismBridge.contract, event: "MultipleWithdrawalsSettled", logs: logs, sub: sub}, nil +} + +// WatchMultipleWithdrawalsSettled is a free log subscription operation binding the contract event 0x78e830d08be9d5f957414c84d685c061ecbd8467be98b42ebb64f0118b57d2ff. +// +// Solidity: event MultipleWithdrawalsSettled(address indexed bonder, bytes32 indexed rootHash, uint256 totalBondsSettled) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) WatchMultipleWithdrawalsSettled(opts *bind.WatchOpts, sink chan<- *HopL2OptimismBridgeMultipleWithdrawalsSettled, bonder []common.Address, rootHash [][32]byte) (event.Subscription, error) { + + var bonderRule []interface{} + for _, bonderItem := range bonder { + bonderRule = append(bonderRule, bonderItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL2OptimismBridge.contract.WatchLogs(opts, "MultipleWithdrawalsSettled", bonderRule, rootHashRule) + 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(HopL2OptimismBridgeMultipleWithdrawalsSettled) + if err := _HopL2OptimismBridge.contract.UnpackLog(event, "MultipleWithdrawalsSettled", 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 +} + +// ParseMultipleWithdrawalsSettled is a log parse operation binding the contract event 0x78e830d08be9d5f957414c84d685c061ecbd8467be98b42ebb64f0118b57d2ff. +// +// Solidity: event MultipleWithdrawalsSettled(address indexed bonder, bytes32 indexed rootHash, uint256 totalBondsSettled) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) ParseMultipleWithdrawalsSettled(log types.Log) (*HopL2OptimismBridgeMultipleWithdrawalsSettled, error) { + event := new(HopL2OptimismBridgeMultipleWithdrawalsSettled) + if err := _HopL2OptimismBridge.contract.UnpackLog(event, "MultipleWithdrawalsSettled", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL2OptimismBridgeStakeIterator is returned from FilterStake and is used to iterate over the raw logs and unpacked data for Stake events raised by the HopL2OptimismBridge contract. +type HopL2OptimismBridgeStakeIterator struct { + Event *HopL2OptimismBridgeStake // 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 *HopL2OptimismBridgeStakeIterator) 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(HopL2OptimismBridgeStake) + 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(HopL2OptimismBridgeStake) + 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 *HopL2OptimismBridgeStakeIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL2OptimismBridgeStakeIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL2OptimismBridgeStake represents a Stake event raised by the HopL2OptimismBridge contract. +type HopL2OptimismBridgeStake struct { + Account common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterStake is a free log retrieval operation binding the contract event 0xebedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a. +// +// Solidity: event Stake(address indexed account, uint256 amount) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) FilterStake(opts *bind.FilterOpts, account []common.Address) (*HopL2OptimismBridgeStakeIterator, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _HopL2OptimismBridge.contract.FilterLogs(opts, "Stake", accountRule) + if err != nil { + return nil, err + } + return &HopL2OptimismBridgeStakeIterator{contract: _HopL2OptimismBridge.contract, event: "Stake", logs: logs, sub: sub}, nil +} + +// WatchStake is a free log subscription operation binding the contract event 0xebedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a. +// +// Solidity: event Stake(address indexed account, uint256 amount) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) WatchStake(opts *bind.WatchOpts, sink chan<- *HopL2OptimismBridgeStake, account []common.Address) (event.Subscription, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _HopL2OptimismBridge.contract.WatchLogs(opts, "Stake", accountRule) + 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(HopL2OptimismBridgeStake) + if err := _HopL2OptimismBridge.contract.UnpackLog(event, "Stake", 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 +} + +// ParseStake is a log parse operation binding the contract event 0xebedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a. +// +// Solidity: event Stake(address indexed account, uint256 amount) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) ParseStake(log types.Log) (*HopL2OptimismBridgeStake, error) { + event := new(HopL2OptimismBridgeStake) + if err := _HopL2OptimismBridge.contract.UnpackLog(event, "Stake", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL2OptimismBridgeTransferFromL1CompletedIterator is returned from FilterTransferFromL1Completed and is used to iterate over the raw logs and unpacked data for TransferFromL1Completed events raised by the HopL2OptimismBridge contract. +type HopL2OptimismBridgeTransferFromL1CompletedIterator struct { + Event *HopL2OptimismBridgeTransferFromL1Completed // 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 *HopL2OptimismBridgeTransferFromL1CompletedIterator) 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(HopL2OptimismBridgeTransferFromL1Completed) + 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(HopL2OptimismBridgeTransferFromL1Completed) + 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 *HopL2OptimismBridgeTransferFromL1CompletedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL2OptimismBridgeTransferFromL1CompletedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL2OptimismBridgeTransferFromL1Completed represents a TransferFromL1Completed event raised by the HopL2OptimismBridge contract. +type HopL2OptimismBridgeTransferFromL1Completed struct { + Recipient common.Address + Amount *big.Int + AmountOutMin *big.Int + Deadline *big.Int + Relayer common.Address + RelayerFee *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransferFromL1Completed is a free log retrieval operation binding the contract event 0x320958176930804eb66c2343c7343fc0367dc16249590c0f195783bee199d094. +// +// Solidity: event TransferFromL1Completed(address indexed recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address indexed relayer, uint256 relayerFee) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) FilterTransferFromL1Completed(opts *bind.FilterOpts, recipient []common.Address, relayer []common.Address) (*HopL2OptimismBridgeTransferFromL1CompletedIterator, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + var relayerRule []interface{} + for _, relayerItem := range relayer { + relayerRule = append(relayerRule, relayerItem) + } + + logs, sub, err := _HopL2OptimismBridge.contract.FilterLogs(opts, "TransferFromL1Completed", recipientRule, relayerRule) + if err != nil { + return nil, err + } + return &HopL2OptimismBridgeTransferFromL1CompletedIterator{contract: _HopL2OptimismBridge.contract, event: "TransferFromL1Completed", logs: logs, sub: sub}, nil +} + +// WatchTransferFromL1Completed is a free log subscription operation binding the contract event 0x320958176930804eb66c2343c7343fc0367dc16249590c0f195783bee199d094. +// +// Solidity: event TransferFromL1Completed(address indexed recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address indexed relayer, uint256 relayerFee) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) WatchTransferFromL1Completed(opts *bind.WatchOpts, sink chan<- *HopL2OptimismBridgeTransferFromL1Completed, recipient []common.Address, relayer []common.Address) (event.Subscription, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + var relayerRule []interface{} + for _, relayerItem := range relayer { + relayerRule = append(relayerRule, relayerItem) + } + + logs, sub, err := _HopL2OptimismBridge.contract.WatchLogs(opts, "TransferFromL1Completed", recipientRule, relayerRule) + 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(HopL2OptimismBridgeTransferFromL1Completed) + if err := _HopL2OptimismBridge.contract.UnpackLog(event, "TransferFromL1Completed", 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 +} + +// ParseTransferFromL1Completed is a log parse operation binding the contract event 0x320958176930804eb66c2343c7343fc0367dc16249590c0f195783bee199d094. +// +// Solidity: event TransferFromL1Completed(address indexed recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address indexed relayer, uint256 relayerFee) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) ParseTransferFromL1Completed(log types.Log) (*HopL2OptimismBridgeTransferFromL1Completed, error) { + event := new(HopL2OptimismBridgeTransferFromL1Completed) + if err := _HopL2OptimismBridge.contract.UnpackLog(event, "TransferFromL1Completed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL2OptimismBridgeTransferRootSetIterator is returned from FilterTransferRootSet and is used to iterate over the raw logs and unpacked data for TransferRootSet events raised by the HopL2OptimismBridge contract. +type HopL2OptimismBridgeTransferRootSetIterator struct { + Event *HopL2OptimismBridgeTransferRootSet // 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 *HopL2OptimismBridgeTransferRootSetIterator) 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(HopL2OptimismBridgeTransferRootSet) + 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(HopL2OptimismBridgeTransferRootSet) + 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 *HopL2OptimismBridgeTransferRootSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL2OptimismBridgeTransferRootSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL2OptimismBridgeTransferRootSet represents a TransferRootSet event raised by the HopL2OptimismBridge contract. +type HopL2OptimismBridgeTransferRootSet struct { + RootHash [32]byte + TotalAmount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransferRootSet is a free log retrieval operation binding the contract event 0xb33d2162aead99dab59e77a7a67ea025b776bf8ca8079e132afdf9b23e03bd42. +// +// Solidity: event TransferRootSet(bytes32 indexed rootHash, uint256 totalAmount) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) FilterTransferRootSet(opts *bind.FilterOpts, rootHash [][32]byte) (*HopL2OptimismBridgeTransferRootSetIterator, error) { + + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL2OptimismBridge.contract.FilterLogs(opts, "TransferRootSet", rootHashRule) + if err != nil { + return nil, err + } + return &HopL2OptimismBridgeTransferRootSetIterator{contract: _HopL2OptimismBridge.contract, event: "TransferRootSet", logs: logs, sub: sub}, nil +} + +// WatchTransferRootSet is a free log subscription operation binding the contract event 0xb33d2162aead99dab59e77a7a67ea025b776bf8ca8079e132afdf9b23e03bd42. +// +// Solidity: event TransferRootSet(bytes32 indexed rootHash, uint256 totalAmount) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) WatchTransferRootSet(opts *bind.WatchOpts, sink chan<- *HopL2OptimismBridgeTransferRootSet, rootHash [][32]byte) (event.Subscription, error) { + + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL2OptimismBridge.contract.WatchLogs(opts, "TransferRootSet", rootHashRule) + 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(HopL2OptimismBridgeTransferRootSet) + if err := _HopL2OptimismBridge.contract.UnpackLog(event, "TransferRootSet", 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 +} + +// ParseTransferRootSet is a log parse operation binding the contract event 0xb33d2162aead99dab59e77a7a67ea025b776bf8ca8079e132afdf9b23e03bd42. +// +// Solidity: event TransferRootSet(bytes32 indexed rootHash, uint256 totalAmount) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) ParseTransferRootSet(log types.Log) (*HopL2OptimismBridgeTransferRootSet, error) { + event := new(HopL2OptimismBridgeTransferRootSet) + if err := _HopL2OptimismBridge.contract.UnpackLog(event, "TransferRootSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL2OptimismBridgeTransferSentIterator is returned from FilterTransferSent and is used to iterate over the raw logs and unpacked data for TransferSent events raised by the HopL2OptimismBridge contract. +type HopL2OptimismBridgeTransferSentIterator struct { + Event *HopL2OptimismBridgeTransferSent // 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 *HopL2OptimismBridgeTransferSentIterator) 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(HopL2OptimismBridgeTransferSent) + 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(HopL2OptimismBridgeTransferSent) + 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 *HopL2OptimismBridgeTransferSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL2OptimismBridgeTransferSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL2OptimismBridgeTransferSent represents a TransferSent event raised by the HopL2OptimismBridge contract. +type HopL2OptimismBridgeTransferSent struct { + TransferId [32]byte + ChainId *big.Int + Recipient common.Address + Amount *big.Int + TransferNonce [32]byte + BonderFee *big.Int + Index *big.Int + AmountOutMin *big.Int + Deadline *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransferSent is a free log retrieval operation binding the contract event 0xe35dddd4ea75d7e9b3fe93af4f4e40e778c3da4074c9d93e7c6536f1e803c1eb. +// +// Solidity: event TransferSent(bytes32 indexed transferId, uint256 indexed chainId, address indexed recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 index, uint256 amountOutMin, uint256 deadline) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) FilterTransferSent(opts *bind.FilterOpts, transferId [][32]byte, chainId []*big.Int, recipient []common.Address) (*HopL2OptimismBridgeTransferSentIterator, error) { + + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + var chainIdRule []interface{} + for _, chainIdItem := range chainId { + chainIdRule = append(chainIdRule, chainIdItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _HopL2OptimismBridge.contract.FilterLogs(opts, "TransferSent", transferIdRule, chainIdRule, recipientRule) + if err != nil { + return nil, err + } + return &HopL2OptimismBridgeTransferSentIterator{contract: _HopL2OptimismBridge.contract, event: "TransferSent", logs: logs, sub: sub}, nil +} + +// WatchTransferSent is a free log subscription operation binding the contract event 0xe35dddd4ea75d7e9b3fe93af4f4e40e778c3da4074c9d93e7c6536f1e803c1eb. +// +// Solidity: event TransferSent(bytes32 indexed transferId, uint256 indexed chainId, address indexed recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 index, uint256 amountOutMin, uint256 deadline) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) WatchTransferSent(opts *bind.WatchOpts, sink chan<- *HopL2OptimismBridgeTransferSent, transferId [][32]byte, chainId []*big.Int, recipient []common.Address) (event.Subscription, error) { + + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + var chainIdRule []interface{} + for _, chainIdItem := range chainId { + chainIdRule = append(chainIdRule, chainIdItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _HopL2OptimismBridge.contract.WatchLogs(opts, "TransferSent", transferIdRule, chainIdRule, recipientRule) + 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(HopL2OptimismBridgeTransferSent) + if err := _HopL2OptimismBridge.contract.UnpackLog(event, "TransferSent", 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 +} + +// ParseTransferSent is a log parse operation binding the contract event 0xe35dddd4ea75d7e9b3fe93af4f4e40e778c3da4074c9d93e7c6536f1e803c1eb. +// +// Solidity: event TransferSent(bytes32 indexed transferId, uint256 indexed chainId, address indexed recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 index, uint256 amountOutMin, uint256 deadline) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) ParseTransferSent(log types.Log) (*HopL2OptimismBridgeTransferSent, error) { + event := new(HopL2OptimismBridgeTransferSent) + if err := _HopL2OptimismBridge.contract.UnpackLog(event, "TransferSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL2OptimismBridgeTransfersCommittedIterator is returned from FilterTransfersCommitted and is used to iterate over the raw logs and unpacked data for TransfersCommitted events raised by the HopL2OptimismBridge contract. +type HopL2OptimismBridgeTransfersCommittedIterator struct { + Event *HopL2OptimismBridgeTransfersCommitted // 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 *HopL2OptimismBridgeTransfersCommittedIterator) 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(HopL2OptimismBridgeTransfersCommitted) + 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(HopL2OptimismBridgeTransfersCommitted) + 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 *HopL2OptimismBridgeTransfersCommittedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL2OptimismBridgeTransfersCommittedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL2OptimismBridgeTransfersCommitted represents a TransfersCommitted event raised by the HopL2OptimismBridge contract. +type HopL2OptimismBridgeTransfersCommitted struct { + DestinationChainId *big.Int + RootHash [32]byte + TotalAmount *big.Int + RootCommittedAt *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfersCommitted is a free log retrieval operation binding the contract event 0xf52ad20d3b4f50d1c40901dfb95a9ce5270b2fc32694e5c668354721cd87aa74. +// +// Solidity: event TransfersCommitted(uint256 indexed destinationChainId, bytes32 indexed rootHash, uint256 totalAmount, uint256 rootCommittedAt) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) FilterTransfersCommitted(opts *bind.FilterOpts, destinationChainId []*big.Int, rootHash [][32]byte) (*HopL2OptimismBridgeTransfersCommittedIterator, error) { + + var destinationChainIdRule []interface{} + for _, destinationChainIdItem := range destinationChainId { + destinationChainIdRule = append(destinationChainIdRule, destinationChainIdItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL2OptimismBridge.contract.FilterLogs(opts, "TransfersCommitted", destinationChainIdRule, rootHashRule) + if err != nil { + return nil, err + } + return &HopL2OptimismBridgeTransfersCommittedIterator{contract: _HopL2OptimismBridge.contract, event: "TransfersCommitted", logs: logs, sub: sub}, nil +} + +// WatchTransfersCommitted is a free log subscription operation binding the contract event 0xf52ad20d3b4f50d1c40901dfb95a9ce5270b2fc32694e5c668354721cd87aa74. +// +// Solidity: event TransfersCommitted(uint256 indexed destinationChainId, bytes32 indexed rootHash, uint256 totalAmount, uint256 rootCommittedAt) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) WatchTransfersCommitted(opts *bind.WatchOpts, sink chan<- *HopL2OptimismBridgeTransfersCommitted, destinationChainId []*big.Int, rootHash [][32]byte) (event.Subscription, error) { + + var destinationChainIdRule []interface{} + for _, destinationChainIdItem := range destinationChainId { + destinationChainIdRule = append(destinationChainIdRule, destinationChainIdItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL2OptimismBridge.contract.WatchLogs(opts, "TransfersCommitted", destinationChainIdRule, rootHashRule) + 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(HopL2OptimismBridgeTransfersCommitted) + if err := _HopL2OptimismBridge.contract.UnpackLog(event, "TransfersCommitted", 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 +} + +// ParseTransfersCommitted is a log parse operation binding the contract event 0xf52ad20d3b4f50d1c40901dfb95a9ce5270b2fc32694e5c668354721cd87aa74. +// +// Solidity: event TransfersCommitted(uint256 indexed destinationChainId, bytes32 indexed rootHash, uint256 totalAmount, uint256 rootCommittedAt) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) ParseTransfersCommitted(log types.Log) (*HopL2OptimismBridgeTransfersCommitted, error) { + event := new(HopL2OptimismBridgeTransfersCommitted) + if err := _HopL2OptimismBridge.contract.UnpackLog(event, "TransfersCommitted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL2OptimismBridgeUnstakeIterator is returned from FilterUnstake and is used to iterate over the raw logs and unpacked data for Unstake events raised by the HopL2OptimismBridge contract. +type HopL2OptimismBridgeUnstakeIterator struct { + Event *HopL2OptimismBridgeUnstake // 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 *HopL2OptimismBridgeUnstakeIterator) 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(HopL2OptimismBridgeUnstake) + 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(HopL2OptimismBridgeUnstake) + 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 *HopL2OptimismBridgeUnstakeIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL2OptimismBridgeUnstakeIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL2OptimismBridgeUnstake represents a Unstake event raised by the HopL2OptimismBridge contract. +type HopL2OptimismBridgeUnstake struct { + Account common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnstake is a free log retrieval operation binding the contract event 0x85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd. +// +// Solidity: event Unstake(address indexed account, uint256 amount) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) FilterUnstake(opts *bind.FilterOpts, account []common.Address) (*HopL2OptimismBridgeUnstakeIterator, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _HopL2OptimismBridge.contract.FilterLogs(opts, "Unstake", accountRule) + if err != nil { + return nil, err + } + return &HopL2OptimismBridgeUnstakeIterator{contract: _HopL2OptimismBridge.contract, event: "Unstake", logs: logs, sub: sub}, nil +} + +// WatchUnstake is a free log subscription operation binding the contract event 0x85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd. +// +// Solidity: event Unstake(address indexed account, uint256 amount) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) WatchUnstake(opts *bind.WatchOpts, sink chan<- *HopL2OptimismBridgeUnstake, account []common.Address) (event.Subscription, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _HopL2OptimismBridge.contract.WatchLogs(opts, "Unstake", accountRule) + 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(HopL2OptimismBridgeUnstake) + if err := _HopL2OptimismBridge.contract.UnpackLog(event, "Unstake", 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 +} + +// ParseUnstake is a log parse operation binding the contract event 0x85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd. +// +// Solidity: event Unstake(address indexed account, uint256 amount) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) ParseUnstake(log types.Log) (*HopL2OptimismBridgeUnstake, error) { + event := new(HopL2OptimismBridgeUnstake) + if err := _HopL2OptimismBridge.contract.UnpackLog(event, "Unstake", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL2OptimismBridgeWithdrawalBondSettledIterator is returned from FilterWithdrawalBondSettled and is used to iterate over the raw logs and unpacked data for WithdrawalBondSettled events raised by the HopL2OptimismBridge contract. +type HopL2OptimismBridgeWithdrawalBondSettledIterator struct { + Event *HopL2OptimismBridgeWithdrawalBondSettled // 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 *HopL2OptimismBridgeWithdrawalBondSettledIterator) 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(HopL2OptimismBridgeWithdrawalBondSettled) + 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(HopL2OptimismBridgeWithdrawalBondSettled) + 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 *HopL2OptimismBridgeWithdrawalBondSettledIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL2OptimismBridgeWithdrawalBondSettledIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL2OptimismBridgeWithdrawalBondSettled represents a WithdrawalBondSettled event raised by the HopL2OptimismBridge contract. +type HopL2OptimismBridgeWithdrawalBondSettled struct { + Bonder common.Address + TransferId [32]byte + RootHash [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawalBondSettled is a free log retrieval operation binding the contract event 0x84eb21b24c31b27a3bc67dde4a598aad06db6e9415cd66544492b9616996143c. +// +// Solidity: event WithdrawalBondSettled(address indexed bonder, bytes32 indexed transferId, bytes32 indexed rootHash) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) FilterWithdrawalBondSettled(opts *bind.FilterOpts, bonder []common.Address, transferId [][32]byte, rootHash [][32]byte) (*HopL2OptimismBridgeWithdrawalBondSettledIterator, error) { + + var bonderRule []interface{} + for _, bonderItem := range bonder { + bonderRule = append(bonderRule, bonderItem) + } + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL2OptimismBridge.contract.FilterLogs(opts, "WithdrawalBondSettled", bonderRule, transferIdRule, rootHashRule) + if err != nil { + return nil, err + } + return &HopL2OptimismBridgeWithdrawalBondSettledIterator{contract: _HopL2OptimismBridge.contract, event: "WithdrawalBondSettled", logs: logs, sub: sub}, nil +} + +// WatchWithdrawalBondSettled is a free log subscription operation binding the contract event 0x84eb21b24c31b27a3bc67dde4a598aad06db6e9415cd66544492b9616996143c. +// +// Solidity: event WithdrawalBondSettled(address indexed bonder, bytes32 indexed transferId, bytes32 indexed rootHash) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) WatchWithdrawalBondSettled(opts *bind.WatchOpts, sink chan<- *HopL2OptimismBridgeWithdrawalBondSettled, bonder []common.Address, transferId [][32]byte, rootHash [][32]byte) (event.Subscription, error) { + + var bonderRule []interface{} + for _, bonderItem := range bonder { + bonderRule = append(bonderRule, bonderItem) + } + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + var rootHashRule []interface{} + for _, rootHashItem := range rootHash { + rootHashRule = append(rootHashRule, rootHashItem) + } + + logs, sub, err := _HopL2OptimismBridge.contract.WatchLogs(opts, "WithdrawalBondSettled", bonderRule, transferIdRule, rootHashRule) + 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(HopL2OptimismBridgeWithdrawalBondSettled) + if err := _HopL2OptimismBridge.contract.UnpackLog(event, "WithdrawalBondSettled", 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 +} + +// ParseWithdrawalBondSettled is a log parse operation binding the contract event 0x84eb21b24c31b27a3bc67dde4a598aad06db6e9415cd66544492b9616996143c. +// +// Solidity: event WithdrawalBondSettled(address indexed bonder, bytes32 indexed transferId, bytes32 indexed rootHash) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) ParseWithdrawalBondSettled(log types.Log) (*HopL2OptimismBridgeWithdrawalBondSettled, error) { + event := new(HopL2OptimismBridgeWithdrawalBondSettled) + if err := _HopL2OptimismBridge.contract.UnpackLog(event, "WithdrawalBondSettled", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL2OptimismBridgeWithdrawalBondedIterator is returned from FilterWithdrawalBonded and is used to iterate over the raw logs and unpacked data for WithdrawalBonded events raised by the HopL2OptimismBridge contract. +type HopL2OptimismBridgeWithdrawalBondedIterator struct { + Event *HopL2OptimismBridgeWithdrawalBonded // 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 *HopL2OptimismBridgeWithdrawalBondedIterator) 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(HopL2OptimismBridgeWithdrawalBonded) + 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(HopL2OptimismBridgeWithdrawalBonded) + 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 *HopL2OptimismBridgeWithdrawalBondedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL2OptimismBridgeWithdrawalBondedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL2OptimismBridgeWithdrawalBonded represents a WithdrawalBonded event raised by the HopL2OptimismBridge contract. +type HopL2OptimismBridgeWithdrawalBonded struct { + TransferId [32]byte + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawalBonded is a free log retrieval operation binding the contract event 0x0c3d250c7831051e78aa6a56679e590374c7c424415ffe4aa474491def2fe705. +// +// Solidity: event WithdrawalBonded(bytes32 indexed transferId, uint256 amount) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) FilterWithdrawalBonded(opts *bind.FilterOpts, transferId [][32]byte) (*HopL2OptimismBridgeWithdrawalBondedIterator, error) { + + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + + logs, sub, err := _HopL2OptimismBridge.contract.FilterLogs(opts, "WithdrawalBonded", transferIdRule) + if err != nil { + return nil, err + } + return &HopL2OptimismBridgeWithdrawalBondedIterator{contract: _HopL2OptimismBridge.contract, event: "WithdrawalBonded", logs: logs, sub: sub}, nil +} + +// WatchWithdrawalBonded is a free log subscription operation binding the contract event 0x0c3d250c7831051e78aa6a56679e590374c7c424415ffe4aa474491def2fe705. +// +// Solidity: event WithdrawalBonded(bytes32 indexed transferId, uint256 amount) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) WatchWithdrawalBonded(opts *bind.WatchOpts, sink chan<- *HopL2OptimismBridgeWithdrawalBonded, transferId [][32]byte) (event.Subscription, error) { + + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + + logs, sub, err := _HopL2OptimismBridge.contract.WatchLogs(opts, "WithdrawalBonded", transferIdRule) + 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(HopL2OptimismBridgeWithdrawalBonded) + if err := _HopL2OptimismBridge.contract.UnpackLog(event, "WithdrawalBonded", 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 +} + +// ParseWithdrawalBonded is a log parse operation binding the contract event 0x0c3d250c7831051e78aa6a56679e590374c7c424415ffe4aa474491def2fe705. +// +// Solidity: event WithdrawalBonded(bytes32 indexed transferId, uint256 amount) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) ParseWithdrawalBonded(log types.Log) (*HopL2OptimismBridgeWithdrawalBonded, error) { + event := new(HopL2OptimismBridgeWithdrawalBonded) + if err := _HopL2OptimismBridge.contract.UnpackLog(event, "WithdrawalBonded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// HopL2OptimismBridgeWithdrewIterator is returned from FilterWithdrew and is used to iterate over the raw logs and unpacked data for Withdrew events raised by the HopL2OptimismBridge contract. +type HopL2OptimismBridgeWithdrewIterator struct { + Event *HopL2OptimismBridgeWithdrew // 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 *HopL2OptimismBridgeWithdrewIterator) 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(HopL2OptimismBridgeWithdrew) + 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(HopL2OptimismBridgeWithdrew) + 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 *HopL2OptimismBridgeWithdrewIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HopL2OptimismBridgeWithdrewIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HopL2OptimismBridgeWithdrew represents a Withdrew event raised by the HopL2OptimismBridge contract. +type HopL2OptimismBridgeWithdrew struct { + TransferId [32]byte + Recipient common.Address + Amount *big.Int + TransferNonce [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrew is a free log retrieval operation binding the contract event 0x9475cdbde5fc71fe2ccd413c82878ee54d061b9f74f9e2e1a03ff1178821502c. +// +// Solidity: event Withdrew(bytes32 indexed transferId, address indexed recipient, uint256 amount, bytes32 transferNonce) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) FilterWithdrew(opts *bind.FilterOpts, transferId [][32]byte, recipient []common.Address) (*HopL2OptimismBridgeWithdrewIterator, error) { + + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _HopL2OptimismBridge.contract.FilterLogs(opts, "Withdrew", transferIdRule, recipientRule) + if err != nil { + return nil, err + } + return &HopL2OptimismBridgeWithdrewIterator{contract: _HopL2OptimismBridge.contract, event: "Withdrew", logs: logs, sub: sub}, nil +} + +// WatchWithdrew is a free log subscription operation binding the contract event 0x9475cdbde5fc71fe2ccd413c82878ee54d061b9f74f9e2e1a03ff1178821502c. +// +// Solidity: event Withdrew(bytes32 indexed transferId, address indexed recipient, uint256 amount, bytes32 transferNonce) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) WatchWithdrew(opts *bind.WatchOpts, sink chan<- *HopL2OptimismBridgeWithdrew, transferId [][32]byte, recipient []common.Address) (event.Subscription, error) { + + var transferIdRule []interface{} + for _, transferIdItem := range transferId { + transferIdRule = append(transferIdRule, transferIdItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _HopL2OptimismBridge.contract.WatchLogs(opts, "Withdrew", transferIdRule, recipientRule) + 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(HopL2OptimismBridgeWithdrew) + if err := _HopL2OptimismBridge.contract.UnpackLog(event, "Withdrew", 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 +} + +// ParseWithdrew is a log parse operation binding the contract event 0x9475cdbde5fc71fe2ccd413c82878ee54d061b9f74f9e2e1a03ff1178821502c. +// +// Solidity: event Withdrew(bytes32 indexed transferId, address indexed recipient, uint256 amount, bytes32 transferNonce) +func (_HopL2OptimismBridge *HopL2OptimismBridgeFilterer) ParseWithdrew(log types.Log) (*HopL2OptimismBridgeWithdrew, error) { + event := new(HopL2OptimismBridgeWithdrew) + if err := _HopL2OptimismBridge.contract.UnpackLog(event, "Withdrew", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/contracts/hop/l2SaddleSwap.abi b/contracts/hop/l2SaddleSwap.abi deleted file mode 100644 index 9418bcb34..000000000 --- a/contracts/hop/l2SaddleSwap.abi +++ /dev/null @@ -1 +0,0 @@ -[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"provider","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"tokenAmounts","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"fees","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"invariant","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lpTokenSupply","type":"uint256"}],"name":"AddLiquidity","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newAdminFee","type":"uint256"}],"name":"NewAdminFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newSwapFee","type":"uint256"}],"name":"NewSwapFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newWithdrawFee","type":"uint256"}],"name":"NewWithdrawFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldA","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newA","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"initialTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"futureTime","type":"uint256"}],"name":"RampA","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"provider","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"tokenAmounts","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"lpTokenSupply","type":"uint256"}],"name":"RemoveLiquidity","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"provider","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"tokenAmounts","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"fees","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"invariant","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lpTokenSupply","type":"uint256"}],"name":"RemoveLiquidityImbalance","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"provider","type":"address"},{"indexed":false,"internalType":"uint256","name":"lpTokenAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lpTokenSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"boughtId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokensBought","type":"uint256"}],"name":"RemoveLiquidityOne","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"currentA","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"StopRampA","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokensSold","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokensBought","type":"uint256"},{"indexed":false,"internalType":"uint128","name":"soldId","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"boughtId","type":"uint128"}],"name":"TokenSwap","type":"event"},{"inputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"uint256","name":"minToMint","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"addLiquidity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"calculateCurrentWithdrawFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"calculateRemoveLiquidity","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"internalType":"uint8","name":"tokenIndex","type":"uint8"}],"name":"calculateRemoveLiquidityOneToken","outputs":[{"internalType":"uint256","name":"availableTokenAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"tokenIndexFrom","type":"uint8"},{"internalType":"uint8","name":"tokenIndexTo","type":"uint8"},{"internalType":"uint256","name":"dx","type":"uint256"}],"name":"calculateSwap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bool","name":"deposit","type":"bool"}],"name":"calculateTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getA","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAPrecise","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getAdminBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getDepositTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"index","type":"uint8"}],"name":"getToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"index","type":"uint8"}],"name":"getTokenBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"getTokenIndex","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getVirtualPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20[]","name":"_pooledTokens","type":"address[]"},{"internalType":"uint8[]","name":"decimals","type":"uint8[]"},{"internalType":"string","name":"lpTokenName","type":"string"},{"internalType":"string","name":"lpTokenSymbol","type":"string"},{"internalType":"uint256","name":"_a","type":"uint256"},{"internalType":"uint256","name":"_fee","type":"uint256"},{"internalType":"uint256","name":"_adminFee","type":"uint256"},{"internalType":"uint256","name":"_withdrawFee","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256[]","name":"minAmounts","type":"uint256[]"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidity","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"uint256","name":"maxBurnAmount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidityImbalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"internalType":"uint8","name":"tokenIndex","type":"uint8"},{"internalType":"uint256","name":"minAmount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidityOneToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"tokenIndexFrom","type":"uint8"},{"internalType":"uint8","name":"tokenIndexTo","type":"uint8"},{"internalType":"uint256","name":"dx","type":"uint256"},{"internalType":"uint256","name":"minDy","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapStorage","outputs":[{"internalType":"uint256","name":"initialA","type":"uint256"},{"internalType":"uint256","name":"futureA","type":"uint256"},{"internalType":"uint256","name":"initialATime","type":"uint256"},{"internalType":"uint256","name":"futureATime","type":"uint256"},{"internalType":"uint256","name":"swapFee","type":"uint256"},{"internalType":"uint256","name":"adminFee","type":"uint256"},{"internalType":"uint256","name":"defaultWithdrawFee","type":"uint256"},{"internalType":"contract LPToken","name":"lpToken","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"transferAmount","type":"uint256"}],"name":"updateUserWithdrawFee","outputs":[],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/contracts/hop/swap/l2SaddleSwap.go b/contracts/hop/swap/l2SaddleSwap.go deleted file mode 100644 index 4cc6875ad..000000000 --- a/contracts/hop/swap/l2SaddleSwap.go +++ /dev/null @@ -1,2209 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package hopSwap - -import ( - "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 ( - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription -) - -// HopSwapABI is the input ABI used to generate the binding from. -const HopSwapABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenAmounts\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"fees\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"invariant\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lpTokenSupply\",\"type\":\"uint256\"}],\"name\":\"AddLiquidity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newAdminFee\",\"type\":\"uint256\"}],\"name\":\"NewAdminFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newSwapFee\",\"type\":\"uint256\"}],\"name\":\"NewSwapFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newWithdrawFee\",\"type\":\"uint256\"}],\"name\":\"NewWithdrawFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldA\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newA\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialTime\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"futureTime\",\"type\":\"uint256\"}],\"name\":\"RampA\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenAmounts\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lpTokenSupply\",\"type\":\"uint256\"}],\"name\":\"RemoveLiquidity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenAmounts\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"fees\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"invariant\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lpTokenSupply\",\"type\":\"uint256\"}],\"name\":\"RemoveLiquidityImbalance\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lpTokenAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lpTokenSupply\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"boughtId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokensBought\",\"type\":\"uint256\"}],\"name\":\"RemoveLiquidityOne\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"currentA\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"}],\"name\":\"StopRampA\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"buyer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokensSold\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokensBought\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"soldId\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"boughtId\",\"type\":\"uint128\"}],\"name\":\"TokenSwap\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"minToMint\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"addLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"calculateCurrentWithdrawFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"calculateRemoveLiquidity\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndex\",\"type\":\"uint8\"}],\"name\":\"calculateRemoveLiquidityOneToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"availableTokenAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"dx\",\"type\":\"uint256\"}],\"name\":\"calculateSwap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"deposit\",\"type\":\"bool\"}],\"name\":\"calculateTokenAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getA\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAPrecise\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getAdminBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getDepositTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"}],\"name\":\"getToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"}],\"name\":\"getTokenBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getTokenIndex\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVirtualPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIERC20[]\",\"name\":\"_pooledTokens\",\"type\":\"address[]\"},{\"internalType\":\"uint8[]\",\"name\":\"decimals\",\"type\":\"uint8[]\"},{\"internalType\":\"string\",\"name\":\"lpTokenName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"lpTokenSymbol\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_a\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_adminFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_withdrawFee\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmounts\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeLiquidity\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"maxBurnAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeLiquidityImbalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeLiquidityOneToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"dx\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"swapStorage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"initialA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"futureA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"initialATime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"futureATime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"adminFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"defaultWithdrawFee\",\"type\":\"uint256\"},{\"internalType\":\"contractLPToken\",\"name\":\"lpToken\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"transferAmount\",\"type\":\"uint256\"}],\"name\":\"updateUserWithdrawFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// HopSwap is an auto generated Go binding around an Ethereum contract. -type HopSwap struct { - HopSwapCaller // Read-only binding to the contract - HopSwapTransactor // Write-only binding to the contract - HopSwapFilterer // Log filterer for contract events -} - -// HopSwapCaller is an auto generated read-only Go binding around an Ethereum contract. -type HopSwapCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// HopSwapTransactor is an auto generated write-only Go binding around an Ethereum contract. -type HopSwapTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// HopSwapFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type HopSwapFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// HopSwapSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type HopSwapSession struct { - Contract *HopSwap // 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 -} - -// HopSwapCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type HopSwapCallerSession struct { - Contract *HopSwapCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// HopSwapTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type HopSwapTransactorSession struct { - Contract *HopSwapTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// HopSwapRaw is an auto generated low-level Go binding around an Ethereum contract. -type HopSwapRaw struct { - Contract *HopSwap // Generic contract binding to access the raw methods on -} - -// HopSwapCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type HopSwapCallerRaw struct { - Contract *HopSwapCaller // Generic read-only contract binding to access the raw methods on -} - -// HopSwapTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type HopSwapTransactorRaw struct { - Contract *HopSwapTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewHopSwap creates a new instance of HopSwap, bound to a specific deployed contract. -func NewHopSwap(address common.Address, backend bind.ContractBackend) (*HopSwap, error) { - contract, err := bindHopSwap(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &HopSwap{HopSwapCaller: HopSwapCaller{contract: contract}, HopSwapTransactor: HopSwapTransactor{contract: contract}, HopSwapFilterer: HopSwapFilterer{contract: contract}}, nil -} - -// NewHopSwapCaller creates a new read-only instance of HopSwap, bound to a specific deployed contract. -func NewHopSwapCaller(address common.Address, caller bind.ContractCaller) (*HopSwapCaller, error) { - contract, err := bindHopSwap(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &HopSwapCaller{contract: contract}, nil -} - -// NewHopSwapTransactor creates a new write-only instance of HopSwap, bound to a specific deployed contract. -func NewHopSwapTransactor(address common.Address, transactor bind.ContractTransactor) (*HopSwapTransactor, error) { - contract, err := bindHopSwap(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &HopSwapTransactor{contract: contract}, nil -} - -// NewHopSwapFilterer creates a new log filterer instance of HopSwap, bound to a specific deployed contract. -func NewHopSwapFilterer(address common.Address, filterer bind.ContractFilterer) (*HopSwapFilterer, error) { - contract, err := bindHopSwap(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &HopSwapFilterer{contract: contract}, nil -} - -// bindHopSwap binds a generic wrapper to an already deployed contract. -func bindHopSwap(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(HopSwapABI)) - 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 (_HopSwap *HopSwapRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _HopSwap.Contract.HopSwapCaller.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 (_HopSwap *HopSwapRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _HopSwap.Contract.HopSwapTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_HopSwap *HopSwapRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _HopSwap.Contract.HopSwapTransactor.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 (_HopSwap *HopSwapCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _HopSwap.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 (_HopSwap *HopSwapTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _HopSwap.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_HopSwap *HopSwapTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _HopSwap.Contract.contract.Transact(opts, method, params...) -} - -// CalculateCurrentWithdrawFee is a free data retrieval call binding the contract method 0x4a1b0d57. -// -// Solidity: function calculateCurrentWithdrawFee(address user) view returns(uint256) -func (_HopSwap *HopSwapCaller) CalculateCurrentWithdrawFee(opts *bind.CallOpts, user common.Address) (*big.Int, error) { - var out []interface{} - err := _HopSwap.contract.Call(opts, &out, "calculateCurrentWithdrawFee", user) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// CalculateCurrentWithdrawFee is a free data retrieval call binding the contract method 0x4a1b0d57. -// -// Solidity: function calculateCurrentWithdrawFee(address user) view returns(uint256) -func (_HopSwap *HopSwapSession) CalculateCurrentWithdrawFee(user common.Address) (*big.Int, error) { - return _HopSwap.Contract.CalculateCurrentWithdrawFee(&_HopSwap.CallOpts, user) -} - -// CalculateCurrentWithdrawFee is a free data retrieval call binding the contract method 0x4a1b0d57. -// -// Solidity: function calculateCurrentWithdrawFee(address user) view returns(uint256) -func (_HopSwap *HopSwapCallerSession) CalculateCurrentWithdrawFee(user common.Address) (*big.Int, error) { - return _HopSwap.Contract.CalculateCurrentWithdrawFee(&_HopSwap.CallOpts, user) -} - -// CalculateRemoveLiquidity is a free data retrieval call binding the contract method 0x7c61e561. -// -// Solidity: function calculateRemoveLiquidity(address account, uint256 amount) view returns(uint256[]) -func (_HopSwap *HopSwapCaller) CalculateRemoveLiquidity(opts *bind.CallOpts, account common.Address, amount *big.Int) ([]*big.Int, error) { - var out []interface{} - err := _HopSwap.contract.Call(opts, &out, "calculateRemoveLiquidity", account, amount) - - if err != nil { - return *new([]*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) - - return out0, err - -} - -// CalculateRemoveLiquidity is a free data retrieval call binding the contract method 0x7c61e561. -// -// Solidity: function calculateRemoveLiquidity(address account, uint256 amount) view returns(uint256[]) -func (_HopSwap *HopSwapSession) CalculateRemoveLiquidity(account common.Address, amount *big.Int) ([]*big.Int, error) { - return _HopSwap.Contract.CalculateRemoveLiquidity(&_HopSwap.CallOpts, account, amount) -} - -// CalculateRemoveLiquidity is a free data retrieval call binding the contract method 0x7c61e561. -// -// Solidity: function calculateRemoveLiquidity(address account, uint256 amount) view returns(uint256[]) -func (_HopSwap *HopSwapCallerSession) CalculateRemoveLiquidity(account common.Address, amount *big.Int) ([]*big.Int, error) { - return _HopSwap.Contract.CalculateRemoveLiquidity(&_HopSwap.CallOpts, account, amount) -} - -// CalculateRemoveLiquidityOneToken is a free data retrieval call binding the contract method 0x98899f40. -// -// Solidity: function calculateRemoveLiquidityOneToken(address account, uint256 tokenAmount, uint8 tokenIndex) view returns(uint256 availableTokenAmount) -func (_HopSwap *HopSwapCaller) CalculateRemoveLiquidityOneToken(opts *bind.CallOpts, account common.Address, tokenAmount *big.Int, tokenIndex uint8) (*big.Int, error) { - var out []interface{} - err := _HopSwap.contract.Call(opts, &out, "calculateRemoveLiquidityOneToken", account, tokenAmount, tokenIndex) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// CalculateRemoveLiquidityOneToken is a free data retrieval call binding the contract method 0x98899f40. -// -// Solidity: function calculateRemoveLiquidityOneToken(address account, uint256 tokenAmount, uint8 tokenIndex) view returns(uint256 availableTokenAmount) -func (_HopSwap *HopSwapSession) CalculateRemoveLiquidityOneToken(account common.Address, tokenAmount *big.Int, tokenIndex uint8) (*big.Int, error) { - return _HopSwap.Contract.CalculateRemoveLiquidityOneToken(&_HopSwap.CallOpts, account, tokenAmount, tokenIndex) -} - -// CalculateRemoveLiquidityOneToken is a free data retrieval call binding the contract method 0x98899f40. -// -// Solidity: function calculateRemoveLiquidityOneToken(address account, uint256 tokenAmount, uint8 tokenIndex) view returns(uint256 availableTokenAmount) -func (_HopSwap *HopSwapCallerSession) CalculateRemoveLiquidityOneToken(account common.Address, tokenAmount *big.Int, tokenIndex uint8) (*big.Int, error) { - return _HopSwap.Contract.CalculateRemoveLiquidityOneToken(&_HopSwap.CallOpts, account, tokenAmount, tokenIndex) -} - -// CalculateSwap is a free data retrieval call binding the contract method 0xa95b089f. -// -// Solidity: function calculateSwap(uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx) view returns(uint256) -func (_HopSwap *HopSwapCaller) CalculateSwap(opts *bind.CallOpts, tokenIndexFrom uint8, tokenIndexTo uint8, dx *big.Int) (*big.Int, error) { - var out []interface{} - err := _HopSwap.contract.Call(opts, &out, "calculateSwap", tokenIndexFrom, tokenIndexTo, dx) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// CalculateSwap is a free data retrieval call binding the contract method 0xa95b089f. -// -// Solidity: function calculateSwap(uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx) view returns(uint256) -func (_HopSwap *HopSwapSession) CalculateSwap(tokenIndexFrom uint8, tokenIndexTo uint8, dx *big.Int) (*big.Int, error) { - return _HopSwap.Contract.CalculateSwap(&_HopSwap.CallOpts, tokenIndexFrom, tokenIndexTo, dx) -} - -// CalculateSwap is a free data retrieval call binding the contract method 0xa95b089f. -// -// Solidity: function calculateSwap(uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx) view returns(uint256) -func (_HopSwap *HopSwapCallerSession) CalculateSwap(tokenIndexFrom uint8, tokenIndexTo uint8, dx *big.Int) (*big.Int, error) { - return _HopSwap.Contract.CalculateSwap(&_HopSwap.CallOpts, tokenIndexFrom, tokenIndexTo, dx) -} - -// CalculateTokenAmount is a free data retrieval call binding the contract method 0xf9273ffb. -// -// Solidity: function calculateTokenAmount(address account, uint256[] amounts, bool deposit) view returns(uint256) -func (_HopSwap *HopSwapCaller) CalculateTokenAmount(opts *bind.CallOpts, account common.Address, amounts []*big.Int, deposit bool) (*big.Int, error) { - var out []interface{} - err := _HopSwap.contract.Call(opts, &out, "calculateTokenAmount", account, amounts, deposit) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// CalculateTokenAmount is a free data retrieval call binding the contract method 0xf9273ffb. -// -// Solidity: function calculateTokenAmount(address account, uint256[] amounts, bool deposit) view returns(uint256) -func (_HopSwap *HopSwapSession) CalculateTokenAmount(account common.Address, amounts []*big.Int, deposit bool) (*big.Int, error) { - return _HopSwap.Contract.CalculateTokenAmount(&_HopSwap.CallOpts, account, amounts, deposit) -} - -// CalculateTokenAmount is a free data retrieval call binding the contract method 0xf9273ffb. -// -// Solidity: function calculateTokenAmount(address account, uint256[] amounts, bool deposit) view returns(uint256) -func (_HopSwap *HopSwapCallerSession) CalculateTokenAmount(account common.Address, amounts []*big.Int, deposit bool) (*big.Int, error) { - return _HopSwap.Contract.CalculateTokenAmount(&_HopSwap.CallOpts, account, amounts, deposit) -} - -// GetA is a free data retrieval call binding the contract method 0xd46300fd. -// -// Solidity: function getA() view returns(uint256) -func (_HopSwap *HopSwapCaller) GetA(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _HopSwap.contract.Call(opts, &out, "getA") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetA is a free data retrieval call binding the contract method 0xd46300fd. -// -// Solidity: function getA() view returns(uint256) -func (_HopSwap *HopSwapSession) GetA() (*big.Int, error) { - return _HopSwap.Contract.GetA(&_HopSwap.CallOpts) -} - -// GetA is a free data retrieval call binding the contract method 0xd46300fd. -// -// Solidity: function getA() view returns(uint256) -func (_HopSwap *HopSwapCallerSession) GetA() (*big.Int, error) { - return _HopSwap.Contract.GetA(&_HopSwap.CallOpts) -} - -// GetAPrecise is a free data retrieval call binding the contract method 0x0ba81959. -// -// Solidity: function getAPrecise() view returns(uint256) -func (_HopSwap *HopSwapCaller) GetAPrecise(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _HopSwap.contract.Call(opts, &out, "getAPrecise") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetAPrecise is a free data retrieval call binding the contract method 0x0ba81959. -// -// Solidity: function getAPrecise() view returns(uint256) -func (_HopSwap *HopSwapSession) GetAPrecise() (*big.Int, error) { - return _HopSwap.Contract.GetAPrecise(&_HopSwap.CallOpts) -} - -// GetAPrecise is a free data retrieval call binding the contract method 0x0ba81959. -// -// Solidity: function getAPrecise() view returns(uint256) -func (_HopSwap *HopSwapCallerSession) GetAPrecise() (*big.Int, error) { - return _HopSwap.Contract.GetAPrecise(&_HopSwap.CallOpts) -} - -// GetAdminBalance is a free data retrieval call binding the contract method 0xef0a712f. -// -// Solidity: function getAdminBalance(uint256 index) view returns(uint256) -func (_HopSwap *HopSwapCaller) GetAdminBalance(opts *bind.CallOpts, index *big.Int) (*big.Int, error) { - var out []interface{} - err := _HopSwap.contract.Call(opts, &out, "getAdminBalance", index) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetAdminBalance is a free data retrieval call binding the contract method 0xef0a712f. -// -// Solidity: function getAdminBalance(uint256 index) view returns(uint256) -func (_HopSwap *HopSwapSession) GetAdminBalance(index *big.Int) (*big.Int, error) { - return _HopSwap.Contract.GetAdminBalance(&_HopSwap.CallOpts, index) -} - -// GetAdminBalance is a free data retrieval call binding the contract method 0xef0a712f. -// -// Solidity: function getAdminBalance(uint256 index) view returns(uint256) -func (_HopSwap *HopSwapCallerSession) GetAdminBalance(index *big.Int) (*big.Int, error) { - return _HopSwap.Contract.GetAdminBalance(&_HopSwap.CallOpts, index) -} - -// GetDepositTimestamp is a free data retrieval call binding the contract method 0xda7a77be. -// -// Solidity: function getDepositTimestamp(address user) view returns(uint256) -func (_HopSwap *HopSwapCaller) GetDepositTimestamp(opts *bind.CallOpts, user common.Address) (*big.Int, error) { - var out []interface{} - err := _HopSwap.contract.Call(opts, &out, "getDepositTimestamp", user) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetDepositTimestamp is a free data retrieval call binding the contract method 0xda7a77be. -// -// Solidity: function getDepositTimestamp(address user) view returns(uint256) -func (_HopSwap *HopSwapSession) GetDepositTimestamp(user common.Address) (*big.Int, error) { - return _HopSwap.Contract.GetDepositTimestamp(&_HopSwap.CallOpts, user) -} - -// GetDepositTimestamp is a free data retrieval call binding the contract method 0xda7a77be. -// -// Solidity: function getDepositTimestamp(address user) view returns(uint256) -func (_HopSwap *HopSwapCallerSession) GetDepositTimestamp(user common.Address) (*big.Int, error) { - return _HopSwap.Contract.GetDepositTimestamp(&_HopSwap.CallOpts, user) -} - -// GetToken is a free data retrieval call binding the contract method 0x82b86600. -// -// Solidity: function getToken(uint8 index) view returns(address) -func (_HopSwap *HopSwapCaller) GetToken(opts *bind.CallOpts, index uint8) (common.Address, error) { - var out []interface{} - err := _HopSwap.contract.Call(opts, &out, "getToken", index) - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// GetToken is a free data retrieval call binding the contract method 0x82b86600. -// -// Solidity: function getToken(uint8 index) view returns(address) -func (_HopSwap *HopSwapSession) GetToken(index uint8) (common.Address, error) { - return _HopSwap.Contract.GetToken(&_HopSwap.CallOpts, index) -} - -// GetToken is a free data retrieval call binding the contract method 0x82b86600. -// -// Solidity: function getToken(uint8 index) view returns(address) -func (_HopSwap *HopSwapCallerSession) GetToken(index uint8) (common.Address, error) { - return _HopSwap.Contract.GetToken(&_HopSwap.CallOpts, index) -} - -// GetTokenBalance is a free data retrieval call binding the contract method 0x91ceb3eb. -// -// Solidity: function getTokenBalance(uint8 index) view returns(uint256) -func (_HopSwap *HopSwapCaller) GetTokenBalance(opts *bind.CallOpts, index uint8) (*big.Int, error) { - var out []interface{} - err := _HopSwap.contract.Call(opts, &out, "getTokenBalance", index) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetTokenBalance is a free data retrieval call binding the contract method 0x91ceb3eb. -// -// Solidity: function getTokenBalance(uint8 index) view returns(uint256) -func (_HopSwap *HopSwapSession) GetTokenBalance(index uint8) (*big.Int, error) { - return _HopSwap.Contract.GetTokenBalance(&_HopSwap.CallOpts, index) -} - -// GetTokenBalance is a free data retrieval call binding the contract method 0x91ceb3eb. -// -// Solidity: function getTokenBalance(uint8 index) view returns(uint256) -func (_HopSwap *HopSwapCallerSession) GetTokenBalance(index uint8) (*big.Int, error) { - return _HopSwap.Contract.GetTokenBalance(&_HopSwap.CallOpts, index) -} - -// GetTokenIndex is a free data retrieval call binding the contract method 0x66c0bd24. -// -// Solidity: function getTokenIndex(address tokenAddress) view returns(uint8) -func (_HopSwap *HopSwapCaller) GetTokenIndex(opts *bind.CallOpts, tokenAddress common.Address) (uint8, error) { - var out []interface{} - err := _HopSwap.contract.Call(opts, &out, "getTokenIndex", tokenAddress) - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -// GetTokenIndex is a free data retrieval call binding the contract method 0x66c0bd24. -// -// Solidity: function getTokenIndex(address tokenAddress) view returns(uint8) -func (_HopSwap *HopSwapSession) GetTokenIndex(tokenAddress common.Address) (uint8, error) { - return _HopSwap.Contract.GetTokenIndex(&_HopSwap.CallOpts, tokenAddress) -} - -// GetTokenIndex is a free data retrieval call binding the contract method 0x66c0bd24. -// -// Solidity: function getTokenIndex(address tokenAddress) view returns(uint8) -func (_HopSwap *HopSwapCallerSession) GetTokenIndex(tokenAddress common.Address) (uint8, error) { - return _HopSwap.Contract.GetTokenIndex(&_HopSwap.CallOpts, tokenAddress) -} - -// GetVirtualPrice is a free data retrieval call binding the contract method 0xe25aa5fa. -// -// Solidity: function getVirtualPrice() view returns(uint256) -func (_HopSwap *HopSwapCaller) GetVirtualPrice(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _HopSwap.contract.Call(opts, &out, "getVirtualPrice") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetVirtualPrice is a free data retrieval call binding the contract method 0xe25aa5fa. -// -// Solidity: function getVirtualPrice() view returns(uint256) -func (_HopSwap *HopSwapSession) GetVirtualPrice() (*big.Int, error) { - return _HopSwap.Contract.GetVirtualPrice(&_HopSwap.CallOpts) -} - -// GetVirtualPrice is a free data retrieval call binding the contract method 0xe25aa5fa. -// -// Solidity: function getVirtualPrice() view returns(uint256) -func (_HopSwap *HopSwapCallerSession) GetVirtualPrice() (*big.Int, error) { - return _HopSwap.Contract.GetVirtualPrice(&_HopSwap.CallOpts) -} - -// SwapStorage is a free data retrieval call binding the contract method 0x5fd65f0f. -// -// Solidity: function swapStorage() view returns(uint256 initialA, uint256 futureA, uint256 initialATime, uint256 futureATime, uint256 swapFee, uint256 adminFee, uint256 defaultWithdrawFee, address lpToken) -func (_HopSwap *HopSwapCaller) SwapStorage(opts *bind.CallOpts) (struct { - InitialA *big.Int - FutureA *big.Int - InitialATime *big.Int - FutureATime *big.Int - SwapFee *big.Int - AdminFee *big.Int - DefaultWithdrawFee *big.Int - LpToken common.Address -}, error) { - var out []interface{} - err := _HopSwap.contract.Call(opts, &out, "swapStorage") - - outstruct := new(struct { - InitialA *big.Int - FutureA *big.Int - InitialATime *big.Int - FutureATime *big.Int - SwapFee *big.Int - AdminFee *big.Int - DefaultWithdrawFee *big.Int - LpToken common.Address - }) - if err != nil { - return *outstruct, err - } - - outstruct.InitialA = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - outstruct.FutureA = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) - outstruct.InitialATime = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) - outstruct.FutureATime = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) - outstruct.SwapFee = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) - outstruct.AdminFee = *abi.ConvertType(out[5], new(*big.Int)).(**big.Int) - outstruct.DefaultWithdrawFee = *abi.ConvertType(out[6], new(*big.Int)).(**big.Int) - outstruct.LpToken = *abi.ConvertType(out[7], new(common.Address)).(*common.Address) - - return *outstruct, err - -} - -// SwapStorage is a free data retrieval call binding the contract method 0x5fd65f0f. -// -// Solidity: function swapStorage() view returns(uint256 initialA, uint256 futureA, uint256 initialATime, uint256 futureATime, uint256 swapFee, uint256 adminFee, uint256 defaultWithdrawFee, address lpToken) -func (_HopSwap *HopSwapSession) SwapStorage() (struct { - InitialA *big.Int - FutureA *big.Int - InitialATime *big.Int - FutureATime *big.Int - SwapFee *big.Int - AdminFee *big.Int - DefaultWithdrawFee *big.Int - LpToken common.Address -}, error) { - return _HopSwap.Contract.SwapStorage(&_HopSwap.CallOpts) -} - -// SwapStorage is a free data retrieval call binding the contract method 0x5fd65f0f. -// -// Solidity: function swapStorage() view returns(uint256 initialA, uint256 futureA, uint256 initialATime, uint256 futureATime, uint256 swapFee, uint256 adminFee, uint256 defaultWithdrawFee, address lpToken) -func (_HopSwap *HopSwapCallerSession) SwapStorage() (struct { - InitialA *big.Int - FutureA *big.Int - InitialATime *big.Int - FutureATime *big.Int - SwapFee *big.Int - AdminFee *big.Int - DefaultWithdrawFee *big.Int - LpToken common.Address -}, error) { - return _HopSwap.Contract.SwapStorage(&_HopSwap.CallOpts) -} - -// AddLiquidity is a paid mutator transaction binding the contract method 0x4d49e87d. -// -// Solidity: function addLiquidity(uint256[] amounts, uint256 minToMint, uint256 deadline) returns(uint256) -func (_HopSwap *HopSwapTransactor) AddLiquidity(opts *bind.TransactOpts, amounts []*big.Int, minToMint *big.Int, deadline *big.Int) (*types.Transaction, error) { - return _HopSwap.contract.Transact(opts, "addLiquidity", amounts, minToMint, deadline) -} - -// AddLiquidity is a paid mutator transaction binding the contract method 0x4d49e87d. -// -// Solidity: function addLiquidity(uint256[] amounts, uint256 minToMint, uint256 deadline) returns(uint256) -func (_HopSwap *HopSwapSession) AddLiquidity(amounts []*big.Int, minToMint *big.Int, deadline *big.Int) (*types.Transaction, error) { - return _HopSwap.Contract.AddLiquidity(&_HopSwap.TransactOpts, amounts, minToMint, deadline) -} - -// AddLiquidity is a paid mutator transaction binding the contract method 0x4d49e87d. -// -// Solidity: function addLiquidity(uint256[] amounts, uint256 minToMint, uint256 deadline) returns(uint256) -func (_HopSwap *HopSwapTransactorSession) AddLiquidity(amounts []*big.Int, minToMint *big.Int, deadline *big.Int) (*types.Transaction, error) { - return _HopSwap.Contract.AddLiquidity(&_HopSwap.TransactOpts, amounts, minToMint, deadline) -} - -// Initialize is a paid mutator transaction binding the contract method 0x6dd4480b. -// -// Solidity: function initialize(address[] _pooledTokens, uint8[] decimals, string lpTokenName, string lpTokenSymbol, uint256 _a, uint256 _fee, uint256 _adminFee, uint256 _withdrawFee) returns() -func (_HopSwap *HopSwapTransactor) Initialize(opts *bind.TransactOpts, _pooledTokens []common.Address, decimals []uint8, lpTokenName string, lpTokenSymbol string, _a *big.Int, _fee *big.Int, _adminFee *big.Int, _withdrawFee *big.Int) (*types.Transaction, error) { - return _HopSwap.contract.Transact(opts, "initialize", _pooledTokens, decimals, lpTokenName, lpTokenSymbol, _a, _fee, _adminFee, _withdrawFee) -} - -// Initialize is a paid mutator transaction binding the contract method 0x6dd4480b. -// -// Solidity: function initialize(address[] _pooledTokens, uint8[] decimals, string lpTokenName, string lpTokenSymbol, uint256 _a, uint256 _fee, uint256 _adminFee, uint256 _withdrawFee) returns() -func (_HopSwap *HopSwapSession) Initialize(_pooledTokens []common.Address, decimals []uint8, lpTokenName string, lpTokenSymbol string, _a *big.Int, _fee *big.Int, _adminFee *big.Int, _withdrawFee *big.Int) (*types.Transaction, error) { - return _HopSwap.Contract.Initialize(&_HopSwap.TransactOpts, _pooledTokens, decimals, lpTokenName, lpTokenSymbol, _a, _fee, _adminFee, _withdrawFee) -} - -// Initialize is a paid mutator transaction binding the contract method 0x6dd4480b. -// -// Solidity: function initialize(address[] _pooledTokens, uint8[] decimals, string lpTokenName, string lpTokenSymbol, uint256 _a, uint256 _fee, uint256 _adminFee, uint256 _withdrawFee) returns() -func (_HopSwap *HopSwapTransactorSession) Initialize(_pooledTokens []common.Address, decimals []uint8, lpTokenName string, lpTokenSymbol string, _a *big.Int, _fee *big.Int, _adminFee *big.Int, _withdrawFee *big.Int) (*types.Transaction, error) { - return _HopSwap.Contract.Initialize(&_HopSwap.TransactOpts, _pooledTokens, decimals, lpTokenName, lpTokenSymbol, _a, _fee, _adminFee, _withdrawFee) -} - -// RemoveLiquidity is a paid mutator transaction binding the contract method 0x31cd52b0. -// -// Solidity: function removeLiquidity(uint256 amount, uint256[] minAmounts, uint256 deadline) returns(uint256[]) -func (_HopSwap *HopSwapTransactor) RemoveLiquidity(opts *bind.TransactOpts, amount *big.Int, minAmounts []*big.Int, deadline *big.Int) (*types.Transaction, error) { - return _HopSwap.contract.Transact(opts, "removeLiquidity", amount, minAmounts, deadline) -} - -// RemoveLiquidity is a paid mutator transaction binding the contract method 0x31cd52b0. -// -// Solidity: function removeLiquidity(uint256 amount, uint256[] minAmounts, uint256 deadline) returns(uint256[]) -func (_HopSwap *HopSwapSession) RemoveLiquidity(amount *big.Int, minAmounts []*big.Int, deadline *big.Int) (*types.Transaction, error) { - return _HopSwap.Contract.RemoveLiquidity(&_HopSwap.TransactOpts, amount, minAmounts, deadline) -} - -// RemoveLiquidity is a paid mutator transaction binding the contract method 0x31cd52b0. -// -// Solidity: function removeLiquidity(uint256 amount, uint256[] minAmounts, uint256 deadline) returns(uint256[]) -func (_HopSwap *HopSwapTransactorSession) RemoveLiquidity(amount *big.Int, minAmounts []*big.Int, deadline *big.Int) (*types.Transaction, error) { - return _HopSwap.Contract.RemoveLiquidity(&_HopSwap.TransactOpts, amount, minAmounts, deadline) -} - -// RemoveLiquidityImbalance is a paid mutator transaction binding the contract method 0x84cdd9bc. -// -// Solidity: function removeLiquidityImbalance(uint256[] amounts, uint256 maxBurnAmount, uint256 deadline) returns(uint256) -func (_HopSwap *HopSwapTransactor) RemoveLiquidityImbalance(opts *bind.TransactOpts, amounts []*big.Int, maxBurnAmount *big.Int, deadline *big.Int) (*types.Transaction, error) { - return _HopSwap.contract.Transact(opts, "removeLiquidityImbalance", amounts, maxBurnAmount, deadline) -} - -// RemoveLiquidityImbalance is a paid mutator transaction binding the contract method 0x84cdd9bc. -// -// Solidity: function removeLiquidityImbalance(uint256[] amounts, uint256 maxBurnAmount, uint256 deadline) returns(uint256) -func (_HopSwap *HopSwapSession) RemoveLiquidityImbalance(amounts []*big.Int, maxBurnAmount *big.Int, deadline *big.Int) (*types.Transaction, error) { - return _HopSwap.Contract.RemoveLiquidityImbalance(&_HopSwap.TransactOpts, amounts, maxBurnAmount, deadline) -} - -// RemoveLiquidityImbalance is a paid mutator transaction binding the contract method 0x84cdd9bc. -// -// Solidity: function removeLiquidityImbalance(uint256[] amounts, uint256 maxBurnAmount, uint256 deadline) returns(uint256) -func (_HopSwap *HopSwapTransactorSession) RemoveLiquidityImbalance(amounts []*big.Int, maxBurnAmount *big.Int, deadline *big.Int) (*types.Transaction, error) { - return _HopSwap.Contract.RemoveLiquidityImbalance(&_HopSwap.TransactOpts, amounts, maxBurnAmount, deadline) -} - -// RemoveLiquidityOneToken is a paid mutator transaction binding the contract method 0x3e3a1560. -// -// Solidity: function removeLiquidityOneToken(uint256 tokenAmount, uint8 tokenIndex, uint256 minAmount, uint256 deadline) returns(uint256) -func (_HopSwap *HopSwapTransactor) RemoveLiquidityOneToken(opts *bind.TransactOpts, tokenAmount *big.Int, tokenIndex uint8, minAmount *big.Int, deadline *big.Int) (*types.Transaction, error) { - return _HopSwap.contract.Transact(opts, "removeLiquidityOneToken", tokenAmount, tokenIndex, minAmount, deadline) -} - -// RemoveLiquidityOneToken is a paid mutator transaction binding the contract method 0x3e3a1560. -// -// Solidity: function removeLiquidityOneToken(uint256 tokenAmount, uint8 tokenIndex, uint256 minAmount, uint256 deadline) returns(uint256) -func (_HopSwap *HopSwapSession) RemoveLiquidityOneToken(tokenAmount *big.Int, tokenIndex uint8, minAmount *big.Int, deadline *big.Int) (*types.Transaction, error) { - return _HopSwap.Contract.RemoveLiquidityOneToken(&_HopSwap.TransactOpts, tokenAmount, tokenIndex, minAmount, deadline) -} - -// RemoveLiquidityOneToken is a paid mutator transaction binding the contract method 0x3e3a1560. -// -// Solidity: function removeLiquidityOneToken(uint256 tokenAmount, uint8 tokenIndex, uint256 minAmount, uint256 deadline) returns(uint256) -func (_HopSwap *HopSwapTransactorSession) RemoveLiquidityOneToken(tokenAmount *big.Int, tokenIndex uint8, minAmount *big.Int, deadline *big.Int) (*types.Transaction, error) { - return _HopSwap.Contract.RemoveLiquidityOneToken(&_HopSwap.TransactOpts, tokenAmount, tokenIndex, minAmount, deadline) -} - -// Swap is a paid mutator transaction binding the contract method 0x91695586. -// -// Solidity: function swap(uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx, uint256 minDy, uint256 deadline) returns(uint256) -func (_HopSwap *HopSwapTransactor) Swap(opts *bind.TransactOpts, tokenIndexFrom uint8, tokenIndexTo uint8, dx *big.Int, minDy *big.Int, deadline *big.Int) (*types.Transaction, error) { - return _HopSwap.contract.Transact(opts, "swap", tokenIndexFrom, tokenIndexTo, dx, minDy, deadline) -} - -// Swap is a paid mutator transaction binding the contract method 0x91695586. -// -// Solidity: function swap(uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx, uint256 minDy, uint256 deadline) returns(uint256) -func (_HopSwap *HopSwapSession) Swap(tokenIndexFrom uint8, tokenIndexTo uint8, dx *big.Int, minDy *big.Int, deadline *big.Int) (*types.Transaction, error) { - return _HopSwap.Contract.Swap(&_HopSwap.TransactOpts, tokenIndexFrom, tokenIndexTo, dx, minDy, deadline) -} - -// Swap is a paid mutator transaction binding the contract method 0x91695586. -// -// Solidity: function swap(uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx, uint256 minDy, uint256 deadline) returns(uint256) -func (_HopSwap *HopSwapTransactorSession) Swap(tokenIndexFrom uint8, tokenIndexTo uint8, dx *big.Int, minDy *big.Int, deadline *big.Int) (*types.Transaction, error) { - return _HopSwap.Contract.Swap(&_HopSwap.TransactOpts, tokenIndexFrom, tokenIndexTo, dx, minDy, deadline) -} - -// UpdateUserWithdrawFee is a paid mutator transaction binding the contract method 0xc00c125c. -// -// Solidity: function updateUserWithdrawFee(address recipient, uint256 transferAmount) returns() -func (_HopSwap *HopSwapTransactor) UpdateUserWithdrawFee(opts *bind.TransactOpts, recipient common.Address, transferAmount *big.Int) (*types.Transaction, error) { - return _HopSwap.contract.Transact(opts, "updateUserWithdrawFee", recipient, transferAmount) -} - -// UpdateUserWithdrawFee is a paid mutator transaction binding the contract method 0xc00c125c. -// -// Solidity: function updateUserWithdrawFee(address recipient, uint256 transferAmount) returns() -func (_HopSwap *HopSwapSession) UpdateUserWithdrawFee(recipient common.Address, transferAmount *big.Int) (*types.Transaction, error) { - return _HopSwap.Contract.UpdateUserWithdrawFee(&_HopSwap.TransactOpts, recipient, transferAmount) -} - -// UpdateUserWithdrawFee is a paid mutator transaction binding the contract method 0xc00c125c. -// -// Solidity: function updateUserWithdrawFee(address recipient, uint256 transferAmount) returns() -func (_HopSwap *HopSwapTransactorSession) UpdateUserWithdrawFee(recipient common.Address, transferAmount *big.Int) (*types.Transaction, error) { - return _HopSwap.Contract.UpdateUserWithdrawFee(&_HopSwap.TransactOpts, recipient, transferAmount) -} - -// HopSwapAddLiquidityIterator is returned from FilterAddLiquidity and is used to iterate over the raw logs and unpacked data for AddLiquidity events raised by the HopSwap contract. -type HopSwapAddLiquidityIterator struct { - Event *HopSwapAddLiquidity // 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 *HopSwapAddLiquidityIterator) 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(HopSwapAddLiquidity) - 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(HopSwapAddLiquidity) - 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 *HopSwapAddLiquidityIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *HopSwapAddLiquidityIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// HopSwapAddLiquidity represents a AddLiquidity event raised by the HopSwap contract. -type HopSwapAddLiquidity struct { - Provider common.Address - TokenAmounts []*big.Int - Fees []*big.Int - Invariant *big.Int - LpTokenSupply *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterAddLiquidity is a free log retrieval operation binding the contract event 0x189c623b666b1b45b83d7178f39b8c087cb09774317ca2f53c2d3c3726f222a2. -// -// Solidity: event AddLiquidity(address indexed provider, uint256[] tokenAmounts, uint256[] fees, uint256 invariant, uint256 lpTokenSupply) -func (_HopSwap *HopSwapFilterer) FilterAddLiquidity(opts *bind.FilterOpts, provider []common.Address) (*HopSwapAddLiquidityIterator, error) { - - var providerRule []interface{} - for _, providerItem := range provider { - providerRule = append(providerRule, providerItem) - } - - logs, sub, err := _HopSwap.contract.FilterLogs(opts, "AddLiquidity", providerRule) - if err != nil { - return nil, err - } - return &HopSwapAddLiquidityIterator{contract: _HopSwap.contract, event: "AddLiquidity", logs: logs, sub: sub}, nil -} - -// WatchAddLiquidity is a free log subscription operation binding the contract event 0x189c623b666b1b45b83d7178f39b8c087cb09774317ca2f53c2d3c3726f222a2. -// -// Solidity: event AddLiquidity(address indexed provider, uint256[] tokenAmounts, uint256[] fees, uint256 invariant, uint256 lpTokenSupply) -func (_HopSwap *HopSwapFilterer) WatchAddLiquidity(opts *bind.WatchOpts, sink chan<- *HopSwapAddLiquidity, provider []common.Address) (event.Subscription, error) { - - var providerRule []interface{} - for _, providerItem := range provider { - providerRule = append(providerRule, providerItem) - } - - logs, sub, err := _HopSwap.contract.WatchLogs(opts, "AddLiquidity", providerRule) - 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(HopSwapAddLiquidity) - if err := _HopSwap.contract.UnpackLog(event, "AddLiquidity", 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 -} - -// ParseAddLiquidity is a log parse operation binding the contract event 0x189c623b666b1b45b83d7178f39b8c087cb09774317ca2f53c2d3c3726f222a2. -// -// Solidity: event AddLiquidity(address indexed provider, uint256[] tokenAmounts, uint256[] fees, uint256 invariant, uint256 lpTokenSupply) -func (_HopSwap *HopSwapFilterer) ParseAddLiquidity(log types.Log) (*HopSwapAddLiquidity, error) { - event := new(HopSwapAddLiquidity) - if err := _HopSwap.contract.UnpackLog(event, "AddLiquidity", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// HopSwapNewAdminFeeIterator is returned from FilterNewAdminFee and is used to iterate over the raw logs and unpacked data for NewAdminFee events raised by the HopSwap contract. -type HopSwapNewAdminFeeIterator struct { - Event *HopSwapNewAdminFee // 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 *HopSwapNewAdminFeeIterator) 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(HopSwapNewAdminFee) - 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(HopSwapNewAdminFee) - 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 *HopSwapNewAdminFeeIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *HopSwapNewAdminFeeIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// HopSwapNewAdminFee represents a NewAdminFee event raised by the HopSwap contract. -type HopSwapNewAdminFee struct { - NewAdminFee *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterNewAdminFee is a free log retrieval operation binding the contract event 0xab599d640ca80cde2b09b128a4154a8dfe608cb80f4c9399c8b954b01fd35f38. -// -// Solidity: event NewAdminFee(uint256 newAdminFee) -func (_HopSwap *HopSwapFilterer) FilterNewAdminFee(opts *bind.FilterOpts) (*HopSwapNewAdminFeeIterator, error) { - - logs, sub, err := _HopSwap.contract.FilterLogs(opts, "NewAdminFee") - if err != nil { - return nil, err - } - return &HopSwapNewAdminFeeIterator{contract: _HopSwap.contract, event: "NewAdminFee", logs: logs, sub: sub}, nil -} - -// WatchNewAdminFee is a free log subscription operation binding the contract event 0xab599d640ca80cde2b09b128a4154a8dfe608cb80f4c9399c8b954b01fd35f38. -// -// Solidity: event NewAdminFee(uint256 newAdminFee) -func (_HopSwap *HopSwapFilterer) WatchNewAdminFee(opts *bind.WatchOpts, sink chan<- *HopSwapNewAdminFee) (event.Subscription, error) { - - logs, sub, err := _HopSwap.contract.WatchLogs(opts, "NewAdminFee") - 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(HopSwapNewAdminFee) - if err := _HopSwap.contract.UnpackLog(event, "NewAdminFee", 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 -} - -// ParseNewAdminFee is a log parse operation binding the contract event 0xab599d640ca80cde2b09b128a4154a8dfe608cb80f4c9399c8b954b01fd35f38. -// -// Solidity: event NewAdminFee(uint256 newAdminFee) -func (_HopSwap *HopSwapFilterer) ParseNewAdminFee(log types.Log) (*HopSwapNewAdminFee, error) { - event := new(HopSwapNewAdminFee) - if err := _HopSwap.contract.UnpackLog(event, "NewAdminFee", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// HopSwapNewSwapFeeIterator is returned from FilterNewSwapFee and is used to iterate over the raw logs and unpacked data for NewSwapFee events raised by the HopSwap contract. -type HopSwapNewSwapFeeIterator struct { - Event *HopSwapNewSwapFee // 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 *HopSwapNewSwapFeeIterator) 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(HopSwapNewSwapFee) - 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(HopSwapNewSwapFee) - 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 *HopSwapNewSwapFeeIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *HopSwapNewSwapFeeIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// HopSwapNewSwapFee represents a NewSwapFee event raised by the HopSwap contract. -type HopSwapNewSwapFee struct { - NewSwapFee *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterNewSwapFee is a free log retrieval operation binding the contract event 0xd88ea5155021c6f8dafa1a741e173f595cdf77ce7c17d43342131d7f06afdfe5. -// -// Solidity: event NewSwapFee(uint256 newSwapFee) -func (_HopSwap *HopSwapFilterer) FilterNewSwapFee(opts *bind.FilterOpts) (*HopSwapNewSwapFeeIterator, error) { - - logs, sub, err := _HopSwap.contract.FilterLogs(opts, "NewSwapFee") - if err != nil { - return nil, err - } - return &HopSwapNewSwapFeeIterator{contract: _HopSwap.contract, event: "NewSwapFee", logs: logs, sub: sub}, nil -} - -// WatchNewSwapFee is a free log subscription operation binding the contract event 0xd88ea5155021c6f8dafa1a741e173f595cdf77ce7c17d43342131d7f06afdfe5. -// -// Solidity: event NewSwapFee(uint256 newSwapFee) -func (_HopSwap *HopSwapFilterer) WatchNewSwapFee(opts *bind.WatchOpts, sink chan<- *HopSwapNewSwapFee) (event.Subscription, error) { - - logs, sub, err := _HopSwap.contract.WatchLogs(opts, "NewSwapFee") - 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(HopSwapNewSwapFee) - if err := _HopSwap.contract.UnpackLog(event, "NewSwapFee", 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 -} - -// ParseNewSwapFee is a log parse operation binding the contract event 0xd88ea5155021c6f8dafa1a741e173f595cdf77ce7c17d43342131d7f06afdfe5. -// -// Solidity: event NewSwapFee(uint256 newSwapFee) -func (_HopSwap *HopSwapFilterer) ParseNewSwapFee(log types.Log) (*HopSwapNewSwapFee, error) { - event := new(HopSwapNewSwapFee) - if err := _HopSwap.contract.UnpackLog(event, "NewSwapFee", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// HopSwapNewWithdrawFeeIterator is returned from FilterNewWithdrawFee and is used to iterate over the raw logs and unpacked data for NewWithdrawFee events raised by the HopSwap contract. -type HopSwapNewWithdrawFeeIterator struct { - Event *HopSwapNewWithdrawFee // 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 *HopSwapNewWithdrawFeeIterator) 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(HopSwapNewWithdrawFee) - 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(HopSwapNewWithdrawFee) - 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 *HopSwapNewWithdrawFeeIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *HopSwapNewWithdrawFeeIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// HopSwapNewWithdrawFee represents a NewWithdrawFee event raised by the HopSwap contract. -type HopSwapNewWithdrawFee struct { - NewWithdrawFee *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterNewWithdrawFee is a free log retrieval operation binding the contract event 0xd5fe46099fa396290a7f57e36c3c3c8774e2562c18ed5d1dcc0fa75071e03f1d. -// -// Solidity: event NewWithdrawFee(uint256 newWithdrawFee) -func (_HopSwap *HopSwapFilterer) FilterNewWithdrawFee(opts *bind.FilterOpts) (*HopSwapNewWithdrawFeeIterator, error) { - - logs, sub, err := _HopSwap.contract.FilterLogs(opts, "NewWithdrawFee") - if err != nil { - return nil, err - } - return &HopSwapNewWithdrawFeeIterator{contract: _HopSwap.contract, event: "NewWithdrawFee", logs: logs, sub: sub}, nil -} - -// WatchNewWithdrawFee is a free log subscription operation binding the contract event 0xd5fe46099fa396290a7f57e36c3c3c8774e2562c18ed5d1dcc0fa75071e03f1d. -// -// Solidity: event NewWithdrawFee(uint256 newWithdrawFee) -func (_HopSwap *HopSwapFilterer) WatchNewWithdrawFee(opts *bind.WatchOpts, sink chan<- *HopSwapNewWithdrawFee) (event.Subscription, error) { - - logs, sub, err := _HopSwap.contract.WatchLogs(opts, "NewWithdrawFee") - 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(HopSwapNewWithdrawFee) - if err := _HopSwap.contract.UnpackLog(event, "NewWithdrawFee", 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 -} - -// ParseNewWithdrawFee is a log parse operation binding the contract event 0xd5fe46099fa396290a7f57e36c3c3c8774e2562c18ed5d1dcc0fa75071e03f1d. -// -// Solidity: event NewWithdrawFee(uint256 newWithdrawFee) -func (_HopSwap *HopSwapFilterer) ParseNewWithdrawFee(log types.Log) (*HopSwapNewWithdrawFee, error) { - event := new(HopSwapNewWithdrawFee) - if err := _HopSwap.contract.UnpackLog(event, "NewWithdrawFee", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// HopSwapRampAIterator is returned from FilterRampA and is used to iterate over the raw logs and unpacked data for RampA events raised by the HopSwap contract. -type HopSwapRampAIterator struct { - Event *HopSwapRampA // 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 *HopSwapRampAIterator) 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(HopSwapRampA) - 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(HopSwapRampA) - 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 *HopSwapRampAIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *HopSwapRampAIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// HopSwapRampA represents a RampA event raised by the HopSwap contract. -type HopSwapRampA struct { - OldA *big.Int - NewA *big.Int - InitialTime *big.Int - FutureTime *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterRampA is a free log retrieval operation binding the contract event 0xa2b71ec6df949300b59aab36b55e189697b750119dd349fcfa8c0f779e83c254. -// -// Solidity: event RampA(uint256 oldA, uint256 newA, uint256 initialTime, uint256 futureTime) -func (_HopSwap *HopSwapFilterer) FilterRampA(opts *bind.FilterOpts) (*HopSwapRampAIterator, error) { - - logs, sub, err := _HopSwap.contract.FilterLogs(opts, "RampA") - if err != nil { - return nil, err - } - return &HopSwapRampAIterator{contract: _HopSwap.contract, event: "RampA", logs: logs, sub: sub}, nil -} - -// WatchRampA is a free log subscription operation binding the contract event 0xa2b71ec6df949300b59aab36b55e189697b750119dd349fcfa8c0f779e83c254. -// -// Solidity: event RampA(uint256 oldA, uint256 newA, uint256 initialTime, uint256 futureTime) -func (_HopSwap *HopSwapFilterer) WatchRampA(opts *bind.WatchOpts, sink chan<- *HopSwapRampA) (event.Subscription, error) { - - logs, sub, err := _HopSwap.contract.WatchLogs(opts, "RampA") - 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(HopSwapRampA) - if err := _HopSwap.contract.UnpackLog(event, "RampA", 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 -} - -// ParseRampA is a log parse operation binding the contract event 0xa2b71ec6df949300b59aab36b55e189697b750119dd349fcfa8c0f779e83c254. -// -// Solidity: event RampA(uint256 oldA, uint256 newA, uint256 initialTime, uint256 futureTime) -func (_HopSwap *HopSwapFilterer) ParseRampA(log types.Log) (*HopSwapRampA, error) { - event := new(HopSwapRampA) - if err := _HopSwap.contract.UnpackLog(event, "RampA", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// HopSwapRemoveLiquidityIterator is returned from FilterRemoveLiquidity and is used to iterate over the raw logs and unpacked data for RemoveLiquidity events raised by the HopSwap contract. -type HopSwapRemoveLiquidityIterator struct { - Event *HopSwapRemoveLiquidity // 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 *HopSwapRemoveLiquidityIterator) 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(HopSwapRemoveLiquidity) - 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(HopSwapRemoveLiquidity) - 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 *HopSwapRemoveLiquidityIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *HopSwapRemoveLiquidityIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// HopSwapRemoveLiquidity represents a RemoveLiquidity event raised by the HopSwap contract. -type HopSwapRemoveLiquidity struct { - Provider common.Address - TokenAmounts []*big.Int - LpTokenSupply *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterRemoveLiquidity is a free log retrieval operation binding the contract event 0x88d38ed598fdd809c2bf01ee49cd24b7fdabf379a83d29567952b60324d58cef. -// -// Solidity: event RemoveLiquidity(address indexed provider, uint256[] tokenAmounts, uint256 lpTokenSupply) -func (_HopSwap *HopSwapFilterer) FilterRemoveLiquidity(opts *bind.FilterOpts, provider []common.Address) (*HopSwapRemoveLiquidityIterator, error) { - - var providerRule []interface{} - for _, providerItem := range provider { - providerRule = append(providerRule, providerItem) - } - - logs, sub, err := _HopSwap.contract.FilterLogs(opts, "RemoveLiquidity", providerRule) - if err != nil { - return nil, err - } - return &HopSwapRemoveLiquidityIterator{contract: _HopSwap.contract, event: "RemoveLiquidity", logs: logs, sub: sub}, nil -} - -// WatchRemoveLiquidity is a free log subscription operation binding the contract event 0x88d38ed598fdd809c2bf01ee49cd24b7fdabf379a83d29567952b60324d58cef. -// -// Solidity: event RemoveLiquidity(address indexed provider, uint256[] tokenAmounts, uint256 lpTokenSupply) -func (_HopSwap *HopSwapFilterer) WatchRemoveLiquidity(opts *bind.WatchOpts, sink chan<- *HopSwapRemoveLiquidity, provider []common.Address) (event.Subscription, error) { - - var providerRule []interface{} - for _, providerItem := range provider { - providerRule = append(providerRule, providerItem) - } - - logs, sub, err := _HopSwap.contract.WatchLogs(opts, "RemoveLiquidity", providerRule) - 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(HopSwapRemoveLiquidity) - if err := _HopSwap.contract.UnpackLog(event, "RemoveLiquidity", 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 -} - -// ParseRemoveLiquidity is a log parse operation binding the contract event 0x88d38ed598fdd809c2bf01ee49cd24b7fdabf379a83d29567952b60324d58cef. -// -// Solidity: event RemoveLiquidity(address indexed provider, uint256[] tokenAmounts, uint256 lpTokenSupply) -func (_HopSwap *HopSwapFilterer) ParseRemoveLiquidity(log types.Log) (*HopSwapRemoveLiquidity, error) { - event := new(HopSwapRemoveLiquidity) - if err := _HopSwap.contract.UnpackLog(event, "RemoveLiquidity", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// HopSwapRemoveLiquidityImbalanceIterator is returned from FilterRemoveLiquidityImbalance and is used to iterate over the raw logs and unpacked data for RemoveLiquidityImbalance events raised by the HopSwap contract. -type HopSwapRemoveLiquidityImbalanceIterator struct { - Event *HopSwapRemoveLiquidityImbalance // 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 *HopSwapRemoveLiquidityImbalanceIterator) 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(HopSwapRemoveLiquidityImbalance) - 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(HopSwapRemoveLiquidityImbalance) - 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 *HopSwapRemoveLiquidityImbalanceIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *HopSwapRemoveLiquidityImbalanceIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// HopSwapRemoveLiquidityImbalance represents a RemoveLiquidityImbalance event raised by the HopSwap contract. -type HopSwapRemoveLiquidityImbalance struct { - Provider common.Address - TokenAmounts []*big.Int - Fees []*big.Int - Invariant *big.Int - LpTokenSupply *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterRemoveLiquidityImbalance is a free log retrieval operation binding the contract event 0x3631c28b1f9dd213e0319fb167b554d76b6c283a41143eb400a0d1adb1af1755. -// -// Solidity: event RemoveLiquidityImbalance(address indexed provider, uint256[] tokenAmounts, uint256[] fees, uint256 invariant, uint256 lpTokenSupply) -func (_HopSwap *HopSwapFilterer) FilterRemoveLiquidityImbalance(opts *bind.FilterOpts, provider []common.Address) (*HopSwapRemoveLiquidityImbalanceIterator, error) { - - var providerRule []interface{} - for _, providerItem := range provider { - providerRule = append(providerRule, providerItem) - } - - logs, sub, err := _HopSwap.contract.FilterLogs(opts, "RemoveLiquidityImbalance", providerRule) - if err != nil { - return nil, err - } - return &HopSwapRemoveLiquidityImbalanceIterator{contract: _HopSwap.contract, event: "RemoveLiquidityImbalance", logs: logs, sub: sub}, nil -} - -// WatchRemoveLiquidityImbalance is a free log subscription operation binding the contract event 0x3631c28b1f9dd213e0319fb167b554d76b6c283a41143eb400a0d1adb1af1755. -// -// Solidity: event RemoveLiquidityImbalance(address indexed provider, uint256[] tokenAmounts, uint256[] fees, uint256 invariant, uint256 lpTokenSupply) -func (_HopSwap *HopSwapFilterer) WatchRemoveLiquidityImbalance(opts *bind.WatchOpts, sink chan<- *HopSwapRemoveLiquidityImbalance, provider []common.Address) (event.Subscription, error) { - - var providerRule []interface{} - for _, providerItem := range provider { - providerRule = append(providerRule, providerItem) - } - - logs, sub, err := _HopSwap.contract.WatchLogs(opts, "RemoveLiquidityImbalance", providerRule) - 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(HopSwapRemoveLiquidityImbalance) - if err := _HopSwap.contract.UnpackLog(event, "RemoveLiquidityImbalance", 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 -} - -// ParseRemoveLiquidityImbalance is a log parse operation binding the contract event 0x3631c28b1f9dd213e0319fb167b554d76b6c283a41143eb400a0d1adb1af1755. -// -// Solidity: event RemoveLiquidityImbalance(address indexed provider, uint256[] tokenAmounts, uint256[] fees, uint256 invariant, uint256 lpTokenSupply) -func (_HopSwap *HopSwapFilterer) ParseRemoveLiquidityImbalance(log types.Log) (*HopSwapRemoveLiquidityImbalance, error) { - event := new(HopSwapRemoveLiquidityImbalance) - if err := _HopSwap.contract.UnpackLog(event, "RemoveLiquidityImbalance", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// HopSwapRemoveLiquidityOneIterator is returned from FilterRemoveLiquidityOne and is used to iterate over the raw logs and unpacked data for RemoveLiquidityOne events raised by the HopSwap contract. -type HopSwapRemoveLiquidityOneIterator struct { - Event *HopSwapRemoveLiquidityOne // 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 *HopSwapRemoveLiquidityOneIterator) 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(HopSwapRemoveLiquidityOne) - 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(HopSwapRemoveLiquidityOne) - 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 *HopSwapRemoveLiquidityOneIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *HopSwapRemoveLiquidityOneIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// HopSwapRemoveLiquidityOne represents a RemoveLiquidityOne event raised by the HopSwap contract. -type HopSwapRemoveLiquidityOne struct { - Provider common.Address - LpTokenAmount *big.Int - LpTokenSupply *big.Int - BoughtId *big.Int - TokensBought *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterRemoveLiquidityOne is a free log retrieval operation binding the contract event 0x43fb02998f4e03da2e0e6fff53fdbf0c40a9f45f145dc377fc30615d7d7a8a64. -// -// Solidity: event RemoveLiquidityOne(address indexed provider, uint256 lpTokenAmount, uint256 lpTokenSupply, uint256 boughtId, uint256 tokensBought) -func (_HopSwap *HopSwapFilterer) FilterRemoveLiquidityOne(opts *bind.FilterOpts, provider []common.Address) (*HopSwapRemoveLiquidityOneIterator, error) { - - var providerRule []interface{} - for _, providerItem := range provider { - providerRule = append(providerRule, providerItem) - } - - logs, sub, err := _HopSwap.contract.FilterLogs(opts, "RemoveLiquidityOne", providerRule) - if err != nil { - return nil, err - } - return &HopSwapRemoveLiquidityOneIterator{contract: _HopSwap.contract, event: "RemoveLiquidityOne", logs: logs, sub: sub}, nil -} - -// WatchRemoveLiquidityOne is a free log subscription operation binding the contract event 0x43fb02998f4e03da2e0e6fff53fdbf0c40a9f45f145dc377fc30615d7d7a8a64. -// -// Solidity: event RemoveLiquidityOne(address indexed provider, uint256 lpTokenAmount, uint256 lpTokenSupply, uint256 boughtId, uint256 tokensBought) -func (_HopSwap *HopSwapFilterer) WatchRemoveLiquidityOne(opts *bind.WatchOpts, sink chan<- *HopSwapRemoveLiquidityOne, provider []common.Address) (event.Subscription, error) { - - var providerRule []interface{} - for _, providerItem := range provider { - providerRule = append(providerRule, providerItem) - } - - logs, sub, err := _HopSwap.contract.WatchLogs(opts, "RemoveLiquidityOne", providerRule) - 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(HopSwapRemoveLiquidityOne) - if err := _HopSwap.contract.UnpackLog(event, "RemoveLiquidityOne", 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 -} - -// ParseRemoveLiquidityOne is a log parse operation binding the contract event 0x43fb02998f4e03da2e0e6fff53fdbf0c40a9f45f145dc377fc30615d7d7a8a64. -// -// Solidity: event RemoveLiquidityOne(address indexed provider, uint256 lpTokenAmount, uint256 lpTokenSupply, uint256 boughtId, uint256 tokensBought) -func (_HopSwap *HopSwapFilterer) ParseRemoveLiquidityOne(log types.Log) (*HopSwapRemoveLiquidityOne, error) { - event := new(HopSwapRemoveLiquidityOne) - if err := _HopSwap.contract.UnpackLog(event, "RemoveLiquidityOne", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// HopSwapStopRampAIterator is returned from FilterStopRampA and is used to iterate over the raw logs and unpacked data for StopRampA events raised by the HopSwap contract. -type HopSwapStopRampAIterator struct { - Event *HopSwapStopRampA // 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 *HopSwapStopRampAIterator) 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(HopSwapStopRampA) - 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(HopSwapStopRampA) - 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 *HopSwapStopRampAIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *HopSwapStopRampAIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// HopSwapStopRampA represents a StopRampA event raised by the HopSwap contract. -type HopSwapStopRampA struct { - CurrentA *big.Int - Time *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterStopRampA is a free log retrieval operation binding the contract event 0x46e22fb3709ad289f62ce63d469248536dbc78d82b84a3d7e74ad606dc201938. -// -// Solidity: event StopRampA(uint256 currentA, uint256 time) -func (_HopSwap *HopSwapFilterer) FilterStopRampA(opts *bind.FilterOpts) (*HopSwapStopRampAIterator, error) { - - logs, sub, err := _HopSwap.contract.FilterLogs(opts, "StopRampA") - if err != nil { - return nil, err - } - return &HopSwapStopRampAIterator{contract: _HopSwap.contract, event: "StopRampA", logs: logs, sub: sub}, nil -} - -// WatchStopRampA is a free log subscription operation binding the contract event 0x46e22fb3709ad289f62ce63d469248536dbc78d82b84a3d7e74ad606dc201938. -// -// Solidity: event StopRampA(uint256 currentA, uint256 time) -func (_HopSwap *HopSwapFilterer) WatchStopRampA(opts *bind.WatchOpts, sink chan<- *HopSwapStopRampA) (event.Subscription, error) { - - logs, sub, err := _HopSwap.contract.WatchLogs(opts, "StopRampA") - 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(HopSwapStopRampA) - if err := _HopSwap.contract.UnpackLog(event, "StopRampA", 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 -} - -// ParseStopRampA is a log parse operation binding the contract event 0x46e22fb3709ad289f62ce63d469248536dbc78d82b84a3d7e74ad606dc201938. -// -// Solidity: event StopRampA(uint256 currentA, uint256 time) -func (_HopSwap *HopSwapFilterer) ParseStopRampA(log types.Log) (*HopSwapStopRampA, error) { - event := new(HopSwapStopRampA) - if err := _HopSwap.contract.UnpackLog(event, "StopRampA", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// HopSwapTokenSwapIterator is returned from FilterTokenSwap and is used to iterate over the raw logs and unpacked data for TokenSwap events raised by the HopSwap contract. -type HopSwapTokenSwapIterator struct { - Event *HopSwapTokenSwap // 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 *HopSwapTokenSwapIterator) 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(HopSwapTokenSwap) - 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(HopSwapTokenSwap) - 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 *HopSwapTokenSwapIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *HopSwapTokenSwapIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// HopSwapTokenSwap represents a TokenSwap event raised by the HopSwap contract. -type HopSwapTokenSwap struct { - Buyer common.Address - TokensSold *big.Int - TokensBought *big.Int - SoldId *big.Int - BoughtId *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTokenSwap is a free log retrieval operation binding the contract event 0xc6c1e0630dbe9130cc068028486c0d118ddcea348550819defd5cb8c257f8a38. -// -// Solidity: event TokenSwap(address indexed buyer, uint256 tokensSold, uint256 tokensBought, uint128 soldId, uint128 boughtId) -func (_HopSwap *HopSwapFilterer) FilterTokenSwap(opts *bind.FilterOpts, buyer []common.Address) (*HopSwapTokenSwapIterator, error) { - - var buyerRule []interface{} - for _, buyerItem := range buyer { - buyerRule = append(buyerRule, buyerItem) - } - - logs, sub, err := _HopSwap.contract.FilterLogs(opts, "TokenSwap", buyerRule) - if err != nil { - return nil, err - } - return &HopSwapTokenSwapIterator{contract: _HopSwap.contract, event: "TokenSwap", logs: logs, sub: sub}, nil -} - -// WatchTokenSwap is a free log subscription operation binding the contract event 0xc6c1e0630dbe9130cc068028486c0d118ddcea348550819defd5cb8c257f8a38. -// -// Solidity: event TokenSwap(address indexed buyer, uint256 tokensSold, uint256 tokensBought, uint128 soldId, uint128 boughtId) -func (_HopSwap *HopSwapFilterer) WatchTokenSwap(opts *bind.WatchOpts, sink chan<- *HopSwapTokenSwap, buyer []common.Address) (event.Subscription, error) { - - var buyerRule []interface{} - for _, buyerItem := range buyer { - buyerRule = append(buyerRule, buyerItem) - } - - logs, sub, err := _HopSwap.contract.WatchLogs(opts, "TokenSwap", buyerRule) - 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(HopSwapTokenSwap) - if err := _HopSwap.contract.UnpackLog(event, "TokenSwap", 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 -} - -// ParseTokenSwap is a log parse operation binding the contract event 0xc6c1e0630dbe9130cc068028486c0d118ddcea348550819defd5cb8c257f8a38. -// -// Solidity: event TokenSwap(address indexed buyer, uint256 tokensSold, uint256 tokensBought, uint128 soldId, uint128 boughtId) -func (_HopSwap *HopSwapFilterer) ParseTokenSwap(log types.Log) (*HopSwapTokenSwap, error) { - event := new(HopSwapTokenSwap) - if err := _HopSwap.contract.UnpackLog(event, "TokenSwap", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} diff --git a/contracts/hop/wrapper/l2AmmWrapper.go b/contracts/hop/wrapper/l2AmmWrapper.go deleted file mode 100644 index 51e37acce..000000000 --- a/contracts/hop/wrapper/l2AmmWrapper.go +++ /dev/null @@ -1,390 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package hopWrapper - -import ( - "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 ( - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription -) - -// HopWrapperABI is the input ABI used to generate the binding from. -const HopWrapperABI = "[{\"inputs\":[{\"internalType\":\"contractL2_Bridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contractIERC20\",\"name\":\"_l2CanonicalToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_l2CanonicalTokenIsEth\",\"type\":\"bool\"},{\"internalType\":\"contractIERC20\",\"name\":\"_hToken\",\"type\":\"address\"},{\"internalType\":\"contractSwap\",\"name\":\"_exchangeAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"attemptSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contractL2_Bridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"exchangeAddress\",\"outputs\":[{\"internalType\":\"contractSwap\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2CanonicalToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2CanonicalTokenIsEth\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"destinationAmountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"destinationDeadline\",\"type\":\"uint256\"}],\"name\":\"swapAndSend\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]" - -// HopWrapper is an auto generated Go binding around an Ethereum contract. -type HopWrapper struct { - HopWrapperCaller // Read-only binding to the contract - HopWrapperTransactor // Write-only binding to the contract - HopWrapperFilterer // Log filterer for contract events -} - -// HopWrapperCaller is an auto generated read-only Go binding around an Ethereum contract. -type HopWrapperCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// HopWrapperTransactor is an auto generated write-only Go binding around an Ethereum contract. -type HopWrapperTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// HopWrapperFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type HopWrapperFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// HopWrapperSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type HopWrapperSession struct { - Contract *HopWrapper // 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 -} - -// HopWrapperCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type HopWrapperCallerSession struct { - Contract *HopWrapperCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// HopWrapperTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type HopWrapperTransactorSession struct { - Contract *HopWrapperTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// HopWrapperRaw is an auto generated low-level Go binding around an Ethereum contract. -type HopWrapperRaw struct { - Contract *HopWrapper // Generic contract binding to access the raw methods on -} - -// HopWrapperCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type HopWrapperCallerRaw struct { - Contract *HopWrapperCaller // Generic read-only contract binding to access the raw methods on -} - -// HopWrapperTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type HopWrapperTransactorRaw struct { - Contract *HopWrapperTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewHopWrapper creates a new instance of HopWrapper, bound to a specific deployed contract. -func NewHopWrapper(address common.Address, backend bind.ContractBackend) (*HopWrapper, error) { - contract, err := bindHopWrapper(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &HopWrapper{HopWrapperCaller: HopWrapperCaller{contract: contract}, HopWrapperTransactor: HopWrapperTransactor{contract: contract}, HopWrapperFilterer: HopWrapperFilterer{contract: contract}}, nil -} - -// NewHopWrapperCaller creates a new read-only instance of HopWrapper, bound to a specific deployed contract. -func NewHopWrapperCaller(address common.Address, caller bind.ContractCaller) (*HopWrapperCaller, error) { - contract, err := bindHopWrapper(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &HopWrapperCaller{contract: contract}, nil -} - -// NewHopWrapperTransactor creates a new write-only instance of HopWrapper, bound to a specific deployed contract. -func NewHopWrapperTransactor(address common.Address, transactor bind.ContractTransactor) (*HopWrapperTransactor, error) { - contract, err := bindHopWrapper(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &HopWrapperTransactor{contract: contract}, nil -} - -// NewHopWrapperFilterer creates a new log filterer instance of HopWrapper, bound to a specific deployed contract. -func NewHopWrapperFilterer(address common.Address, filterer bind.ContractFilterer) (*HopWrapperFilterer, error) { - contract, err := bindHopWrapper(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &HopWrapperFilterer{contract: contract}, nil -} - -// bindHopWrapper binds a generic wrapper to an already deployed contract. -func bindHopWrapper(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(HopWrapperABI)) - 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 (_HopWrapper *HopWrapperRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _HopWrapper.Contract.HopWrapperCaller.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 (_HopWrapper *HopWrapperRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _HopWrapper.Contract.HopWrapperTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_HopWrapper *HopWrapperRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _HopWrapper.Contract.HopWrapperTransactor.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 (_HopWrapper *HopWrapperCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _HopWrapper.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 (_HopWrapper *HopWrapperTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _HopWrapper.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_HopWrapper *HopWrapperTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _HopWrapper.Contract.contract.Transact(opts, method, params...) -} - -// Bridge is a free data retrieval call binding the contract method 0xe78cea92. -// -// Solidity: function bridge() view returns(address) -func (_HopWrapper *HopWrapperCaller) Bridge(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _HopWrapper.contract.Call(opts, &out, "bridge") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// Bridge is a free data retrieval call binding the contract method 0xe78cea92. -// -// Solidity: function bridge() view returns(address) -func (_HopWrapper *HopWrapperSession) Bridge() (common.Address, error) { - return _HopWrapper.Contract.Bridge(&_HopWrapper.CallOpts) -} - -// Bridge is a free data retrieval call binding the contract method 0xe78cea92. -// -// Solidity: function bridge() view returns(address) -func (_HopWrapper *HopWrapperCallerSession) Bridge() (common.Address, error) { - return _HopWrapper.Contract.Bridge(&_HopWrapper.CallOpts) -} - -// ExchangeAddress is a free data retrieval call binding the contract method 0x9cd01605. -// -// Solidity: function exchangeAddress() view returns(address) -func (_HopWrapper *HopWrapperCaller) ExchangeAddress(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _HopWrapper.contract.Call(opts, &out, "exchangeAddress") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// ExchangeAddress is a free data retrieval call binding the contract method 0x9cd01605. -// -// Solidity: function exchangeAddress() view returns(address) -func (_HopWrapper *HopWrapperSession) ExchangeAddress() (common.Address, error) { - return _HopWrapper.Contract.ExchangeAddress(&_HopWrapper.CallOpts) -} - -// ExchangeAddress is a free data retrieval call binding the contract method 0x9cd01605. -// -// Solidity: function exchangeAddress() view returns(address) -func (_HopWrapper *HopWrapperCallerSession) ExchangeAddress() (common.Address, error) { - return _HopWrapper.Contract.ExchangeAddress(&_HopWrapper.CallOpts) -} - -// HToken is a free data retrieval call binding the contract method 0xfc6e3b3b. -// -// Solidity: function hToken() view returns(address) -func (_HopWrapper *HopWrapperCaller) HToken(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _HopWrapper.contract.Call(opts, &out, "hToken") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// HToken is a free data retrieval call binding the contract method 0xfc6e3b3b. -// -// Solidity: function hToken() view returns(address) -func (_HopWrapper *HopWrapperSession) HToken() (common.Address, error) { - return _HopWrapper.Contract.HToken(&_HopWrapper.CallOpts) -} - -// HToken is a free data retrieval call binding the contract method 0xfc6e3b3b. -// -// Solidity: function hToken() view returns(address) -func (_HopWrapper *HopWrapperCallerSession) HToken() (common.Address, error) { - return _HopWrapper.Contract.HToken(&_HopWrapper.CallOpts) -} - -// L2CanonicalToken is a free data retrieval call binding the contract method 0x1ee1bf67. -// -// Solidity: function l2CanonicalToken() view returns(address) -func (_HopWrapper *HopWrapperCaller) L2CanonicalToken(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _HopWrapper.contract.Call(opts, &out, "l2CanonicalToken") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// L2CanonicalToken is a free data retrieval call binding the contract method 0x1ee1bf67. -// -// Solidity: function l2CanonicalToken() view returns(address) -func (_HopWrapper *HopWrapperSession) L2CanonicalToken() (common.Address, error) { - return _HopWrapper.Contract.L2CanonicalToken(&_HopWrapper.CallOpts) -} - -// L2CanonicalToken is a free data retrieval call binding the contract method 0x1ee1bf67. -// -// Solidity: function l2CanonicalToken() view returns(address) -func (_HopWrapper *HopWrapperCallerSession) L2CanonicalToken() (common.Address, error) { - return _HopWrapper.Contract.L2CanonicalToken(&_HopWrapper.CallOpts) -} - -// L2CanonicalTokenIsEth is a free data retrieval call binding the contract method 0x28555125. -// -// Solidity: function l2CanonicalTokenIsEth() view returns(bool) -func (_HopWrapper *HopWrapperCaller) L2CanonicalTokenIsEth(opts *bind.CallOpts) (bool, error) { - var out []interface{} - err := _HopWrapper.contract.Call(opts, &out, "l2CanonicalTokenIsEth") - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// L2CanonicalTokenIsEth is a free data retrieval call binding the contract method 0x28555125. -// -// Solidity: function l2CanonicalTokenIsEth() view returns(bool) -func (_HopWrapper *HopWrapperSession) L2CanonicalTokenIsEth() (bool, error) { - return _HopWrapper.Contract.L2CanonicalTokenIsEth(&_HopWrapper.CallOpts) -} - -// L2CanonicalTokenIsEth is a free data retrieval call binding the contract method 0x28555125. -// -// Solidity: function l2CanonicalTokenIsEth() view returns(bool) -func (_HopWrapper *HopWrapperCallerSession) L2CanonicalTokenIsEth() (bool, error) { - return _HopWrapper.Contract.L2CanonicalTokenIsEth(&_HopWrapper.CallOpts) -} - -// AttemptSwap is a paid mutator transaction binding the contract method 0x676c5ef6. -// -// Solidity: function attemptSwap(address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline) returns() -func (_HopWrapper *HopWrapperTransactor) AttemptSwap(opts *bind.TransactOpts, recipient common.Address, amount *big.Int, amountOutMin *big.Int, deadline *big.Int) (*types.Transaction, error) { - return _HopWrapper.contract.Transact(opts, "attemptSwap", recipient, amount, amountOutMin, deadline) -} - -// AttemptSwap is a paid mutator transaction binding the contract method 0x676c5ef6. -// -// Solidity: function attemptSwap(address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline) returns() -func (_HopWrapper *HopWrapperSession) AttemptSwap(recipient common.Address, amount *big.Int, amountOutMin *big.Int, deadline *big.Int) (*types.Transaction, error) { - return _HopWrapper.Contract.AttemptSwap(&_HopWrapper.TransactOpts, recipient, amount, amountOutMin, deadline) -} - -// AttemptSwap is a paid mutator transaction binding the contract method 0x676c5ef6. -// -// Solidity: function attemptSwap(address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline) returns() -func (_HopWrapper *HopWrapperTransactorSession) AttemptSwap(recipient common.Address, amount *big.Int, amountOutMin *big.Int, deadline *big.Int) (*types.Transaction, error) { - return _HopWrapper.Contract.AttemptSwap(&_HopWrapper.TransactOpts, recipient, amount, amountOutMin, deadline) -} - -// SwapAndSend is a paid mutator transaction binding the contract method 0xeea0d7b2. -// -// Solidity: function swapAndSend(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee, uint256 amountOutMin, uint256 deadline, uint256 destinationAmountOutMin, uint256 destinationDeadline) payable returns() -func (_HopWrapper *HopWrapperTransactor) SwapAndSend(opts *bind.TransactOpts, chainId *big.Int, recipient common.Address, amount *big.Int, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int, destinationAmountOutMin *big.Int, destinationDeadline *big.Int) (*types.Transaction, error) { - return _HopWrapper.contract.Transact(opts, "swapAndSend", chainId, recipient, amount, bonderFee, amountOutMin, deadline, destinationAmountOutMin, destinationDeadline) -} - -// SwapAndSend is a paid mutator transaction binding the contract method 0xeea0d7b2. -// -// Solidity: function swapAndSend(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee, uint256 amountOutMin, uint256 deadline, uint256 destinationAmountOutMin, uint256 destinationDeadline) payable returns() -func (_HopWrapper *HopWrapperSession) SwapAndSend(chainId *big.Int, recipient common.Address, amount *big.Int, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int, destinationAmountOutMin *big.Int, destinationDeadline *big.Int) (*types.Transaction, error) { - return _HopWrapper.Contract.SwapAndSend(&_HopWrapper.TransactOpts, chainId, recipient, amount, bonderFee, amountOutMin, deadline, destinationAmountOutMin, destinationDeadline) -} - -// SwapAndSend is a paid mutator transaction binding the contract method 0xeea0d7b2. -// -// Solidity: function swapAndSend(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee, uint256 amountOutMin, uint256 deadline, uint256 destinationAmountOutMin, uint256 destinationDeadline) payable returns() -func (_HopWrapper *HopWrapperTransactorSession) SwapAndSend(chainId *big.Int, recipient common.Address, amount *big.Int, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int, destinationAmountOutMin *big.Int, destinationDeadline *big.Int) (*types.Transaction, error) { - return _HopWrapper.Contract.SwapAndSend(&_HopWrapper.TransactOpts, chainId, recipient, amount, bonderFee, amountOutMin, deadline, destinationAmountOutMin, destinationDeadline) -} - -// Receive is a paid mutator transaction binding the contract receive function. -// -// Solidity: receive() payable returns() -func (_HopWrapper *HopWrapperTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { - return _HopWrapper.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 (_HopWrapper *HopWrapperSession) Receive() (*types.Transaction, error) { - return _HopWrapper.Contract.Receive(&_HopWrapper.TransactOpts) -} - -// Receive is a paid mutator transaction binding the contract receive function. -// -// Solidity: receive() payable returns() -func (_HopWrapper *HopWrapperTransactorSession) Receive() (*types.Transaction, error) { - return _HopWrapper.Contract.Receive(&_HopWrapper.TransactOpts) -} diff --git a/services/wallet/bridge/bridge.go b/services/wallet/bridge/bridge.go index 362418198..55b65c487 100644 --- a/services/wallet/bridge/bridge.go +++ b/services/wallet/bridge/bridge.go @@ -108,11 +108,11 @@ type Bridge interface { // calculates the fees for the bridge and returns the amount BonderFee and TokenFee (used for bridges) CalculateFees(from, to *params.Network, token *token.Token, amountIn *big.Int) (*big.Int, *big.Int, error) // Pack the method for sending tx and method call's data - PackTxInputData(fromNetwork *params.Network, toNetwork *params.Network, from common.Address, to common.Address, token *token.Token, amountIn *big.Int) ([]byte, error) + PackTxInputData(contractType string, fromNetwork *params.Network, toNetwork *params.Network, from common.Address, to common.Address, token *token.Token, amountIn *big.Int) ([]byte, error) EstimateGas(fromNetwork *params.Network, toNetwork *params.Network, from common.Address, to common.Address, token *token.Token, toToken *token.Token, amountIn *big.Int) (uint64, error) CalculateAmountOut(from, to *params.Network, amountIn *big.Int, symbol string) (*big.Int, error) Send(sendArgs *TransactionBridge, verifiedAccount *account.SelectedExtKey) (types.Hash, error) - GetContractAddress(network *params.Network, token *token.Token) *common.Address + GetContractAddress(network *params.Network, token *token.Token) (common.Address, error) BuildTransaction(sendArgs *TransactionBridge) (*ethTypes.Transaction, error) BuildTx(fromNetwork, toNetwork *params.Network, fromAddress common.Address, toAddress common.Address, token *token.Token, amountIn *big.Int, bonderFee *big.Int) (*ethTypes.Transaction, error) } diff --git a/services/wallet/bridge/cbridge.go b/services/wallet/bridge/cbridge.go index c204ce998..3ae3ad5d0 100644 --- a/services/wallet/bridge/cbridge.go +++ b/services/wallet/bridge/cbridge.go @@ -196,7 +196,7 @@ func (s *CBridge) CalculateFees(from, to *params.Network, token *token.Token, am return big.NewInt(0), new(big.Int).Add(baseFee, percFee), nil } -func (c *CBridge) PackTxInputData(fromNetwork *params.Network, toNetwork *params.Network, from common.Address, to common.Address, token *token.Token, amountIn *big.Int) ([]byte, error) { +func (c *CBridge) PackTxInputData(contractType string, fromNetwork *params.Network, toNetwork *params.Network, from common.Address, to common.Address, token *token.Token, amountIn *big.Int) ([]byte, error) { abi, err := abi.JSON(strings.NewReader(celer.CelerABI)) if err != nil { return []byte{}, err @@ -225,14 +225,14 @@ func (c *CBridge) PackTxInputData(fromNetwork *params.Network, toNetwork *params func (s *CBridge) EstimateGas(fromNetwork *params.Network, toNetwork *params.Network, from common.Address, to common.Address, token *token.Token, toToken *token.Token, amountIn *big.Int) (uint64, error) { value := new(big.Int) - input, err := s.PackTxInputData(fromNetwork, toNetwork, from, to, token, amountIn) + input, err := s.PackTxInputData("", fromNetwork, toNetwork, from, to, token, amountIn) if err != nil { return 0, err } - contractAddress := s.GetContractAddress(fromNetwork, nil) - if contractAddress == nil { - return 0, errors.New("contract not found") + contractAddress, err := s.GetContractAddress(fromNetwork, nil) + if err != nil { + return 0, err } ethClient, err := s.rpcClient.EthClient(fromNetwork.ChainID) @@ -242,15 +242,9 @@ func (s *CBridge) EstimateGas(fromNetwork *params.Network, toNetwork *params.Net ctx := context.Background() - if code, err := ethClient.PendingCodeAt(ctx, *contractAddress); err != nil { - return 0, err - } else if len(code) == 0 { - return 0, bind.ErrNoCode - } - msg := ethereum.CallMsg{ From: from, - To: contractAddress, + To: &contractAddress, Value: value, Data: input, } @@ -284,23 +278,22 @@ func (s *CBridge) BuildTx(fromNetwork, toNetwork *params.Network, fromAddress co return s.BuildTransaction(sendArgs) } -func (s *CBridge) GetContractAddress(network *params.Network, token *token.Token) *common.Address { +func (s *CBridge) GetContractAddress(network *params.Network, token *token.Token) (common.Address, error) { transferConfig, err := s.getTransferConfig(network.IsTest) if err != nil { - return nil + return common.Address{}, err } if transferConfig.Err != nil { - return nil + return common.Address{}, errors.New(transferConfig.Err.Msg) } for _, chain := range transferConfig.Chains { if uint64(chain.Id) == network.ChainID { - addr := common.HexToAddress(chain.ContractAddr) - return &addr + return common.HexToAddress(chain.ContractAddr), nil } } - return nil + return common.Address{}, errors.New("contract not found") } func (s *CBridge) sendOrBuild(sendArgs *TransactionBridge, signerFn bind.SignerFn) (*ethTypes.Transaction, error) { @@ -312,16 +305,16 @@ func (s *CBridge) sendOrBuild(sendArgs *TransactionBridge, signerFn bind.SignerF if token == nil { return nil, errors.New("token not found") } - addrs := s.GetContractAddress(fromNetwork, nil) - if addrs == nil { - return nil, errors.New("contract not found") + addrs, err := s.GetContractAddress(fromNetwork, nil) + if err != nil { + return nil, err } backend, err := s.rpcClient.EthClient(sendArgs.ChainID) if err != nil { return nil, err } - contract, err := celer.NewCeler(*addrs, backend) + contract, err := celer.NewCeler(addrs, backend) if err != nil { return nil, err } diff --git a/services/wallet/bridge/erc1155_transfer.go b/services/wallet/bridge/erc1155_transfer.go index 60f1074ab..1e784faf3 100644 --- a/services/wallet/bridge/erc1155_transfer.go +++ b/services/wallet/bridge/erc1155_transfer.go @@ -49,7 +49,7 @@ func (s *ERC1155TransferBridge) CalculateFees(from, to *params.Network, token *t return big.NewInt(0), big.NewInt(0), nil } -func (s *ERC1155TransferBridge) PackTxInputData(fromNetwork *params.Network, toNetwork *params.Network, from common.Address, to common.Address, token *token.Token, amountIn *big.Int) ([]byte, error) { +func (s *ERC1155TransferBridge) PackTxInputData(contractType string, fromNetwork *params.Network, toNetwork *params.Network, from common.Address, to common.Address, token *token.Token, amountIn *big.Int) ([]byte, error) { abi, err := abi.JSON(strings.NewReader(ierc1155.Ierc1155ABI)) if err != nil { return []byte{}, err @@ -77,7 +77,7 @@ func (s *ERC1155TransferBridge) EstimateGas(fromNetwork *params.Network, toNetwo value := new(big.Int) - input, err := s.PackTxInputData(fromNetwork, toNetwork, from, to, token, amountIn) + input, err := s.PackTxInputData("", fromNetwork, toNetwork, from, to, token, amountIn) if err != nil { return 0, err } @@ -177,6 +177,6 @@ func (s *ERC1155TransferBridge) CalculateAmountOut(from, to *params.Network, amo return amountIn, nil } -func (s *ERC1155TransferBridge) GetContractAddress(network *params.Network, token *token.Token) *common.Address { - return &token.Address +func (s *ERC1155TransferBridge) GetContractAddress(network *params.Network, token *token.Token) (common.Address, error) { + return token.Address, nil } diff --git a/services/wallet/bridge/erc721_transfer.go b/services/wallet/bridge/erc721_transfer.go index abae47144..8fc76bdf9 100644 --- a/services/wallet/bridge/erc721_transfer.go +++ b/services/wallet/bridge/erc721_transfer.go @@ -48,7 +48,7 @@ func (s *ERC721TransferBridge) CalculateFees(from, to *params.Network, token *to return big.NewInt(0), big.NewInt(0), nil } -func (s *ERC721TransferBridge) PackTxInputData(fromNetwork *params.Network, toNetwork *params.Network, from common.Address, to common.Address, token *token.Token, amountIn *big.Int) ([]byte, error) { +func (s *ERC721TransferBridge) PackTxInputData(contractType string, fromNetwork *params.Network, toNetwork *params.Network, from common.Address, to common.Address, token *token.Token, amountIn *big.Int) ([]byte, error) { abi, err := abi.JSON(strings.NewReader(collectibles.CollectiblesMetaData.ABI)) if err != nil { return []byte{}, err @@ -74,7 +74,7 @@ func (s *ERC721TransferBridge) EstimateGas(fromNetwork *params.Network, toNetwor value := new(big.Int) - input, err := s.PackTxInputData(fromNetwork, toNetwork, from, to, token, amountIn) + input, err := s.PackTxInputData("", fromNetwork, toNetwork, from, to, token, amountIn) if err != nil { return 0, err } @@ -169,6 +169,6 @@ func (s *ERC721TransferBridge) CalculateAmountOut(from, to *params.Network, amou return amountIn, nil } -func (s *ERC721TransferBridge) GetContractAddress(network *params.Network, token *token.Token) *common.Address { - return &token.Address +func (s *ERC721TransferBridge) GetContractAddress(network *params.Network, token *token.Token) (common.Address, error) { + return token.Address, nil } diff --git a/services/wallet/bridge/hop.go b/services/wallet/bridge/hop.go index 102369a09..a7406f433 100644 --- a/services/wallet/bridge/hop.go +++ b/services/wallet/bridge/hop.go @@ -8,7 +8,6 @@ import ( "math/big" netUrl "net/url" "strings" - "time" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi" @@ -19,11 +18,18 @@ import ( "github.com/status-im/status-go/account" "github.com/status-im/status-go/contracts" "github.com/status-im/status-go/contracts/hop" - hopBridge "github.com/status-im/status-go/contracts/hop/bridge" - hopWrapper "github.com/status-im/status-go/contracts/hop/wrapper" + hopL1CctpImplementation "github.com/status-im/status-go/contracts/hop/l1Contracts/l1CctpImplementation" + hopL1Erc20Bridge "github.com/status-im/status-go/contracts/hop/l1Contracts/l1Erc20Bridge" + hopL1EthBridge "github.com/status-im/status-go/contracts/hop/l1Contracts/l1EthBridge" + hopL1HopBridge "github.com/status-im/status-go/contracts/hop/l1Contracts/l1HopBridge" + hopL2AmmWrapper "github.com/status-im/status-go/contracts/hop/l2Contracts/l2AmmWrapper" + hopL2ArbitrumBridge "github.com/status-im/status-go/contracts/hop/l2Contracts/l2ArbitrumBridge" + hopL2CctpImplementation "github.com/status-im/status-go/contracts/hop/l2Contracts/l2CctpImplementation" + hopL2OptimismBridge "github.com/status-im/status-go/contracts/hop/l2Contracts/l2OptimismBridge" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/params" "github.com/status-im/status-go/rpc" + "github.com/status-im/status-go/rpc/chain" "github.com/status-im/status-go/services/wallet/bigint" walletCommon "github.com/status-im/status-go/services/wallet/common" "github.com/status-im/status-go/services/wallet/thirdparty" @@ -31,7 +37,10 @@ import ( "github.com/status-im/status-go/transactions" ) -const SevenDaysInSeconds = 604800 +const ( + SevenDaysInSeconds = 604800 + hopSymbol = "HOP" +) type HopTxArgs struct { transactions.SendTxArgs @@ -119,66 +128,76 @@ func (h *HopBridge) Name() string { } func (h *HopBridge) AvailableFor(from, to *params.Network, token *token.Token, toToken *token.Token) (bool, error) { - if from.ChainID == to.ChainID || toToken != nil { - return false, nil - } - - // currently Hop bridge is not available for testnets - if from.IsTest || to.IsTest { - return false, nil - } - - return true, nil + // We chcek if the contract is available on the network for the token + _, err := h.GetContractAddress(from, token) + // toToken is not nil only if the send type is Swap + return err == nil && toToken == nil, nil } -func (h *HopBridge) PackTxInputData(fromNetwork *params.Network, toNetwork *params.Network, from common.Address, to common.Address, token *token.Token, amountIn *big.Int) ([]byte, error) { - if fromNetwork.Layer == 1 { - ABI, err := abi.JSON(strings.NewReader(hopBridge.HopBridgeABI)) - if err != nil { - return []byte{}, err +func (c *HopBridge) getAppropriateABI(contractType string, chainID uint64, token *token.Token) (abi.ABI, error) { + switch contractType { + case hop.CctpL1Bridge: + return abi.JSON(strings.NewReader(hopL1CctpImplementation.HopL1CctpImplementationABI)) + case hop.L1Bridge: + if token.IsNative() { + return abi.JSON(strings.NewReader(hopL1EthBridge.HopL1EthBridgeABI)) } - - return ABI.Pack("sendToL2", - big.NewInt(int64(toNetwork.ChainID)), - to, - h.bonderFee.AmountIn.Int, - h.bonderFee.AmountOutMin.Int, - big.NewInt(h.bonderFee.Deadline), - common.HexToAddress("0x0"), - big.NewInt(0)) - } else { - ABI, err := abi.JSON(strings.NewReader(hopWrapper.HopWrapperABI)) - if err != nil { - return []byte{}, err + if token.Symbol == hopSymbol { + return abi.JSON(strings.NewReader(hopL1HopBridge.HopL1HopBridgeABI)) + } + return abi.JSON(strings.NewReader(hopL1Erc20Bridge.HopL1Erc20BridgeABI)) + case hop.L2AmmWrapper: + return abi.JSON(strings.NewReader(hopL2AmmWrapper.HopL2AmmWrapperABI)) + case hop.CctpL2Bridge: + return abi.JSON(strings.NewReader(hopL2CctpImplementation.HopL2CctpImplementationABI)) + case hop.L2Bridge: + if chainID == walletCommon.OptimismMainnet || + chainID == walletCommon.OptimismSepolia { + return abi.JSON(strings.NewReader(hopL2OptimismBridge.HopL2OptimismBridgeABI)) + } + if chainID == walletCommon.ArbitrumMainnet || + chainID == walletCommon.ArbitrumSepolia { + return abi.JSON(strings.NewReader(hopL2ArbitrumBridge.HopL2ArbitrumBridgeABI)) } - - return ABI.Pack("swapAndSend", - big.NewInt(int64(toNetwork.ChainID)), - to, - h.bonderFee.AmountIn.Int, - h.bonderFee.BonderFee.Int, - h.bonderFee.AmountOutMin.Int, - big.NewInt(h.bonderFee.Deadline), - h.bonderFee.DestinationAmountOutMin.Int, - big.NewInt(h.bonderFee.DestinationDeadline)) } + + return abi.ABI{}, errors.New("not available for contract type") +} + +func (h *HopBridge) PackTxInputData(contractType string, fromNetwork *params.Network, toNetwork *params.Network, from common.Address, to common.Address, token *token.Token, amountIn *big.Int) ([]byte, error) { + abi, err := h.getAppropriateABI(contractType, fromNetwork.ChainID, token) + if err != nil { + return []byte{}, err + } + + switch contractType { + case hop.CctpL1Bridge: + return h.packCctpL1BridgeTx(abi, toNetwork.ChainID, to) + case hop.L1Bridge: + return h.packL1BridgeTx(abi, toNetwork.ChainID, to) + case hop.L2AmmWrapper: + return h.packL2AmmWrapperTx(abi, toNetwork.ChainID, to) + case hop.CctpL2Bridge: + return h.packCctpL2BridgeTx(abi, toNetwork.ChainID, to) + case hop.L2Bridge: + return h.packL2BridgeTx(abi, toNetwork.ChainID, to) + } + + return []byte{}, errors.New("contract type not supported yet") } func (h *HopBridge) EstimateGas(fromNetwork *params.Network, toNetwork *params.Network, from common.Address, to common.Address, token *token.Token, toToken *token.Token, amountIn *big.Int) (uint64, error) { - value := new(big.Int) - + value := big.NewInt(0) if token.IsNative() { value = amountIn } - contractAddress := h.GetContractAddress(fromNetwork, token) - if contractAddress == nil { - return 0, errors.New("contract not found") + contractAddress, contractType, err := hop.GetContractAddress(fromNetwork.ChainID, token.Symbol) + if err != nil { + return 0, err } - ctx := context.Background() - - input, err := h.PackTxInputData(fromNetwork, toNetwork, from, to, token, amountIn) + input, err := h.PackTxInputData(contractType, fromNetwork, toNetwork, from, to, token, amountIn) if err != nil { return 0, err } @@ -188,23 +207,18 @@ func (h *HopBridge) EstimateGas(fromNetwork *params.Network, toNetwork *params.N return 0, err } - if code, err := ethClient.PendingCodeAt(ctx, *contractAddress); err != nil { - return 0, err - } else if len(code) == 0 { - return 0, bind.ErrNoCode - } - msg := ethereum.CallMsg{ From: from, - To: contractAddress, + To: &contractAddress, Value: value, Data: input, } - estimation, err := ethClient.EstimateGas(ctx, msg) + estimation, err := ethClient.EstimateGas(context.Background(), msg) if err != nil { return 0, err } + increasedEstimation := float64(estimation) * IncreaseEstimatedGasFactor return uint64(increasedEstimation), nil } @@ -231,15 +245,9 @@ func (h *HopBridge) BuildTx(fromNetwork, toNetwork *params.Network, fromAddress return h.BuildTransaction(sendArgs) } -func (h *HopBridge) GetContractAddress(network *params.Network, token *token.Token) *common.Address { - var address common.Address - if network.Layer == 1 { - address, _ = hop.L1BridgeContractAddress(network.ChainID, token.Symbol) - } else { - address, _ = hop.L2AmmWrapperContractAddress(network.ChainID, token.Symbol) - } - - return &address +func (h *HopBridge) GetContractAddress(network *params.Network, token *token.Token) (common.Address, error) { + address, _, err := hop.GetContractAddress(network.ChainID, token.Symbol) + return address, err } func (h *HopBridge) sendOrBuild(sendArgs *TransactionBridge, signerFn bind.SignerFn) (tx *ethTypes.Transaction, err error) { @@ -248,6 +256,8 @@ func (h *HopBridge) sendOrBuild(sendArgs *TransactionBridge, signerFn bind.Signe return tx, fmt.Errorf("ChainID not supported %d", sendArgs.ChainID) } + token := h.tokenManager.FindToken(fromNetwork, sendArgs.HopTx.Symbol) + nonce, err := h.transactor.NextNonce(h.contractMaker.RPCClient, fromNetwork.ChainID, sendArgs.HopTx.From) if err != nil { return tx, err @@ -256,12 +266,34 @@ func (h *HopBridge) sendOrBuild(sendArgs *TransactionBridge, signerFn bind.Signe argNonce := hexutil.Uint64(nonce) sendArgs.HopTx.Nonce = &argNonce - token := h.tokenManager.FindToken(fromNetwork, sendArgs.HopTx.Symbol) - if fromNetwork.Layer == 1 { - tx, err = h.sendToL2(sendArgs.ChainID, sendArgs.HopTx, signerFn, token) + txOpts := sendArgs.HopTx.ToTransactOpts(signerFn) + if token.IsNative() { + txOpts.Value = (*big.Int)(sendArgs.HopTx.Amount) + } + + ethClient, err := h.contractMaker.RPCClient.EthClient(fromNetwork.ChainID) + if err != nil { return tx, err } - tx, err = h.swapAndSend(sendArgs.ChainID, sendArgs.HopTx, signerFn, token) + + contractAddress, contractType, err := hop.GetContractAddress(fromNetwork.ChainID, sendArgs.HopTx.Symbol) + if err != nil { + return tx, err + } + + switch contractType { + case hop.CctpL1Bridge: + return h.sendCctpL1BridgeTx(contractAddress, ethClient, sendArgs.HopTx.ChainID, sendArgs.HopTx.Recipient, txOpts) + case hop.L1Bridge: + return h.sendL1BridgeTx(contractAddress, ethClient, sendArgs.HopTx.ChainID, sendArgs.HopTx.Recipient, txOpts, token) + case hop.L2AmmWrapper: + return h.sendL2AmmWrapperTx(contractAddress, ethClient, sendArgs.HopTx.ChainID, sendArgs.HopTx.Recipient, txOpts) + case hop.CctpL2Bridge: + return h.sendCctpL2BridgeTx(contractAddress, ethClient, sendArgs.HopTx.ChainID, sendArgs.HopTx.Recipient, txOpts) + case hop.L2Bridge: + return h.sendL2BridgeTx(contractAddress, ethClient, sendArgs.HopTx.ChainID, sendArgs.HopTx.Recipient, txOpts) + } + return tx, err } @@ -277,95 +309,6 @@ func (h *HopBridge) BuildTransaction(sendArgs *TransactionBridge) (*ethTypes.Tra return h.sendOrBuild(sendArgs, nil) } -func (h *HopBridge) sendToL2(chainID uint64, hopArgs *HopTxArgs, signerFn bind.SignerFn, token *token.Token) (tx *ethTypes.Transaction, err error) { - bridge, err := h.contractMaker.NewHopL1Bridge(chainID, hopArgs.Symbol) - if err != nil { - return tx, err - } - txOpts := hopArgs.ToTransactOpts(signerFn) - if token.IsNative() { - txOpts.Value = (*big.Int)(hopArgs.Amount) - } - - var ( - deadline *big.Int - amountOutMin *big.Int - ) - - if h.bonderFee != nil { - deadline = big.NewInt(h.bonderFee.Deadline) - amountOutMin = h.bonderFee.AmountOutMin.Int - } else { - now := time.Now() - deadline = big.NewInt(now.Unix() + SevenDaysInSeconds) - } - - tx, err = bridge.SendToL2( - txOpts, - big.NewInt(int64(hopArgs.ChainID)), - hopArgs.Recipient, - hopArgs.Amount.ToInt(), - amountOutMin, - deadline, - common.HexToAddress("0x0"), - big.NewInt(0), - ) - - return tx, err -} - -func (h *HopBridge) swapAndSend(chainID uint64, hopArgs *HopTxArgs, signerFn bind.SignerFn, token *token.Token) (tx *ethTypes.Transaction, err error) { - ammWrapper, err := h.contractMaker.NewHopL2AmmWrapper(chainID, hopArgs.Symbol) - if err != nil { - return tx, err - } - - toNetwork := h.contractMaker.RPCClient.NetworkManager.Find(hopArgs.ChainID) - if toNetwork == nil { - return tx, err - } - - txOpts := hopArgs.ToTransactOpts(signerFn) - if token.IsNative() { - txOpts.Value = (*big.Int)(hopArgs.Amount) - } - - var deadline *big.Int - amountOutMin := big.NewInt(0) - destinationDeadline := big.NewInt(0) - destinationAmountOutMin := big.NewInt(0) - - // https://docs.hop.exchange/v/developer-docs/smart-contracts/integration#l2-greater-than-l1-and-l2-greater-than-l2 - // Do not set `destinationAmountOutMin` and `destinationDeadline` when sending to L1 because there is no AMM on L1, - // otherwise the computed transferId will be invalid and the transfer will be unbondable. These parameters should be set to 0 when sending to L1. - if h.bonderFee != nil { - deadline = big.NewInt(h.bonderFee.Deadline) - amountOutMin = h.bonderFee.AmountOutMin.Int - destinationDeadline = big.NewInt(h.bonderFee.DestinationDeadline) - destinationAmountOutMin = h.bonderFee.DestinationAmountOutMin.Int - } else { - now := time.Now() - deadline = big.NewInt(now.Unix() + SevenDaysInSeconds) - if toNetwork.Layer != 1 { - destinationDeadline = big.NewInt(now.Unix() + SevenDaysInSeconds) - } - } - - tx, err = ammWrapper.SwapAndSend( - txOpts, - new(big.Int).SetUint64(hopArgs.ChainID), - hopArgs.Recipient, - hopArgs.Amount.ToInt(), - hopArgs.BonderFee.ToInt(), - amountOutMin, - deadline, - destinationAmountOutMin, - destinationDeadline, - ) - - return tx, err -} - func (h *HopBridge) CalculateFees(from, to *params.Network, token *token.Token, amountIn *big.Int) (*big.Int, *big.Int, error) { hopChainsMap := map[uint64]string{ walletCommon.EthereumMainnet: "ethereum", @@ -402,7 +345,10 @@ func (h *HopBridge) CalculateFees(from, to *params.Network, token *token.Token, return nil, nil, err } - tokenFee := new(big.Int).Sub(h.bonderFee.AmountIn.Int, h.bonderFee.EstimatedRecieved.Int) + // Remove token fee from bonder fee as said here: + // https://docs.hop.exchange/v/developer-docs/api/api#get-v1-quote + // `bonderFee` - The suggested bonder fee for the amount in. The bonder fee also includes the cost of the destination transaction fee. + tokenFee := big.NewInt(0) //new(big.Int).Sub(h.bonderFee.AmountIn.Int, h.bonderFee.EstimatedRecieved.Int) return h.bonderFee.BonderFee.Int, tokenFee, nil } @@ -410,3 +356,213 @@ func (h *HopBridge) CalculateFees(from, to *params.Network, token *token.Token, func (h *HopBridge) CalculateAmountOut(from, to *params.Network, amountIn *big.Int, symbol string) (*big.Int, error) { return h.bonderFee.EstimatedRecieved.Int, nil } + +func (h *HopBridge) packCctpL1BridgeTx(abi abi.ABI, toChainID uint64, to common.Address) ([]byte, error) { + return abi.Pack("send", + big.NewInt(int64(toChainID)), + to, + h.bonderFee.AmountIn.Int, + h.bonderFee.BonderFee.Int) +} + +func (h *HopBridge) sendCctpL1BridgeTx(contractAddress common.Address, ethClient chain.ClientInterface, toChainID uint64, to common.Address, txOpts *bind.TransactOpts) (tx *ethTypes.Transaction, err error) { + contractInstance, err := hopL1CctpImplementation.NewHopL1CctpImplementation( + contractAddress, + ethClient, + ) + if err != nil { + return tx, err + } + + return contractInstance.Send( + txOpts, + big.NewInt(int64(toChainID)), + to, + h.bonderFee.AmountIn.Int, + h.bonderFee.BonderFee.Int) +} + +func (h *HopBridge) packL1BridgeTx(abi abi.ABI, toChainID uint64, to common.Address) ([]byte, error) { + return abi.Pack("sendToL2", + big.NewInt(int64(toChainID)), + to, + h.bonderFee.AmountIn.Int, + h.bonderFee.AmountOutMin.Int, + big.NewInt(h.bonderFee.Deadline), + common.Address{}, + big.NewInt(0)) +} + +func (h *HopBridge) sendL1BridgeTx(contractAddress common.Address, ethClient chain.ClientInterface, toChainID uint64, to common.Address, txOpts *bind.TransactOpts, token *token.Token) (tx *ethTypes.Transaction, err error) { + if token.IsNative() { + contractInstance, err := hopL1EthBridge.NewHopL1EthBridge( + contractAddress, + ethClient, + ) + if err != nil { + return tx, err + } + + return contractInstance.SendToL2( + txOpts, + big.NewInt(int64(toChainID)), + to, + h.bonderFee.AmountIn.Int, + h.bonderFee.AmountOutMin.Int, + big.NewInt(h.bonderFee.Deadline), + common.Address{}, + big.NewInt(0)) + } + + if token.Symbol == hopSymbol { + contractInstance, err := hopL1HopBridge.NewHopL1HopBridge( + contractAddress, + ethClient, + ) + if err != nil { + return tx, err + } + + return contractInstance.SendToL2( + txOpts, + big.NewInt(int64(toChainID)), + to, + h.bonderFee.AmountIn.Int, + h.bonderFee.AmountOutMin.Int, + big.NewInt(h.bonderFee.Deadline), + common.Address{}, + big.NewInt(0)) + } + + contractInstance, err := hopL1Erc20Bridge.NewHopL1Erc20Bridge( + contractAddress, + ethClient, + ) + if err != nil { + return tx, err + } + + return contractInstance.SendToL2( + txOpts, + big.NewInt(int64(toChainID)), + to, + h.bonderFee.AmountIn.Int, + h.bonderFee.AmountOutMin.Int, + big.NewInt(h.bonderFee.Deadline), + common.Address{}, + big.NewInt(0)) + +} + +func (h *HopBridge) packCctpL2BridgeTx(abi abi.ABI, toChainID uint64, to common.Address) ([]byte, error) { + return abi.Pack("send", + big.NewInt(int64(toChainID)), + to, + h.bonderFee.AmountIn.Int, + h.bonderFee.BonderFee.Int) +} + +func (h *HopBridge) sendCctpL2BridgeTx(contractAddress common.Address, ethClient chain.ClientInterface, toChainID uint64, to common.Address, txOpts *bind.TransactOpts) (tx *ethTypes.Transaction, err error) { + contractInstance, err := hopL2CctpImplementation.NewHopL2CctpImplementation( + contractAddress, + ethClient, + ) + if err != nil { + return tx, err + } + + return contractInstance.Send( + txOpts, + big.NewInt(int64(toChainID)), + to, + h.bonderFee.AmountIn.Int, + h.bonderFee.BonderFee.Int, + ) +} + +func (h *HopBridge) packL2AmmWrapperTx(abi abi.ABI, toChainID uint64, to common.Address) ([]byte, error) { + return abi.Pack("swapAndSend", + big.NewInt(int64(toChainID)), + to, + h.bonderFee.AmountIn.Int, + h.bonderFee.BonderFee.Int, + h.bonderFee.AmountOutMin.Int, + big.NewInt(h.bonderFee.Deadline), + h.bonderFee.DestinationAmountOutMin.Int, + big.NewInt(h.bonderFee.DestinationDeadline)) +} + +func (h *HopBridge) sendL2AmmWrapperTx(contractAddress common.Address, ethClient chain.ClientInterface, toChainID uint64, to common.Address, txOpts *bind.TransactOpts) (tx *ethTypes.Transaction, err error) { + contractInstance, err := hopL2AmmWrapper.NewHopL2AmmWrapper( + contractAddress, + ethClient, + ) + if err != nil { + return tx, err + } + + return contractInstance.SwapAndSend( + txOpts, + big.NewInt(int64(toChainID)), + to, + h.bonderFee.AmountIn.Int, + h.bonderFee.BonderFee.Int, + h.bonderFee.AmountOutMin.Int, + big.NewInt(h.bonderFee.Deadline), + h.bonderFee.DestinationAmountOutMin.Int, + big.NewInt(h.bonderFee.DestinationDeadline)) +} + +func (h *HopBridge) packL2BridgeTx(abi abi.ABI, toChainID uint64, to common.Address) ([]byte, error) { + return abi.Pack("send", + big.NewInt(int64(toChainID)), + to, + h.bonderFee.AmountIn.Int, + h.bonderFee.BonderFee.Int, + h.bonderFee.AmountOutMin.Int, + big.NewInt(h.bonderFee.Deadline)) +} + +func (h *HopBridge) sendL2BridgeTx(contractAddress common.Address, ethClient chain.ClientInterface, toChainID uint64, to common.Address, txOpts *bind.TransactOpts) (tx *ethTypes.Transaction, err error) { + fromChainID := ethClient.NetworkID() + if fromChainID == walletCommon.OptimismMainnet || + fromChainID == walletCommon.OptimismSepolia { + contractInstance, err := hopL2OptimismBridge.NewHopL2OptimismBridge( + contractAddress, + ethClient, + ) + if err != nil { + return tx, err + } + + return contractInstance.Send( + txOpts, + big.NewInt(int64(toChainID)), + to, + h.bonderFee.AmountIn.Int, + h.bonderFee.BonderFee.Int, + h.bonderFee.AmountOutMin.Int, + big.NewInt(h.bonderFee.Deadline)) + } + if fromChainID == walletCommon.ArbitrumMainnet || + fromChainID == walletCommon.ArbitrumSepolia { + contractInstance, err := hopL2ArbitrumBridge.NewHopL2ArbitrumBridge( + contractAddress, + ethClient, + ) + if err != nil { + return tx, err + } + + return contractInstance.Send( + txOpts, + big.NewInt(int64(toChainID)), + to, + h.bonderFee.AmountIn.Int, + h.bonderFee.BonderFee.Int, + h.bonderFee.AmountOutMin.Int, + big.NewInt(h.bonderFee.Deadline)) + } + + return tx, errors.New("tx for chain not supported yet") +} diff --git a/services/wallet/bridge/swap_paraswap.go b/services/wallet/bridge/swap_paraswap.go index 4cda29b69..f6da5cdf0 100644 --- a/services/wallet/bridge/swap_paraswap.go +++ b/services/wallet/bridge/swap_paraswap.go @@ -91,7 +91,7 @@ func (s *SwapParaswap) CalculateFees(from, to *params.Network, token *token.Toke return big.NewInt(0), big.NewInt(0), nil } -func (s *SwapParaswap) PackTxInputData(fromNetwork *params.Network, toNetwork *params.Network, from common.Address, to common.Address, token *token.Token, amountIn *big.Int) ([]byte, error) { +func (s *SwapParaswap) PackTxInputData(contractType string, fromNetwork *params.Network, toNetwork *params.Network, from common.Address, to common.Address, token *token.Token, amountIn *big.Int) ([]byte, error) { // not sure what we can do here since we're using the api to build the transaction return []byte{}, nil } @@ -107,17 +107,17 @@ func (s *SwapParaswap) EstimateGas(fromNetwork *params.Network, toNetwork *param return priceRoute.GasCost.Uint64(), nil } -func (s *SwapParaswap) GetContractAddress(network *params.Network, token *token.Token) *common.Address { - var address common.Address +func (s *SwapParaswap) GetContractAddress(network *params.Network, token *token.Token) (address common.Address, err error) { if network.ChainID == walletCommon.EthereumMainnet { address = common.HexToAddress("0x216b4b4ba9f3e719726886d34a177484278bfcae") } else if network.ChainID == walletCommon.ArbitrumMainnet { address = common.HexToAddress("0x216b4b4ba9f3e719726886d34a177484278bfcae") } else if network.ChainID == walletCommon.OptimismMainnet { address = common.HexToAddress("0x216b4b4ba9f3e719726886d34a177484278bfcae") + } else { + err = errors.New("unsupported network") } - - return &address + return } func (s *SwapParaswap) BuildTx(network, _ *params.Network, fromAddress common.Address, toAddress common.Address, token *token.Token, amountIn *big.Int, _ *big.Int) (*ethTypes.Transaction, error) { diff --git a/services/wallet/bridge/transfer.go b/services/wallet/bridge/transfer.go index 8fb2fb5db..3c733e747 100644 --- a/services/wallet/bridge/transfer.go +++ b/services/wallet/bridge/transfer.go @@ -40,7 +40,7 @@ func (s *TransferBridge) CalculateFees(from, to *params.Network, token *token.To return big.NewInt(0), big.NewInt(0), nil } -func (s *TransferBridge) PackTxInputData(fromNetwork *params.Network, toNetwork *params.Network, from common.Address, to common.Address, token *token.Token, amountIn *big.Int) ([]byte, error) { +func (s *TransferBridge) PackTxInputData(contractType string, fromNetwork *params.Network, toNetwork *params.Network, from common.Address, to common.Address, token *token.Token, amountIn *big.Int) ([]byte, error) { if token.Symbol == "ETH" { return []byte("eth_sendRawTransaction"), nil } else { @@ -59,7 +59,7 @@ func (s *TransferBridge) EstimateGas(fromNetwork *params.Network, toNetwork *par estimation := uint64(0) var err error - input, err := s.PackTxInputData(fromNetwork, toNetwork, from, to, token, amountIn) + input, err := s.PackTxInputData("", fromNetwork, toNetwork, from, to, token, amountIn) if err != nil { return 0, err } @@ -145,6 +145,6 @@ func (s *TransferBridge) CalculateAmountOut(from, to *params.Network, amountIn * return amountIn, nil } -func (s *TransferBridge) GetContractAddress(network *params.Network, token *token.Token) *common.Address { - return nil +func (s *TransferBridge) GetContractAddress(network *params.Network, token *token.Token) (common.Address, error) { + return common.Address{}, nil } diff --git a/services/wallet/router/router.go b/services/wallet/router/router.go index 67266ecae..f0928650a 100644 --- a/services/wallet/router/router.go +++ b/services/wallet/router/router.go @@ -600,15 +600,18 @@ func (r *Router) SuggestedRoutes( gasLimit = sendType.EstimateGas(r.ensService, r.stickersService, network, addrFrom, tokenID) } - approvalContractAddress := bridge.GetContractAddress(network, token) - approvalRequired, approvalAmountRequired, approvalGasLimit, l1ApprovalFee, err := r.requireApproval(ctx, sendType, approvalContractAddress, addrFrom, network, token, amountIn) + approvalContractAddress, err := bridge.GetContractAddress(network, token) + if err != nil { + continue + } + approvalRequired, approvalAmountRequired, approvalGasLimit, l1ApprovalFee, err := r.requireApproval(ctx, sendType, &approvalContractAddress, addrFrom, network, token, amountIn) if err != nil { continue } var l1GasFeeWei uint64 if sendType.needL1Fee() { - txInputData, err := bridge.PackTxInputData(network, dest, addrFrom, addrTo, token, amountIn) + txInputData, err := bridge.PackTxInputData("", network, dest, addrFrom, addrTo, token, amountIn) if err != nil { continue } @@ -673,7 +676,7 @@ func (r *Router) SuggestedRoutes( ApprovalRequired: approvalRequired, ApprovalGasFees: approvalGasFees, ApprovalAmountRequired: (*hexutil.Big)(approvalAmountRequired), - ApprovalContractAddress: approvalContractAddress, + ApprovalContractAddress: &approvalContractAddress, }) mu.Unlock() } diff --git a/services/wallet/router/router_v2.go b/services/wallet/router/router_v2.go index 710df9ae7..0410d711f 100644 --- a/services/wallet/router/router_v2.go +++ b/services/wallet/router/router_v2.go @@ -266,6 +266,8 @@ func findBestV2(routes [][]*PathV2, tokenPrice float64, nativeChainTokenPrice fl for _, route := range routes { currentCost := big.NewFloat(0) for _, path := range route { + tokenDenominator := big.NewFloat(math.Pow(10, float64(path.FromToken.Decimals))) + path.requiredTokenBalance = new(big.Int).Set(path.AmountIn.ToInt()) path.requiredNativeBalance = big.NewInt(0) @@ -283,11 +285,11 @@ func findBestV2(routes [][]*PathV2, tokenPrice float64, nativeChainTokenPrice fl } if path.TxBonderFees != nil && path.TxBonderFees.ToInt().Cmp(zero) > 0 { - bonderFeeInWei := path.TxBonderFees.ToInt() - bonderFeeInEth := gweiToEth(weiToGwei(bonderFeeInWei)) + path.requiredTokenBalance.Add(path.requiredTokenBalance, path.TxBonderFees.ToInt()) + pathCost.Add(pathCost, new(big.Float).Mul( + new(big.Float).Quo(new(big.Float).SetInt(path.TxBonderFees.ToInt()), tokenDenominator), + new(big.Float).SetFloat64(tokenPrice))) - path.requiredNativeBalance.Add(path.requiredNativeBalance, bonderFeeInWei) - pathCost.Add(pathCost, new(big.Float).Mul(bonderFeeInEth, nativeTokenPrice)) } if path.TxL1Fee != nil && path.TxL1Fee.ToInt().Cmp(zero) > 0 { @@ -301,7 +303,7 @@ func findBestV2(routes [][]*PathV2, tokenPrice float64, nativeChainTokenPrice fl if path.TxTokenFees != nil && path.TxTokenFees.ToInt().Cmp(zero) > 0 && path.FromToken != nil { path.requiredTokenBalance.Add(path.requiredTokenBalance, path.TxTokenFees.ToInt()) pathCost.Add(pathCost, new(big.Float).Mul( - new(big.Float).Quo(new(big.Float).SetInt(path.TxTokenFees.ToInt()), big.NewFloat(math.Pow(10, float64(path.FromToken.Decimals)))), + new(big.Float).Quo(new(big.Float).SetInt(path.TxTokenFees.ToInt()), tokenDenominator), new(big.Float).SetFloat64(tokenPrice))) } @@ -439,8 +441,11 @@ func (r *Router) SuggestedRoutesV2(ctx context.Context, input *RouteInputParams) gasLimit = input.SendType.EstimateGas(r.ensService, r.stickersService, network, input.AddrFrom, input.TokenID) } - approvalContractAddress := bridge.GetContractAddress(network, token) - approvalRequired, approvalAmountRequired, approvalGasLimit, l1ApprovalFee, err := r.requireApproval(ctx, input.SendType, approvalContractAddress, input.AddrFrom, network, token, amountToSend) + approvalContractAddress, err := bridge.GetContractAddress(network, token) + if err != nil { + continue + } + approvalRequired, approvalAmountRequired, approvalGasLimit, l1ApprovalFee, err := r.requireApproval(ctx, input.SendType, &approvalContractAddress, input.AddrFrom, network, token, amountToSend) if err != nil { continue } @@ -448,7 +453,7 @@ func (r *Router) SuggestedRoutesV2(ctx context.Context, input *RouteInputParams) var l1FeeWei uint64 if input.SendType.needL1Fee() { - txInputData, err := bridge.PackTxInputData(network, dest, input.AddrFrom, input.AddrTo, token, amountToSend) + txInputData, err := bridge.PackTxInputData("", network, dest, input.AddrFrom, input.AddrTo, token, amountToSend) if err != nil { continue } @@ -505,7 +510,7 @@ func (r *Router) SuggestedRoutesV2(ctx context.Context, input *RouteInputParams) ApprovalRequired: approvalRequired, ApprovalAmountRequired: (*hexutil.Big)(approvalAmountRequired), - ApprovalContractAddress: approvalContractAddress, + ApprovalContractAddress: &approvalContractAddress, ApprovalBaseFee: (*hexutil.Big)(baseFee), ApprovalPriorityFee: (*hexutil.Big)(selctedPriorityFee), ApprovalGasAmount: approvalGasLimit,