From 9f2a249d796d65c511b69ed8b3c4bf20738667cd Mon Sep 17 00:00:00 2001 From: Tomasz Slabon Date: Tue, 13 Jun 2023 14:07:58 +0200 Subject: [PATCH] Generated bindings for MaintainerProxy --- pkg/chain/ethereum/common/gen/Makefile | 1 + .../ethereum/ecdsa/gen/abi/WalletRegistry.go | 68 +- .../ethereum/ecdsa/gen/cmd/WalletRegistry.go | 110 + .../ecdsa/gen/contract/WalletRegistry.go | 185 + pkg/chain/ethereum/tbtc/gen/Makefile | 28 +- .../tbtc/gen/_address/MaintainerProxy | 0 pkg/chain/ethereum/tbtc/gen/abi/Bridge.go | 317 +- .../ethereum/tbtc/gen/abi/MaintainerProxy.go | 2383 ++++++++ pkg/chain/ethereum/tbtc/gen/cmd/Bridge.go | 1083 +++- .../ethereum/tbtc/gen/cmd/MaintainerProxy.go | 2367 ++++++++ .../ethereum/tbtc/gen/contract/Bridge.go | 2294 ++++++- .../tbtc/gen/contract/MaintainerProxy.go | 5387 +++++++++++++++++ pkg/chain/ethereum/tbtc/gen/gen.go | 9 + .../threshold/gen/abi/TokenStaking.go | 23 +- .../threshold/gen/cmd/TokenStaking.go | 66 - .../threshold/gen/contract/TokenStaking.go | 138 - 16 files changed, 14012 insertions(+), 447 deletions(-) create mode 100644 pkg/chain/ethereum/tbtc/gen/_address/MaintainerProxy create mode 100644 pkg/chain/ethereum/tbtc/gen/abi/MaintainerProxy.go create mode 100644 pkg/chain/ethereum/tbtc/gen/cmd/MaintainerProxy.go create mode 100644 pkg/chain/ethereum/tbtc/gen/contract/MaintainerProxy.go diff --git a/pkg/chain/ethereum/common/gen/Makefile b/pkg/chain/ethereum/common/gen/Makefile index 33f4254a4f..e3dfae1c1c 100644 --- a/pkg/chain/ethereum/common/gen/Makefile +++ b/pkg/chain/ethereum/common/gen/Makefile @@ -57,6 +57,7 @@ endif contract/%.go cmd/%.go: abi/%.abi abi/%.go _address/% ${artifacts_dir}/%.json $(info $* - generating Keep bindings) @go run github.com/keep-network/keep-common/tools/generators/ethereum $< contract/$*.go cmd/$*.go + $(call after_contract_hook,$*) # Don't remove intermediate files that got generated. .PRECIOUS: abi/%.abi abi/%.go _address/% diff --git a/pkg/chain/ethereum/ecdsa/gen/abi/WalletRegistry.go b/pkg/chain/ethereum/ecdsa/gen/abi/WalletRegistry.go index b9773aa6c5..a85559e4aa 100644 --- a/pkg/chain/ethereum/ecdsa/gen/abi/WalletRegistry.go +++ b/pkg/chain/ethereum/ecdsa/gen/abi/WalletRegistry.go @@ -28,6 +28,20 @@ var ( _ = event.NewSubscription ) +// EcdsaDkgData is an auto generated low-level Go binding around an user-defined struct. +type EcdsaDkgData struct { + SortitionPool common.Address + DkgValidator common.Address + Parameters EcdsaDkgParameters + StateLockBlock *big.Int + StartBlock *big.Int + Seed *big.Int + ResultSubmissionStartBlockOffset *big.Int + SubmittedResultHash [32]byte + SubmittedResultBlock *big.Int + Gap [38]*big.Int +} + // EcdsaDkgParameters is an auto generated low-level Go binding around an user-defined struct. type EcdsaDkgParameters struct { SeedTimeout *big.Int @@ -66,7 +80,7 @@ type WalletsWallet struct { // WalletRegistryMetaData contains all meta data concerning the WalletRegistry contract. var WalletRegistryMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"contractSortitionPool\",\"name\":\"_sortitionPool\",\"type\":\"address\"},{\"internalType\":\"contractIStaking\",\"name\":\"_staking\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"AuthorizationDecreaseApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"fromAmount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"toAmount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"decreasingAt\",\"type\":\"uint64\"}],\"name\":\"AuthorizationDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"fromAmount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"toAmount\",\"type\":\"uint96\"}],\"name\":\"AuthorizationIncreased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"minimumAuthorization\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"authorizationDecreaseDelay\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"authorizationDecreaseChangePeriod\",\"type\":\"uint64\"}],\"name\":\"AuthorizationParametersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"resultHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"slashingAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"maliciousSubmitter\",\"type\":\"address\"}],\"name\":\"DkgMaliciousResultSlashed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"resultHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"slashingAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"maliciousSubmitter\",\"type\":\"address\"}],\"name\":\"DkgMaliciousResultSlashingFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"seedTimeout\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"resultChallengePeriodLength\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"resultChallengeExtraGas\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"resultSubmissionTimeout\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"resultSubmitterPrecedencePeriodLength\",\"type\":\"uint256\"}],\"name\":\"DkgParametersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"resultHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"DkgResultApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"resultHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"reason\",\"type\":\"string\"}],\"name\":\"DkgResultChallenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"resultHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"seed\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"submitterMemberIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"groupPubKey\",\"type\":\"bytes\"},{\"internalType\":\"uint8[]\",\"name\":\"misbehavedMembersIndices\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"signingMembersIndices\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32[]\",\"name\":\"members\",\"type\":\"uint32[]\"},{\"internalType\":\"bytes32\",\"name\":\"membersHash\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structEcdsaDkg.Result\",\"name\":\"result\",\"type\":\"tuple\"}],\"name\":\"DkgResultSubmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"DkgSeedTimedOut\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"seed\",\"type\":\"uint256\"}],\"name\":\"DkgStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"DkgStateLocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"DkgTimedOut\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dkgResultSubmissionGas\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dkgResultApprovalGasOffset\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"notifyOperatorInactivityGasOffset\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"notifySeedTimeoutGasOffset\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"notifyDkgTimeoutNegativeGasOffset\",\"type\":\"uint256\"}],\"name\":\"GasParametersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldGovernance\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newGovernance\",\"type\":\"address\"}],\"name\":\"GovernanceTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"walletID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"notifier\",\"type\":\"address\"}],\"name\":\"InactivityClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"fromAmount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"toAmount\",\"type\":\"uint96\"}],\"name\":\"InvoluntaryAuthorizationDecreaseFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"OperatorJoinedSortitionPool\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"OperatorRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"OperatorStatusUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"randomBeacon\",\"type\":\"address\"}],\"name\":\"RandomBeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newReimbursementPool\",\"type\":\"address\"}],\"name\":\"ReimbursementPoolUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maliciousDkgResultNotificationRewardMultiplier\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sortitionPoolRewardsBanDuration\",\"type\":\"uint256\"}],\"name\":\"RewardParametersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"RewardsWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maliciousDkgResultSlashingAmount\",\"type\":\"uint256\"}],\"name\":\"SlashingParametersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"walletID\",\"type\":\"bytes32\"}],\"name\":\"WalletClosed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"walletID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"dkgResultHash\",\"type\":\"bytes32\"}],\"name\":\"WalletCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"walletOwner\",\"type\":\"address\"}],\"name\":\"WalletOwnerUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"relayEntry\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"__beaconCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"approveAuthorizationDecrease\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"submitterMemberIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"groupPubKey\",\"type\":\"bytes\"},{\"internalType\":\"uint8[]\",\"name\":\"misbehavedMembersIndices\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"signingMembersIndices\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32[]\",\"name\":\"members\",\"type\":\"uint32[]\"},{\"internalType\":\"bytes32\",\"name\":\"membersHash\",\"type\":\"bytes32\"}],\"internalType\":\"structEcdsaDkg.Result\",\"name\":\"dkgResult\",\"type\":\"tuple\"}],\"name\":\"approveDkgResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"fromAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"toAmount\",\"type\":\"uint96\"}],\"name\":\"authorizationDecreaseRequested\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"fromAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"toAmount\",\"type\":\"uint96\"}],\"name\":\"authorizationIncreased\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"authorizationParameters\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"minimumAuthorization\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"authorizationDecreaseDelay\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"authorizationDecreaseChangePeriod\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"availableRewards\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"submitterMemberIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"groupPubKey\",\"type\":\"bytes\"},{\"internalType\":\"uint8[]\",\"name\":\"misbehavedMembersIndices\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"signingMembersIndices\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32[]\",\"name\":\"members\",\"type\":\"uint32[]\"},{\"internalType\":\"bytes32\",\"name\":\"membersHash\",\"type\":\"bytes32\"}],\"internalType\":\"structEcdsaDkg.Result\",\"name\":\"dkgResult\",\"type\":\"tuple\"}],\"name\":\"challengeDkgResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"walletID\",\"type\":\"bytes32\"}],\"name\":\"closeWallet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dkgParameters\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"seedTimeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultChallengePeriodLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultChallengeExtraGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultSubmissionTimeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"submitterPrecedencePeriodLength\",\"type\":\"uint256\"}],\"internalType\":\"structEcdsaDkg.Parameters\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"eligibleStake\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gasParameters\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"dkgResultSubmissionGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dkgResultApprovalGasOffset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"notifyOperatorInactivityGasOffset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"notifySeedTimeoutGasOffset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"notifyDkgTimeoutNegativeGasOffset\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"walletID\",\"type\":\"bytes32\"}],\"name\":\"getWallet\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"membersIdsHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"publicKeyX\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"publicKeyY\",\"type\":\"bytes32\"}],\"internalType\":\"structWallets.Wallet\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWalletCreationState\",\"outputs\":[{\"internalType\":\"enumEcdsaDkg.State\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"walletID\",\"type\":\"bytes32\"}],\"name\":\"getWalletPublicKey\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governance\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hasDkgTimedOut\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hasSeedTimedOut\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"inactivityClaimNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractEcdsaDkgValidator\",\"name\":\"_ecdsaDkgValidator\",\"type\":\"address\"},{\"internalType\":\"contractIRandomBeacon\",\"name\":\"_randomBeacon\",\"type\":\"address\"},{\"internalType\":\"contractReimbursementPool\",\"name\":\"_reimbursementPool\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"fromAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"toAmount\",\"type\":\"uint96\"}],\"name\":\"involuntaryAuthorizationDecrease\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"submitterMemberIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"groupPubKey\",\"type\":\"bytes\"},{\"internalType\":\"uint8[]\",\"name\":\"misbehavedMembersIndices\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"signingMembersIndices\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32[]\",\"name\":\"members\",\"type\":\"uint32[]\"},{\"internalType\":\"bytes32\",\"name\":\"membersHash\",\"type\":\"bytes32\"}],\"internalType\":\"structEcdsaDkg.Result\",\"name\":\"result\",\"type\":\"tuple\"}],\"name\":\"isDkgResultValid\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isOperatorInPool\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isOperatorUpToDate\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"walletID\",\"type\":\"bytes32\"},{\"internalType\":\"uint32[]\",\"name\":\"walletMembersIDs\",\"type\":\"uint32[]\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"walletMemberIndex\",\"type\":\"uint256\"}],\"name\":\"isWalletMember\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"walletID\",\"type\":\"bytes32\"}],\"name\":\"isWalletRegistered\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"joinSortitionPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumAuthorization\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"notifyDkgTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"walletID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"inactiveMembersIndices\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"heartbeatFailed\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"signingMembersIndices\",\"type\":\"uint256[]\"}],\"internalType\":\"structEcdsaInactivity.Claim\",\"name\":\"claim\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint32[]\",\"name\":\"groupMembers\",\"type\":\"uint32[]\"}],\"name\":\"notifyOperatorInactivity\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"notifySeedTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"operatorToStakingProvider\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"pendingAuthorizationDecrease\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"randomBeacon\",\"outputs\":[{\"internalType\":\"contractIRandomBeacon\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"registerOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reimbursementPool\",\"outputs\":[{\"internalType\":\"contractReimbursementPool\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"remainingAuthorizationDecreaseDelay\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requestNewWallet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardParameters\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"maliciousDkgResultNotificationRewardMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sortitionPoolRewardsBanDuration\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"rewardMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"notifier\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"walletID\",\"type\":\"bytes32\"},{\"internalType\":\"uint32[]\",\"name\":\"walletMembersIDs\",\"type\":\"uint32[]\"}],\"name\":\"seize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"selectGroup\",\"outputs\":[{\"internalType\":\"uint32[]\",\"name\":\"\",\"type\":\"uint32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"slashingParameters\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"maliciousDkgResultSlashingAmount\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sortitionPool\",\"outputs\":[{\"internalType\":\"contractSortitionPool\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staking\",\"outputs\":[{\"internalType\":\"contractIStaking\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"stakingProviderToOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"submitterMemberIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"groupPubKey\",\"type\":\"bytes\"},{\"internalType\":\"uint8[]\",\"name\":\"misbehavedMembersIndices\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"signingMembersIndices\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32[]\",\"name\":\"members\",\"type\":\"uint32[]\"},{\"internalType\":\"bytes32\",\"name\":\"membersHash\",\"type\":\"bytes32\"}],\"internalType\":\"structEcdsaDkg.Result\",\"name\":\"dkgResult\",\"type\":\"tuple\"}],\"name\":\"submitDkgResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newGovernance\",\"type\":\"address\"}],\"name\":\"transferGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_minimumAuthorization\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"_authorizationDecreaseDelay\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"_authorizationDecreaseChangePeriod\",\"type\":\"uint64\"}],\"name\":\"updateAuthorizationParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_seedTimeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_resultChallengePeriodLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_resultChallengeExtraGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_resultSubmissionTimeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_submitterPrecedencePeriodLength\",\"type\":\"uint256\"}],\"name\":\"updateDkgParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"dkgResultSubmissionGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dkgResultApprovalGasOffset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"notifyOperatorInactivityGasOffset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"notifySeedTimeoutGasOffset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"notifyDkgTimeoutNegativeGasOffset\",\"type\":\"uint256\"}],\"name\":\"updateGasParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"updateOperatorStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractReimbursementPool\",\"name\":\"_reimbursementPool\",\"type\":\"address\"}],\"name\":\"updateReimbursementPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maliciousDkgResultNotificationRewardMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sortitionPoolRewardsBanDuration\",\"type\":\"uint256\"}],\"name\":\"updateRewardParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"maliciousDkgResultSlashingAmount\",\"type\":\"uint96\"}],\"name\":\"updateSlashingParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIWalletOwner\",\"name\":\"_walletOwner\",\"type\":\"address\"}],\"name\":\"updateWalletOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIRandomBeacon\",\"name\":\"_randomBeacon\",\"type\":\"address\"}],\"name\":\"upgradeRandomBeacon\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"walletOwner\",\"outputs\":[{\"internalType\":\"contractIWalletOwner\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"withdrawIneligibleRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"withdrawRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + ABI: "[{\"inputs\":[{\"internalType\":\"contractSortitionPool\",\"name\":\"_sortitionPool\",\"type\":\"address\"},{\"internalType\":\"contractIStaking\",\"name\":\"_staking\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"AuthorizationDecreaseApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"fromAmount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"toAmount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"decreasingAt\",\"type\":\"uint64\"}],\"name\":\"AuthorizationDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"fromAmount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"toAmount\",\"type\":\"uint96\"}],\"name\":\"AuthorizationIncreased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"minimumAuthorization\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"authorizationDecreaseDelay\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"authorizationDecreaseChangePeriod\",\"type\":\"uint64\"}],\"name\":\"AuthorizationParametersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"resultHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"slashingAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"maliciousSubmitter\",\"type\":\"address\"}],\"name\":\"DkgMaliciousResultSlashed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"resultHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"slashingAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"maliciousSubmitter\",\"type\":\"address\"}],\"name\":\"DkgMaliciousResultSlashingFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"seedTimeout\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"resultChallengePeriodLength\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"resultChallengeExtraGas\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"resultSubmissionTimeout\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"resultSubmitterPrecedencePeriodLength\",\"type\":\"uint256\"}],\"name\":\"DkgParametersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"resultHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"DkgResultApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"resultHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"reason\",\"type\":\"string\"}],\"name\":\"DkgResultChallenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"resultHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"seed\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"submitterMemberIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"groupPubKey\",\"type\":\"bytes\"},{\"internalType\":\"uint8[]\",\"name\":\"misbehavedMembersIndices\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"signingMembersIndices\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32[]\",\"name\":\"members\",\"type\":\"uint32[]\"},{\"internalType\":\"bytes32\",\"name\":\"membersHash\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structEcdsaDkg.Result\",\"name\":\"result\",\"type\":\"tuple\"}],\"name\":\"DkgResultSubmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"DkgSeedTimedOut\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"seed\",\"type\":\"uint256\"}],\"name\":\"DkgStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"DkgStateLocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"DkgTimedOut\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dkgResultSubmissionGas\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dkgResultApprovalGasOffset\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"notifyOperatorInactivityGasOffset\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"notifySeedTimeoutGasOffset\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"notifyDkgTimeoutNegativeGasOffset\",\"type\":\"uint256\"}],\"name\":\"GasParametersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldGovernance\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newGovernance\",\"type\":\"address\"}],\"name\":\"GovernanceTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"walletID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"notifier\",\"type\":\"address\"}],\"name\":\"InactivityClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"fromAmount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"toAmount\",\"type\":\"uint96\"}],\"name\":\"InvoluntaryAuthorizationDecreaseFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"OperatorJoinedSortitionPool\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"OperatorRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"OperatorStatusUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"randomBeacon\",\"type\":\"address\"}],\"name\":\"RandomBeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newReimbursementPool\",\"type\":\"address\"}],\"name\":\"ReimbursementPoolUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maliciousDkgResultNotificationRewardMultiplier\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sortitionPoolRewardsBanDuration\",\"type\":\"uint256\"}],\"name\":\"RewardParametersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"RewardsWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maliciousDkgResultSlashingAmount\",\"type\":\"uint256\"}],\"name\":\"SlashingParametersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"walletID\",\"type\":\"bytes32\"}],\"name\":\"WalletClosed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"walletID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"dkgResultHash\",\"type\":\"bytes32\"}],\"name\":\"WalletCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"walletOwner\",\"type\":\"address\"}],\"name\":\"WalletOwnerUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"relayEntry\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"__beaconCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"approveAuthorizationDecrease\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"submitterMemberIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"groupPubKey\",\"type\":\"bytes\"},{\"internalType\":\"uint8[]\",\"name\":\"misbehavedMembersIndices\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"signingMembersIndices\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32[]\",\"name\":\"members\",\"type\":\"uint32[]\"},{\"internalType\":\"bytes32\",\"name\":\"membersHash\",\"type\":\"bytes32\"}],\"internalType\":\"structEcdsaDkg.Result\",\"name\":\"dkgResult\",\"type\":\"tuple\"}],\"name\":\"approveDkgResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"fromAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"toAmount\",\"type\":\"uint96\"}],\"name\":\"authorizationDecreaseRequested\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"fromAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"toAmount\",\"type\":\"uint96\"}],\"name\":\"authorizationIncreased\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"authorizationParameters\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"minimumAuthorization\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"authorizationDecreaseDelay\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"authorizationDecreaseChangePeriod\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"availableRewards\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"submitterMemberIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"groupPubKey\",\"type\":\"bytes\"},{\"internalType\":\"uint8[]\",\"name\":\"misbehavedMembersIndices\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"signingMembersIndices\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32[]\",\"name\":\"members\",\"type\":\"uint32[]\"},{\"internalType\":\"bytes32\",\"name\":\"membersHash\",\"type\":\"bytes32\"}],\"internalType\":\"structEcdsaDkg.Result\",\"name\":\"dkgResult\",\"type\":\"tuple\"}],\"name\":\"challengeDkgResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"walletID\",\"type\":\"bytes32\"}],\"name\":\"closeWallet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dkgParameters\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"seedTimeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultChallengePeriodLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultChallengeExtraGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultSubmissionTimeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"submitterPrecedencePeriodLength\",\"type\":\"uint256\"}],\"internalType\":\"structEcdsaDkg.Parameters\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"eligibleStake\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"groupPubKey\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"membersIdsHash\",\"type\":\"bytes32\"}],\"name\":\"forceAddWallet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gasParameters\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"dkgResultSubmissionGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dkgResultApprovalGasOffset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"notifyOperatorInactivityGasOffset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"notifySeedTimeoutGasOffset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"notifyDkgTimeoutNegativeGasOffset\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDkgData\",\"outputs\":[{\"components\":[{\"internalType\":\"contractSortitionPool\",\"name\":\"sortitionPool\",\"type\":\"address\"},{\"internalType\":\"contractEcdsaDkgValidator\",\"name\":\"dkgValidator\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"seedTimeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultChallengePeriodLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultChallengeExtraGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultSubmissionTimeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"submitterPrecedencePeriodLength\",\"type\":\"uint256\"}],\"internalType\":\"structEcdsaDkg.Parameters\",\"name\":\"parameters\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"stateLockBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"startBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"seed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultSubmissionStartBlockOffset\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"submittedResultHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"submittedResultBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256[38]\",\"name\":\"__gap\",\"type\":\"uint256[38]\"}],\"internalType\":\"structEcdsaDkg.Data\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"walletID\",\"type\":\"bytes32\"}],\"name\":\"getWallet\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"membersIdsHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"publicKeyX\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"publicKeyY\",\"type\":\"bytes32\"}],\"internalType\":\"structWallets.Wallet\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWalletCreationState\",\"outputs\":[{\"internalType\":\"enumEcdsaDkg.State\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"walletID\",\"type\":\"bytes32\"}],\"name\":\"getWalletPublicKey\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governance\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hasDkgTimedOut\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hasSeedTimedOut\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"inactivityClaimNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractEcdsaDkgValidator\",\"name\":\"_ecdsaDkgValidator\",\"type\":\"address\"},{\"internalType\":\"contractIRandomBeacon\",\"name\":\"_randomBeacon\",\"type\":\"address\"},{\"internalType\":\"contractReimbursementPool\",\"name\":\"_reimbursementPool\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"fromAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"toAmount\",\"type\":\"uint96\"}],\"name\":\"involuntaryAuthorizationDecrease\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"submitterMemberIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"groupPubKey\",\"type\":\"bytes\"},{\"internalType\":\"uint8[]\",\"name\":\"misbehavedMembersIndices\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"signingMembersIndices\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32[]\",\"name\":\"members\",\"type\":\"uint32[]\"},{\"internalType\":\"bytes32\",\"name\":\"membersHash\",\"type\":\"bytes32\"}],\"internalType\":\"structEcdsaDkg.Result\",\"name\":\"result\",\"type\":\"tuple\"}],\"name\":\"isDkgResultValid\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isOperatorInPool\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isOperatorUpToDate\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"walletID\",\"type\":\"bytes32\"},{\"internalType\":\"uint32[]\",\"name\":\"walletMembersIDs\",\"type\":\"uint32[]\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"walletMemberIndex\",\"type\":\"uint256\"}],\"name\":\"isWalletMember\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"walletID\",\"type\":\"bytes32\"}],\"name\":\"isWalletRegistered\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"joinSortitionPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumAuthorization\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"notifyDkgTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"walletID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"inactiveMembersIndices\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"heartbeatFailed\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"signingMembersIndices\",\"type\":\"uint256[]\"}],\"internalType\":\"structEcdsaInactivity.Claim\",\"name\":\"claim\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint32[]\",\"name\":\"groupMembers\",\"type\":\"uint32[]\"}],\"name\":\"notifyOperatorInactivity\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"notifySeedTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"operatorToStakingProvider\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"pendingAuthorizationDecrease\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"randomBeacon\",\"outputs\":[{\"internalType\":\"contractIRandomBeacon\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"registerOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reimbursementPool\",\"outputs\":[{\"internalType\":\"contractReimbursementPool\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"remainingAuthorizationDecreaseDelay\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requestNewWallet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardParameters\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"maliciousDkgResultNotificationRewardMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sortitionPoolRewardsBanDuration\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"rewardMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"notifier\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"walletID\",\"type\":\"bytes32\"},{\"internalType\":\"uint32[]\",\"name\":\"walletMembersIDs\",\"type\":\"uint32[]\"}],\"name\":\"seize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"selectGroup\",\"outputs\":[{\"internalType\":\"uint32[]\",\"name\":\"\",\"type\":\"uint32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"slashingParameters\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"maliciousDkgResultSlashingAmount\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sortitionPool\",\"outputs\":[{\"internalType\":\"contractSortitionPool\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staking\",\"outputs\":[{\"internalType\":\"contractIStaking\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"stakingProviderToOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"submitterMemberIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"groupPubKey\",\"type\":\"bytes\"},{\"internalType\":\"uint8[]\",\"name\":\"misbehavedMembersIndices\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"signingMembersIndices\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32[]\",\"name\":\"members\",\"type\":\"uint32[]\"},{\"internalType\":\"bytes32\",\"name\":\"membersHash\",\"type\":\"bytes32\"}],\"internalType\":\"structEcdsaDkg.Result\",\"name\":\"dkgResult\",\"type\":\"tuple\"}],\"name\":\"submitDkgResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newGovernance\",\"type\":\"address\"}],\"name\":\"transferGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_minimumAuthorization\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"_authorizationDecreaseDelay\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"_authorizationDecreaseChangePeriod\",\"type\":\"uint64\"}],\"name\":\"updateAuthorizationParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_seedTimeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_resultChallengePeriodLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_resultChallengeExtraGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_resultSubmissionTimeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_submitterPrecedencePeriodLength\",\"type\":\"uint256\"}],\"name\":\"updateDkgParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"dkgResultSubmissionGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dkgResultApprovalGasOffset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"notifyOperatorInactivityGasOffset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"notifySeedTimeoutGasOffset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"notifyDkgTimeoutNegativeGasOffset\",\"type\":\"uint256\"}],\"name\":\"updateGasParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"updateOperatorStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractReimbursementPool\",\"name\":\"_reimbursementPool\",\"type\":\"address\"}],\"name\":\"updateReimbursementPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maliciousDkgResultNotificationRewardMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sortitionPoolRewardsBanDuration\",\"type\":\"uint256\"}],\"name\":\"updateRewardParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"maliciousDkgResultSlashingAmount\",\"type\":\"uint96\"}],\"name\":\"updateSlashingParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIWalletOwner\",\"name\":\"_walletOwner\",\"type\":\"address\"}],\"name\":\"updateWalletOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIRandomBeacon\",\"name\":\"_randomBeacon\",\"type\":\"address\"}],\"name\":\"upgradeRandomBeacon\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"walletOwner\",\"outputs\":[{\"internalType\":\"contractIWalletOwner\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"withdrawIneligibleRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"withdrawRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } // WalletRegistryABI is the input ABI used to generate the binding from. @@ -418,6 +432,37 @@ func (_WalletRegistry *WalletRegistryCallerSession) GasParameters() (struct { return _WalletRegistry.Contract.GasParameters(&_WalletRegistry.CallOpts) } +// GetDkgData is a free data retrieval call binding the contract method 0x592b2abd. +// +// Solidity: function getDkgData() view returns((address,address,(uint256,uint256,uint256,uint256,uint256),uint256,uint256,uint256,uint256,bytes32,uint256,uint256[38])) +func (_WalletRegistry *WalletRegistryCaller) GetDkgData(opts *bind.CallOpts) (EcdsaDkgData, error) { + var out []interface{} + err := _WalletRegistry.contract.Call(opts, &out, "getDkgData") + + if err != nil { + return *new(EcdsaDkgData), err + } + + out0 := *abi.ConvertType(out[0], new(EcdsaDkgData)).(*EcdsaDkgData) + + return out0, err + +} + +// GetDkgData is a free data retrieval call binding the contract method 0x592b2abd. +// +// Solidity: function getDkgData() view returns((address,address,(uint256,uint256,uint256,uint256,uint256),uint256,uint256,uint256,uint256,bytes32,uint256,uint256[38])) +func (_WalletRegistry *WalletRegistrySession) GetDkgData() (EcdsaDkgData, error) { + return _WalletRegistry.Contract.GetDkgData(&_WalletRegistry.CallOpts) +} + +// GetDkgData is a free data retrieval call binding the contract method 0x592b2abd. +// +// Solidity: function getDkgData() view returns((address,address,(uint256,uint256,uint256,uint256,uint256),uint256,uint256,uint256,uint256,bytes32,uint256,uint256[38])) +func (_WalletRegistry *WalletRegistryCallerSession) GetDkgData() (EcdsaDkgData, error) { + return _WalletRegistry.Contract.GetDkgData(&_WalletRegistry.CallOpts) +} + // GetWallet is a free data retrieval call binding the contract method 0x789d392a. // // Solidity: function getWallet(bytes32 walletID) view returns((bytes32,bytes32,bytes32)) @@ -1355,6 +1400,27 @@ func (_WalletRegistry *WalletRegistryTransactorSession) CloseWallet(walletID [32 return _WalletRegistry.Contract.CloseWallet(&_WalletRegistry.TransactOpts, walletID) } +// ForceAddWallet is a paid mutator transaction binding the contract method 0x2717ee0d. +// +// Solidity: function forceAddWallet(bytes groupPubKey, bytes32 membersIdsHash) returns() +func (_WalletRegistry *WalletRegistryTransactor) ForceAddWallet(opts *bind.TransactOpts, groupPubKey []byte, membersIdsHash [32]byte) (*types.Transaction, error) { + return _WalletRegistry.contract.Transact(opts, "forceAddWallet", groupPubKey, membersIdsHash) +} + +// ForceAddWallet is a paid mutator transaction binding the contract method 0x2717ee0d. +// +// Solidity: function forceAddWallet(bytes groupPubKey, bytes32 membersIdsHash) returns() +func (_WalletRegistry *WalletRegistrySession) ForceAddWallet(groupPubKey []byte, membersIdsHash [32]byte) (*types.Transaction, error) { + return _WalletRegistry.Contract.ForceAddWallet(&_WalletRegistry.TransactOpts, groupPubKey, membersIdsHash) +} + +// ForceAddWallet is a paid mutator transaction binding the contract method 0x2717ee0d. +// +// Solidity: function forceAddWallet(bytes groupPubKey, bytes32 membersIdsHash) returns() +func (_WalletRegistry *WalletRegistryTransactorSession) ForceAddWallet(groupPubKey []byte, membersIdsHash [32]byte) (*types.Transaction, error) { + return _WalletRegistry.Contract.ForceAddWallet(&_WalletRegistry.TransactOpts, groupPubKey, membersIdsHash) +} + // Initialize is a paid mutator transaction binding the contract method 0xc0c53b8b. // // Solidity: function initialize(address _ecdsaDkgValidator, address _randomBeacon, address _reimbursementPool) returns() diff --git a/pkg/chain/ethereum/ecdsa/gen/cmd/WalletRegistry.go b/pkg/chain/ethereum/ecdsa/gen/cmd/WalletRegistry.go index 81877a37e5..8e8915a411 100644 --- a/pkg/chain/ethereum/ecdsa/gen/cmd/WalletRegistry.go +++ b/pkg/chain/ethereum/ecdsa/gen/cmd/WalletRegistry.go @@ -56,6 +56,7 @@ func init() { wrDkgParametersCommand(), wrEligibleStakeCommand(), wrGasParametersCommand(), + wrGetDkgDataCommand(), wrGetWalletCommand(), wrGetWalletCreationStateCommand(), wrGetWalletPublicKeyCommand(), @@ -87,6 +88,7 @@ func init() { wrBeaconCallbackCommand(), wrChallengeDkgResultCommand(), wrCloseWalletCommand(), + wrForceAddWalletCommand(), wrInitializeCommand(), wrInvoluntaryAuthorizationDecreaseCommand(), wrJoinSortitionPoolCommand(), @@ -302,6 +304,40 @@ func wrGasParameters(c *cobra.Command, args []string) error { return nil } +func wrGetDkgDataCommand() *cobra.Command { + c := &cobra.Command{ + Use: "get-dkg-data", + Short: "Calls the view method getDkgData on the WalletRegistry contract.", + Args: cmd.ArgCountChecker(0), + RunE: wrGetDkgData, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + cmd.InitConstFlags(c) + + return c +} + +func wrGetDkgData(c *cobra.Command, args []string) error { + contract, err := initializeWalletRegistry(c) + if err != nil { + return err + } + + result, err := contract.GetDkgDataAtBlock( + cmd.BlockFlagValue.Int, + ) + + if err != nil { + return err + } + + cmd.PrintOutput(result) + + return nil +} + func wrGetWalletCommand() *cobra.Command { c := &cobra.Command{ Use: "get-wallet [arg_walletID]", @@ -1710,6 +1746,80 @@ func wrCloseWallet(c *cobra.Command, args []string) error { return nil } +func wrForceAddWalletCommand() *cobra.Command { + c := &cobra.Command{ + Use: "force-add-wallet [arg_groupPubKey] [arg_membersIdsHash]", + Short: "Calls the nonpayable method forceAddWallet on the WalletRegistry contract.", + Args: cmd.ArgCountChecker(2), + RunE: wrForceAddWallet, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func wrForceAddWallet(c *cobra.Command, args []string) error { + contract, err := initializeWalletRegistry(c) + if err != nil { + return err + } + + arg_groupPubKey, err := hexutil.Decode(args[0]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_groupPubKey, a bytes, from passed value %v", + args[0], + ) + } + arg_membersIdsHash, err := decode.ParseBytes32(args[1]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_membersIdsHash, a bytes32, from passed value %v", + args[1], + ) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.ForceAddWallet( + arg_groupPubKey, + arg_membersIdsHash, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallForceAddWallet( + arg_groupPubKey, + arg_membersIdsHash, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + func wrInitializeCommand() *cobra.Command { c := &cobra.Command{ Use: "initialize [arg__ecdsaDkgValidator] [arg__randomBeacon] [arg__reimbursementPool]", diff --git a/pkg/chain/ethereum/ecdsa/gen/contract/WalletRegistry.go b/pkg/chain/ethereum/ecdsa/gen/contract/WalletRegistry.go index 3b4288559c..c929310aad 100644 --- a/pkg/chain/ethereum/ecdsa/gen/contract/WalletRegistry.go +++ b/pkg/chain/ethereum/ecdsa/gen/contract/WalletRegistry.go @@ -1120,6 +1120,154 @@ func (wr *WalletRegistry) CloseWalletGasEstimate( return result, err } +// Transaction submission. +func (wr *WalletRegistry) ForceAddWallet( + arg_groupPubKey []byte, + arg_membersIdsHash [32]byte, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + wrLogger.Debug( + "submitting transaction forceAddWallet", + " params: ", + fmt.Sprint( + arg_groupPubKey, + arg_membersIdsHash, + ), + ) + + wr.transactionMutex.Lock() + defer wr.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *wr.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := wr.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := wr.contract.ForceAddWallet( + transactorOptions, + arg_groupPubKey, + arg_membersIdsHash, + ) + if err != nil { + return transaction, wr.errorResolver.ResolveError( + err, + wr.transactorOptions.From, + nil, + "forceAddWallet", + arg_groupPubKey, + arg_membersIdsHash, + ) + } + + wrLogger.Infof( + "submitted transaction forceAddWallet with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go wr.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := wr.contract.ForceAddWallet( + newTransactorOptions, + arg_groupPubKey, + arg_membersIdsHash, + ) + if err != nil { + return nil, wr.errorResolver.ResolveError( + err, + wr.transactorOptions.From, + nil, + "forceAddWallet", + arg_groupPubKey, + arg_membersIdsHash, + ) + } + + wrLogger.Infof( + "submitted transaction forceAddWallet with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + wr.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (wr *WalletRegistry) CallForceAddWallet( + arg_groupPubKey []byte, + arg_membersIdsHash [32]byte, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + wr.transactorOptions.From, + blockNumber, nil, + wr.contractABI, + wr.caller, + wr.errorResolver, + wr.contractAddress, + "forceAddWallet", + &result, + arg_groupPubKey, + arg_membersIdsHash, + ) + + return err +} + +func (wr *WalletRegistry) ForceAddWalletGasEstimate( + arg_groupPubKey []byte, + arg_membersIdsHash [32]byte, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + wr.callerOptions.From, + wr.contractAddress, + "forceAddWallet", + wr.contractABI, + wr.transactor, + arg_groupPubKey, + arg_membersIdsHash, + ) + + return result, err +} + // Transaction submission. func (wr *WalletRegistry) Initialize( arg__ecdsaDkgValidator common.Address, @@ -4523,6 +4671,43 @@ func (wr *WalletRegistry) GasParametersAtBlock( return result, err } +func (wr *WalletRegistry) GetDkgData() (abi.EcdsaDkgData, error) { + result, err := wr.contract.GetDkgData( + wr.callerOptions, + ) + + if err != nil { + return result, wr.errorResolver.ResolveError( + err, + wr.callerOptions.From, + nil, + "getDkgData", + ) + } + + return result, err +} + +func (wr *WalletRegistry) GetDkgDataAtBlock( + blockNumber *big.Int, +) (abi.EcdsaDkgData, error) { + var result abi.EcdsaDkgData + + err := chainutil.CallAtBlock( + wr.callerOptions.From, + blockNumber, + nil, + wr.contractABI, + wr.caller, + wr.errorResolver, + wr.contractAddress, + "getDkgData", + &result, + ) + + return result, err +} + func (wr *WalletRegistry) GetWallet( arg_walletID [32]byte, ) (abi.WalletsWallet, error) { diff --git a/pkg/chain/ethereum/tbtc/gen/Makefile b/pkg/chain/ethereum/tbtc/gen/Makefile index 2bb694645c..a9f02259d3 100644 --- a/pkg/chain/ethereum/tbtc/gen/Makefile +++ b/pkg/chain/ethereum/tbtc/gen/Makefile @@ -1,17 +1,18 @@ npm_package_name=@keep-network/tbtc-v2 # Contracts for which the bindings should be generated. -required_contracts := Bridge LightRelay LightRelayMaintainerProxy WalletCoordinator +required_contracts := Bridge MaintainerProxy LightRelay LightRelayMaintainerProxy WalletCoordinator # There is a bug in the currently used abigen version (v1.10.19) that makes it # re-declaring structs used by multiple contracts # https://github.com/ethereum/go-ethereum/issues/24627. This is a problem -# for us because both Bridge and WalletCoordinator contracts use BitcoinTx.Info -# struct which is then re-declared in the same package once abigen does its work. +# for us because Bridge, WalletCoordinator and MaintainerProxy contracts all use +# the same structs which are then re-declared in the same package once abigen +# does its work. # An ultimate solution would be upgrading go-ethereum (thus abigen too) to v1.11 but # that version contains some breaking changes that make the upgrade non-trivial. # As a short-term workaround, we use some Makefile shenanigans to slightly rename -# the conflicting BitcoinTxInfo struct in the WalletCoordinator output file. +# the conflicting structs in the WalletCoordinator and MaintainerProxy output files. # We use perl for that purpose as sed is not cross-platform and works a bit # differently on GNU and BSD. # @@ -20,9 +21,28 @@ required_contracts := Bridge LightRelay LightRelayMaintainerProxy WalletCoordina define after_abi_hook $(eval type := $(1)) $(if $(filter $(type),WalletCoordinator),$(call fix_wallet_coordinator_collision)) + $(if $(filter $(type),MaintainerProxy),$(call fix_maintainer_proxy_collision)) endef define fix_wallet_coordinator_collision @perl -pi -e s,BitcoinTxInfo,BitcoinTxInfo2,g ./abi/WalletCoordinator.go endef +define fix_maintainer_proxy_collision + @perl -pi -e s,BitcoinTxUTXO,BitcoinTxUTXO2,g ./abi/MaintainerProxy.go + @perl -pi -e s,BitcoinTxProof,BitcoinTxProof2,g ./abi/MaintainerProxy.go + @perl -pi -e s,BitcoinTxInfo,BitcoinTxInfo3,g ./abi/MaintainerProxy.go +endef + +define after_contract_hook + $(eval type := $(1)) + $(if $(filter $(type),MaintainerProxy),$(call fix_maintainer_proxy_contract_collision)) +endef +define fix_maintainer_proxy_contract_collision + @perl -pi -e s,BitcoinTxUTXO,BitcoinTxUTXO2,g ./contract/MaintainerProxy.go + @perl -pi -e s,BitcoinTxProof,BitcoinTxProof2,g ./contract/MaintainerProxy.go + @perl -pi -e s,BitcoinTxInfo,BitcoinTxInfo3,g ./contract/MaintainerProxy.go + @perl -pi -e s,BitcoinTxUTXO,BitcoinTxUTXO2,g ./cmd/MaintainerProxy.go + @perl -pi -e s,BitcoinTxProof,BitcoinTxProof2,g ./cmd/MaintainerProxy.go + @perl -pi -e s,BitcoinTxInfo,BitcoinTxInfo3,g ./cmd/MaintainerProxy.go +endef include ../../common/gen/Makefile diff --git a/pkg/chain/ethereum/tbtc/gen/_address/MaintainerProxy b/pkg/chain/ethereum/tbtc/gen/_address/MaintainerProxy new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pkg/chain/ethereum/tbtc/gen/abi/Bridge.go b/pkg/chain/ethereum/tbtc/gen/abi/Bridge.go index bbee78096d..ee81eed4c9 100644 --- a/pkg/chain/ethereum/tbtc/gen/abi/Bridge.go +++ b/pkg/chain/ethereum/tbtc/gen/abi/Bridge.go @@ -117,7 +117,7 @@ type WalletsWallet struct { // BridgeMetaData contains all meta data concerning the Bridge contract. var BridgeMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"depositDustThreshold\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"depositTreasuryFeeDivisor\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"depositTxMaxFee\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"depositRevealAheadPeriod\",\"type\":\"uint32\"}],\"name\":\"DepositParametersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"fundingTxHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"fundingOutputIndex\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"depositor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes8\",\"name\":\"blindingFactor\",\"type\":\"bytes8\"},{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"indexed\":false,\"internalType\":\"bytes20\",\"name\":\"refundPubKeyHash\",\"type\":\"bytes20\"},{\"indexed\":false,\"internalType\":\"bytes4\",\"name\":\"refundLocktime\",\"type\":\"bytes4\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"vault\",\"type\":\"address\"}],\"name\":\"DepositRevealed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"sweepTxHash\",\"type\":\"bytes32\"}],\"name\":\"DepositsSwept\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"sighash\",\"type\":\"bytes32\"}],\"name\":\"FraudChallengeDefeatTimedOut\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"sighash\",\"type\":\"bytes32\"}],\"name\":\"FraudChallengeDefeated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"sighash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"FraudChallengeSubmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"fraudChallengeDepositAmount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"fraudChallengeDefeatTimeout\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"fraudSlashingAmount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"fraudNotifierRewardMultiplier\",\"type\":\"uint32\"}],\"name\":\"FraudParametersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldGovernance\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newGovernance\",\"type\":\"address\"}],\"name\":\"GovernanceTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"movingFundsTxHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"movingFundsTxOutputIndex\",\"type\":\"uint32\"}],\"name\":\"MovedFundsSweepTimedOut\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"sweepTxHash\",\"type\":\"bytes32\"}],\"name\":\"MovedFundsSwept\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"MovingFundsBelowDustReported\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"indexed\":false,\"internalType\":\"bytes20[]\",\"name\":\"targetWallets\",\"type\":\"bytes20[]\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"submitter\",\"type\":\"address\"}],\"name\":\"MovingFundsCommitmentSubmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"movingFundsTxHash\",\"type\":\"bytes32\"}],\"name\":\"MovingFundsCompleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"movingFundsTxMaxTotalFee\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"movingFundsDustThreshold\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"movingFundsTimeoutResetDelay\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"movingFundsTimeout\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"movingFundsTimeoutSlashingAmount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"movingFundsTimeoutNotifierRewardMultiplier\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"movingFundsCommitmentGasOffset\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"movedFundsSweepTxMaxTotalFee\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"movedFundsSweepTimeout\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"movedFundsSweepTimeoutSlashingAmount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"movedFundsSweepTimeoutNotifierRewardMultiplier\",\"type\":\"uint32\"}],\"name\":\"MovingFundsParametersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"MovingFundsTimedOut\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"MovingFundsTimeoutReset\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"ecdsaWalletID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"NewWalletRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"NewWalletRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"redemptionDustThreshold\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"redemptionTreasuryFeeDivisor\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"redemptionTxMaxFee\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"redemptionTxMaxTotalFee\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"redemptionTimeout\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"redemptionTimeoutSlashingAmount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"redemptionTimeoutNotifierRewardMultiplier\",\"type\":\"uint32\"}],\"name\":\"RedemptionParametersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"redeemerOutputScript\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"requestedAmount\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"treasuryFee\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"txMaxFee\",\"type\":\"uint64\"}],\"name\":\"RedemptionRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"redeemerOutputScript\",\"type\":\"bytes\"}],\"name\":\"RedemptionTimedOut\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"redemptionTxHash\",\"type\":\"bytes32\"}],\"name\":\"RedemptionsCompleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spvMaintainer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isTrusted\",\"type\":\"bool\"}],\"name\":\"SpvMaintainerStatusUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"}],\"name\":\"TreasuryUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"vault\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isTrusted\",\"type\":\"bool\"}],\"name\":\"VaultStatusUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"ecdsaWalletID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"WalletClosed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"ecdsaWalletID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"WalletClosing\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"ecdsaWalletID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"WalletMovingFunds\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"walletCreationPeriod\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"walletCreationMinBtcBalance\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"walletCreationMaxBtcBalance\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"walletClosureMinBtcBalance\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"walletMaxAge\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"walletMaxBtcTransfer\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"walletClosingPeriod\",\"type\":\"uint32\"}],\"name\":\"WalletParametersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"ecdsaWalletID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"WalletTerminated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"ecdsaWalletID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"publicKeyX\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"publicKeyY\",\"type\":\"bytes32\"}],\"name\":\"__ecdsaWalletCreatedCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"publicKeyX\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"publicKeyY\",\"type\":\"bytes32\"}],\"name\":\"__ecdsaWalletHeartbeatFailedCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"activeWalletPubKeyHash\",\"outputs\":[{\"internalType\":\"bytes20\",\"name\":\"\",\"type\":\"bytes20\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"contractReferences\",\"outputs\":[{\"internalType\":\"contractBank\",\"name\":\"bank\",\"type\":\"address\"},{\"internalType\":\"contractIRelay\",\"name\":\"relay\",\"type\":\"address\"},{\"internalType\":\"contractIWalletRegistry\",\"name\":\"ecdsaWalletRegistry\",\"type\":\"address\"},{\"internalType\":\"contractReimbursementPool\",\"name\":\"reimbursementPool\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"walletPublicKey\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"preimage\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"witness\",\"type\":\"bool\"}],\"name\":\"defeatFraudChallenge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"walletPublicKey\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"heartbeatMessage\",\"type\":\"bytes\"}],\"name\":\"defeatFraudChallengeWithHeartbeat\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositParameters\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"depositDustThreshold\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositTreasuryFeeDivisor\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositTxMaxFee\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"depositRevealAheadPeriod\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"depositKey\",\"type\":\"uint256\"}],\"name\":\"deposits\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"depositor\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"revealedAt\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"vault\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"treasuryFee\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"sweptAt\",\"type\":\"uint32\"}],\"internalType\":\"structDeposit.DepositRequest\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"challengeKey\",\"type\":\"uint256\"}],\"name\":\"fraudChallenges\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"depositAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"reportedAt\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"resolved\",\"type\":\"bool\"}],\"internalType\":\"structFraud.FraudChallenge\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fraudParameters\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"fraudChallengeDepositAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"fraudChallengeDefeatTimeout\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"fraudSlashingAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"fraudNotifierRewardMultiplier\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governance\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_bank\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_relay\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_treasury\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_ecdsaWalletRegistry\",\"type\":\"address\"},{\"internalType\":\"addresspayable\",\"name\":\"_reimbursementPool\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_txProofDifficultyFactor\",\"type\":\"uint96\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vault\",\"type\":\"address\"}],\"name\":\"isVaultTrusted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"liveWalletsCount\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestKey\",\"type\":\"uint256\"}],\"name\":\"movedFundsSweepRequests\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"internalType\":\"uint64\",\"name\":\"value\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"createdAt\",\"type\":\"uint32\"},{\"internalType\":\"enumMovingFunds.MovedFundsSweepRequestState\",\"name\":\"state\",\"type\":\"uint8\"}],\"internalType\":\"structMovingFunds.MovedFundsSweepRequest\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"movingFundsParameters\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"movingFundsTxMaxTotalFee\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"movingFundsDustThreshold\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"movingFundsTimeoutResetDelay\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"movingFundsTimeout\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"movingFundsTimeoutSlashingAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"movingFundsTimeoutNotifierRewardMultiplier\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"movingFundsCommitmentGasOffset\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"movedFundsSweepTxMaxTotalFee\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"movedFundsSweepTimeout\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"movedFundsSweepTimeoutSlashingAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"movedFundsSweepTimeoutNotifierRewardMultiplier\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"walletPublicKey\",\"type\":\"bytes\"},{\"internalType\":\"uint32[]\",\"name\":\"walletMembersIDs\",\"type\":\"uint32[]\"},{\"internalType\":\"bytes\",\"name\":\"preimageSha256\",\"type\":\"bytes\"}],\"name\":\"notifyFraudChallengeDefeatTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"movingFundsTxHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"movingFundsTxOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint32[]\",\"name\":\"walletMembersIDs\",\"type\":\"uint32[]\"}],\"name\":\"notifyMovedFundsSweepTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"mainUtxo\",\"type\":\"tuple\"}],\"name\":\"notifyMovingFundsBelowDust\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"internalType\":\"uint32[]\",\"name\":\"walletMembersIDs\",\"type\":\"uint32[]\"}],\"name\":\"notifyMovingFundsTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"internalType\":\"uint32[]\",\"name\":\"walletMembersIDs\",\"type\":\"uint32[]\"},{\"internalType\":\"bytes\",\"name\":\"redeemerOutputScript\",\"type\":\"bytes\"}],\"name\":\"notifyRedemptionTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"walletMainUtxo\",\"type\":\"tuple\"}],\"name\":\"notifyWalletCloseable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"notifyWalletClosingPeriodElapsed\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"redemptionKey\",\"type\":\"uint256\"}],\"name\":\"pendingRedemptions\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"requestedAmount\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"treasuryFee\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"txMaxFee\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"requestedAt\",\"type\":\"uint32\"}],\"internalType\":\"structRedemption.RedemptionRequest\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"balanceOwner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"redemptionData\",\"type\":\"bytes\"}],\"name\":\"receiveBalanceApproval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"redemptionParameters\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"redemptionDustThreshold\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"redemptionTreasuryFeeDivisor\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"redemptionTxMaxFee\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"redemptionTxMaxTotalFee\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"redemptionTimeout\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"redemptionTimeoutSlashingAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"redemptionTimeoutNotifierRewardMultiplier\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"activeWalletMainUtxo\",\"type\":\"tuple\"}],\"name\":\"requestNewWallet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"mainUtxo\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"redeemerOutputScript\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"}],\"name\":\"requestRedemption\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"resetMovingFundsTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes4\",\"name\":\"version\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"inputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"outputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes4\",\"name\":\"locktime\",\"type\":\"bytes4\"}],\"internalType\":\"structBitcoinTx.Info\",\"name\":\"fundingTx\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fundingOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"bytes8\",\"name\":\"blindingFactor\",\"type\":\"bytes8\"},{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"internalType\":\"bytes20\",\"name\":\"refundPubKeyHash\",\"type\":\"bytes20\"},{\"internalType\":\"bytes4\",\"name\":\"refundLocktime\",\"type\":\"bytes4\"},{\"internalType\":\"address\",\"name\":\"vault\",\"type\":\"address\"}],\"internalType\":\"structDeposit.DepositRevealInfo\",\"name\":\"reveal\",\"type\":\"tuple\"}],\"name\":\"revealDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spvMaintainer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isTrusted\",\"type\":\"bool\"}],\"name\":\"setSpvMaintainerStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vault\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isTrusted\",\"type\":\"bool\"}],\"name\":\"setVaultStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"utxoKey\",\"type\":\"uint256\"}],\"name\":\"spentMainUTXOs\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes4\",\"name\":\"version\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"inputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"outputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes4\",\"name\":\"locktime\",\"type\":\"bytes4\"}],\"internalType\":\"structBitcoinTx.Info\",\"name\":\"sweepTx\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"merkleProof\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"txIndexInBlock\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"bitcoinHeaders\",\"type\":\"bytes\"}],\"internalType\":\"structBitcoinTx.Proof\",\"name\":\"sweepProof\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"mainUtxo\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"vault\",\"type\":\"address\"}],\"name\":\"submitDepositSweepProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"walletPublicKey\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"preimageSha256\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"}],\"internalType\":\"structBitcoinTx.RSVSignature\",\"name\":\"signature\",\"type\":\"tuple\"}],\"name\":\"submitFraudChallenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes4\",\"name\":\"version\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"inputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"outputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes4\",\"name\":\"locktime\",\"type\":\"bytes4\"}],\"internalType\":\"structBitcoinTx.Info\",\"name\":\"sweepTx\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"merkleProof\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"txIndexInBlock\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"bitcoinHeaders\",\"type\":\"bytes\"}],\"internalType\":\"structBitcoinTx.Proof\",\"name\":\"sweepProof\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"mainUtxo\",\"type\":\"tuple\"}],\"name\":\"submitMovedFundsSweepProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"walletMainUtxo\",\"type\":\"tuple\"},{\"internalType\":\"uint32[]\",\"name\":\"walletMembersIDs\",\"type\":\"uint32[]\"},{\"internalType\":\"uint256\",\"name\":\"walletMemberIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes20[]\",\"name\":\"targetWallets\",\"type\":\"bytes20[]\"}],\"name\":\"submitMovingFundsCommitment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes4\",\"name\":\"version\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"inputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"outputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes4\",\"name\":\"locktime\",\"type\":\"bytes4\"}],\"internalType\":\"structBitcoinTx.Info\",\"name\":\"movingFundsTx\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"merkleProof\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"txIndexInBlock\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"bitcoinHeaders\",\"type\":\"bytes\"}],\"internalType\":\"structBitcoinTx.Proof\",\"name\":\"movingFundsProof\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"mainUtxo\",\"type\":\"tuple\"},{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"submitMovingFundsProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes4\",\"name\":\"version\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"inputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"outputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes4\",\"name\":\"locktime\",\"type\":\"bytes4\"}],\"internalType\":\"structBitcoinTx.Info\",\"name\":\"redemptionTx\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"merkleProof\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"txIndexInBlock\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"bitcoinHeaders\",\"type\":\"bytes\"}],\"internalType\":\"structBitcoinTx.Proof\",\"name\":\"redemptionProof\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"mainUtxo\",\"type\":\"tuple\"},{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"submitRedemptionProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"redemptionKey\",\"type\":\"uint256\"}],\"name\":\"timedOutRedemptions\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"requestedAmount\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"treasuryFee\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"txMaxFee\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"requestedAt\",\"type\":\"uint32\"}],\"internalType\":\"structRedemption.RedemptionRequest\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newGovernance\",\"type\":\"address\"}],\"name\":\"transferGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"txProofDifficultyFactor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"depositDustThreshold\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositTreasuryFeeDivisor\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositTxMaxFee\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"depositRevealAheadPeriod\",\"type\":\"uint32\"}],\"name\":\"updateDepositParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"fraudChallengeDepositAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"fraudChallengeDefeatTimeout\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"fraudSlashingAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"fraudNotifierRewardMultiplier\",\"type\":\"uint32\"}],\"name\":\"updateFraudParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"movingFundsTxMaxTotalFee\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"movingFundsDustThreshold\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"movingFundsTimeoutResetDelay\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"movingFundsTimeout\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"movingFundsTimeoutSlashingAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"movingFundsTimeoutNotifierRewardMultiplier\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"movingFundsCommitmentGasOffset\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"movedFundsSweepTxMaxTotalFee\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"movedFundsSweepTimeout\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"movedFundsSweepTimeoutSlashingAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"movedFundsSweepTimeoutNotifierRewardMultiplier\",\"type\":\"uint32\"}],\"name\":\"updateMovingFundsParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"redemptionDustThreshold\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"redemptionTreasuryFeeDivisor\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"redemptionTxMaxFee\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"redemptionTxMaxTotalFee\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"redemptionTimeout\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"redemptionTimeoutSlashingAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"redemptionTimeoutNotifierRewardMultiplier\",\"type\":\"uint32\"}],\"name\":\"updateRedemptionParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"}],\"name\":\"updateTreasury\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"walletCreationPeriod\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"walletCreationMinBtcBalance\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"walletCreationMaxBtcBalance\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"walletClosureMinBtcBalance\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"walletMaxAge\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"walletMaxBtcTransfer\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"walletClosingPeriod\",\"type\":\"uint32\"}],\"name\":\"updateWalletParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"walletParameters\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"walletCreationPeriod\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"walletCreationMinBtcBalance\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"walletCreationMaxBtcBalance\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"walletClosureMinBtcBalance\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"walletMaxAge\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"walletMaxBtcTransfer\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"walletClosingPeriod\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"wallets\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ecdsaWalletID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mainUtxoHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"pendingRedemptionsValue\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"createdAt\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"movingFundsRequestedAt\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"closingStartedAt\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"pendingMovedFundsSweepRequestsCount\",\"type\":\"uint32\"},{\"internalType\":\"enumWallets.WalletState\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"movingFundsTargetWalletsCommitmentHash\",\"type\":\"bytes32\"}],\"internalType\":\"structWallets.Wallet\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"depositDustThreshold\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"depositTreasuryFeeDivisor\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"depositTxMaxFee\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"depositRevealAheadPeriod\",\"type\":\"uint32\"}],\"name\":\"DepositParametersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"fundingTxHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"fundingOutputIndex\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"depositor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes8\",\"name\":\"blindingFactor\",\"type\":\"bytes8\"},{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"indexed\":false,\"internalType\":\"bytes20\",\"name\":\"refundPubKeyHash\",\"type\":\"bytes20\"},{\"indexed\":false,\"internalType\":\"bytes4\",\"name\":\"refundLocktime\",\"type\":\"bytes4\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"vault\",\"type\":\"address\"}],\"name\":\"DepositRevealed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"sweepTxHash\",\"type\":\"bytes32\"}],\"name\":\"DepositsSwept\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"sighash\",\"type\":\"bytes32\"}],\"name\":\"FraudChallengeDefeatTimedOut\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"sighash\",\"type\":\"bytes32\"}],\"name\":\"FraudChallengeDefeated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"sighash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"FraudChallengeSubmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"fraudChallengeDepositAmount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"fraudChallengeDefeatTimeout\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"fraudSlashingAmount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"fraudNotifierRewardMultiplier\",\"type\":\"uint32\"}],\"name\":\"FraudParametersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldGovernance\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newGovernance\",\"type\":\"address\"}],\"name\":\"GovernanceTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"movingFundsTxHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"movingFundsTxOutputIndex\",\"type\":\"uint32\"}],\"name\":\"MovedFundsSweepTimedOut\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"sweepTxHash\",\"type\":\"bytes32\"}],\"name\":\"MovedFundsSwept\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"MovingFundsBelowDustReported\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"indexed\":false,\"internalType\":\"bytes20[]\",\"name\":\"targetWallets\",\"type\":\"bytes20[]\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"submitter\",\"type\":\"address\"}],\"name\":\"MovingFundsCommitmentSubmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"movingFundsTxHash\",\"type\":\"bytes32\"}],\"name\":\"MovingFundsCompleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"movingFundsTxMaxTotalFee\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"movingFundsDustThreshold\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"movingFundsTimeoutResetDelay\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"movingFundsTimeout\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"movingFundsTimeoutSlashingAmount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"movingFundsTimeoutNotifierRewardMultiplier\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"movingFundsCommitmentGasOffset\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"movedFundsSweepTxMaxTotalFee\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"movedFundsSweepTimeout\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"movedFundsSweepTimeoutSlashingAmount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"movedFundsSweepTimeoutNotifierRewardMultiplier\",\"type\":\"uint32\"}],\"name\":\"MovingFundsParametersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"MovingFundsTimedOut\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"MovingFundsTimeoutReset\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"ecdsaWalletID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"NewWalletRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"NewWalletRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"redemptionDustThreshold\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"redemptionTreasuryFeeDivisor\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"redemptionTxMaxFee\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"redemptionTxMaxTotalFee\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"redemptionTimeout\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"redemptionTimeoutSlashingAmount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"redemptionTimeoutNotifierRewardMultiplier\",\"type\":\"uint32\"}],\"name\":\"RedemptionParametersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"redeemerOutputScript\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"requestedAmount\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"treasuryFee\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"txMaxFee\",\"type\":\"uint64\"}],\"name\":\"RedemptionRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"redeemerOutputScript\",\"type\":\"bytes\"}],\"name\":\"RedemptionTimedOut\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"redemptionTxHash\",\"type\":\"bytes32\"}],\"name\":\"RedemptionsCompleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spvMaintainer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isTrusted\",\"type\":\"bool\"}],\"name\":\"SpvMaintainerStatusUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"}],\"name\":\"TreasuryUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"vault\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isTrusted\",\"type\":\"bool\"}],\"name\":\"VaultStatusUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"ecdsaWalletID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"WalletClosed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"ecdsaWalletID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"WalletClosing\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"ecdsaWalletID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"WalletMovingFunds\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"walletCreationPeriod\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"walletCreationMinBtcBalance\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"walletCreationMaxBtcBalance\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"walletClosureMinBtcBalance\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"walletMaxAge\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"walletMaxBtcTransfer\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"walletClosingPeriod\",\"type\":\"uint32\"}],\"name\":\"WalletParametersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"ecdsaWalletID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"WalletTerminated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"ecdsaWalletID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"publicKeyX\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"publicKeyY\",\"type\":\"bytes32\"}],\"name\":\"__ecdsaWalletCreatedCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"publicKeyX\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"publicKeyY\",\"type\":\"bytes32\"}],\"name\":\"__ecdsaWalletHeartbeatFailedCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"activeWalletPubKeyHash\",\"outputs\":[{\"internalType\":\"bytes20\",\"name\":\"\",\"type\":\"bytes20\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"contractReferences\",\"outputs\":[{\"internalType\":\"contractBank\",\"name\":\"bank\",\"type\":\"address\"},{\"internalType\":\"contractIRelay\",\"name\":\"relay\",\"type\":\"address\"},{\"internalType\":\"contractIWalletRegistry\",\"name\":\"ecdsaWalletRegistry\",\"type\":\"address\"},{\"internalType\":\"contractReimbursementPool\",\"name\":\"reimbursementPool\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"walletPublicKey\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"preimage\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"witness\",\"type\":\"bool\"}],\"name\":\"defeatFraudChallenge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"walletPublicKey\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"heartbeatMessage\",\"type\":\"bytes\"}],\"name\":\"defeatFraudChallengeWithHeartbeat\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositParameters\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"depositDustThreshold\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositTreasuryFeeDivisor\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositTxMaxFee\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"depositRevealAheadPeriod\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"depositKey\",\"type\":\"uint256\"}],\"name\":\"deposits\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"depositor\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"revealedAt\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"vault\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"treasuryFee\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"sweptAt\",\"type\":\"uint32\"}],\"internalType\":\"structDeposit.DepositRequest\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"challengeKey\",\"type\":\"uint256\"}],\"name\":\"fraudChallenges\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"depositAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"reportedAt\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"resolved\",\"type\":\"bool\"}],\"internalType\":\"structFraud.FraudChallenge\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fraudParameters\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"fraudChallengeDepositAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"fraudChallengeDefeatTimeout\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"fraudSlashingAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"fraudNotifierRewardMultiplier\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governance\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_bank\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_relay\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_treasury\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_ecdsaWalletRegistry\",\"type\":\"address\"},{\"internalType\":\"addresspayable\",\"name\":\"_reimbursementPool\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_txProofDifficultyFactor\",\"type\":\"uint96\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vault\",\"type\":\"address\"}],\"name\":\"isVaultTrusted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"liveWalletsCount\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestKey\",\"type\":\"uint256\"}],\"name\":\"movedFundsSweepRequests\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"internalType\":\"uint64\",\"name\":\"value\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"createdAt\",\"type\":\"uint32\"},{\"internalType\":\"enumMovingFunds.MovedFundsSweepRequestState\",\"name\":\"state\",\"type\":\"uint8\"}],\"internalType\":\"structMovingFunds.MovedFundsSweepRequest\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"movingFundsParameters\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"movingFundsTxMaxTotalFee\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"movingFundsDustThreshold\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"movingFundsTimeoutResetDelay\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"movingFundsTimeout\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"movingFundsTimeoutSlashingAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"movingFundsTimeoutNotifierRewardMultiplier\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"movingFundsCommitmentGasOffset\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"movedFundsSweepTxMaxTotalFee\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"movedFundsSweepTimeout\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"movedFundsSweepTimeoutSlashingAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"movedFundsSweepTimeoutNotifierRewardMultiplier\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"walletPublicKey\",\"type\":\"bytes\"},{\"internalType\":\"uint32[]\",\"name\":\"walletMembersIDs\",\"type\":\"uint32[]\"},{\"internalType\":\"bytes\",\"name\":\"preimageSha256\",\"type\":\"bytes\"}],\"name\":\"notifyFraudChallengeDefeatTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"movingFundsTxHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"movingFundsTxOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint32[]\",\"name\":\"walletMembersIDs\",\"type\":\"uint32[]\"}],\"name\":\"notifyMovedFundsSweepTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"mainUtxo\",\"type\":\"tuple\"}],\"name\":\"notifyMovingFundsBelowDust\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"internalType\":\"uint32[]\",\"name\":\"walletMembersIDs\",\"type\":\"uint32[]\"}],\"name\":\"notifyMovingFundsTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"internalType\":\"uint32[]\",\"name\":\"walletMembersIDs\",\"type\":\"uint32[]\"},{\"internalType\":\"bytes\",\"name\":\"redeemerOutputScript\",\"type\":\"bytes\"}],\"name\":\"notifyRedemptionTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"walletMainUtxo\",\"type\":\"tuple\"}],\"name\":\"notifyWalletCloseable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"notifyWalletClosingPeriodElapsed\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"redemptionKey\",\"type\":\"uint256\"}],\"name\":\"pendingRedemptions\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"requestedAmount\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"treasuryFee\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"txMaxFee\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"requestedAt\",\"type\":\"uint32\"}],\"internalType\":\"structRedemption.RedemptionRequest\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"utxo\",\"type\":\"tuple\"}],\"name\":\"processPendingMovedFundsSweepRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"balanceOwner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"redemptionData\",\"type\":\"bytes\"}],\"name\":\"receiveBalanceApproval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"redemptionParameters\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"redemptionDustThreshold\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"redemptionTreasuryFeeDivisor\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"redemptionTxMaxFee\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"redemptionTxMaxTotalFee\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"redemptionTimeout\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"redemptionTimeoutSlashingAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"redemptionTimeoutNotifierRewardMultiplier\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"activeWalletMainUtxo\",\"type\":\"tuple\"}],\"name\":\"requestNewWallet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"mainUtxo\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"redeemerOutputScript\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"}],\"name\":\"requestRedemption\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"resetMovingFundsTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes4\",\"name\":\"version\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"inputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"outputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes4\",\"name\":\"locktime\",\"type\":\"bytes4\"}],\"internalType\":\"structBitcoinTx.Info\",\"name\":\"fundingTx\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fundingOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"bytes8\",\"name\":\"blindingFactor\",\"type\":\"bytes8\"},{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"internalType\":\"bytes20\",\"name\":\"refundPubKeyHash\",\"type\":\"bytes20\"},{\"internalType\":\"bytes4\",\"name\":\"refundLocktime\",\"type\":\"bytes4\"},{\"internalType\":\"address\",\"name\":\"vault\",\"type\":\"address\"}],\"internalType\":\"structDeposit.DepositRevealInfo\",\"name\":\"reveal\",\"type\":\"tuple\"}],\"name\":\"revealDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"activeWalletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"setActiveWallet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_depositDustThreshold\",\"type\":\"uint64\"}],\"name\":\"setDepositDustThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_depositRevealAheadPeriod\",\"type\":\"uint32\"}],\"name\":\"setDepositRevealAheadPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_depositTxMaxFee\",\"type\":\"uint64\"}],\"name\":\"setDepositTxMaxFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_movedFundsSweepTxMaxTotalFee\",\"type\":\"uint64\"}],\"name\":\"setMovedFundsSweepTxMaxTotalFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"utxo\",\"type\":\"tuple\"}],\"name\":\"setPendingMovedFundsSweepRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO[]\",\"name\":\"utxos\",\"type\":\"tuple[]\"}],\"name\":\"setProcessedMovedFundsSweepRequests\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_redemptionDustThreshold\",\"type\":\"uint64\"}],\"name\":\"setRedemptionDustThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_redemptionTreasuryFeeDivisor\",\"type\":\"uint64\"}],\"name\":\"setRedemptionTreasuryFeeDivisor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO[]\",\"name\":\"utxos\",\"type\":\"tuple[]\"}],\"name\":\"setSpentMainUtxos\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spvMaintainer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isTrusted\",\"type\":\"bool\"}],\"name\":\"setSpvMaintainerStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO[]\",\"name\":\"utxos\",\"type\":\"tuple[]\"}],\"name\":\"setSweptDeposits\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vault\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isTrusted\",\"type\":\"bool\"}],\"name\":\"setVaultStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ecdsaWalletID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mainUtxoHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"pendingRedemptionsValue\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"createdAt\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"movingFundsRequestedAt\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"closingStartedAt\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"pendingMovedFundsSweepRequestsCount\",\"type\":\"uint32\"},{\"internalType\":\"enumWallets.WalletState\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"movingFundsTargetWalletsCommitmentHash\",\"type\":\"bytes32\"}],\"internalType\":\"structWallets.Wallet\",\"name\":\"wallet\",\"type\":\"tuple\"}],\"name\":\"setWallet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"utxo\",\"type\":\"tuple\"}],\"name\":\"setWalletMainUtxo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"utxoKey\",\"type\":\"uint256\"}],\"name\":\"spentMainUTXOs\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes4\",\"name\":\"version\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"inputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"outputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes4\",\"name\":\"locktime\",\"type\":\"bytes4\"}],\"internalType\":\"structBitcoinTx.Info\",\"name\":\"sweepTx\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"merkleProof\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"txIndexInBlock\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"bitcoinHeaders\",\"type\":\"bytes\"}],\"internalType\":\"structBitcoinTx.Proof\",\"name\":\"sweepProof\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"mainUtxo\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"vault\",\"type\":\"address\"}],\"name\":\"submitDepositSweepProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"walletPublicKey\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"preimageSha256\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"}],\"internalType\":\"structBitcoinTx.RSVSignature\",\"name\":\"signature\",\"type\":\"tuple\"}],\"name\":\"submitFraudChallenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes4\",\"name\":\"version\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"inputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"outputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes4\",\"name\":\"locktime\",\"type\":\"bytes4\"}],\"internalType\":\"structBitcoinTx.Info\",\"name\":\"sweepTx\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"merkleProof\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"txIndexInBlock\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"bitcoinHeaders\",\"type\":\"bytes\"}],\"internalType\":\"structBitcoinTx.Proof\",\"name\":\"sweepProof\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"mainUtxo\",\"type\":\"tuple\"}],\"name\":\"submitMovedFundsSweepProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"walletMainUtxo\",\"type\":\"tuple\"},{\"internalType\":\"uint32[]\",\"name\":\"walletMembersIDs\",\"type\":\"uint32[]\"},{\"internalType\":\"uint256\",\"name\":\"walletMemberIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes20[]\",\"name\":\"targetWallets\",\"type\":\"bytes20[]\"}],\"name\":\"submitMovingFundsCommitment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes4\",\"name\":\"version\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"inputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"outputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes4\",\"name\":\"locktime\",\"type\":\"bytes4\"}],\"internalType\":\"structBitcoinTx.Info\",\"name\":\"movingFundsTx\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"merkleProof\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"txIndexInBlock\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"bitcoinHeaders\",\"type\":\"bytes\"}],\"internalType\":\"structBitcoinTx.Proof\",\"name\":\"movingFundsProof\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"mainUtxo\",\"type\":\"tuple\"},{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"submitMovingFundsProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes4\",\"name\":\"version\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"inputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"outputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes4\",\"name\":\"locktime\",\"type\":\"bytes4\"}],\"internalType\":\"structBitcoinTx.Info\",\"name\":\"redemptionTx\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"merkleProof\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"txIndexInBlock\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"bitcoinHeaders\",\"type\":\"bytes\"}],\"internalType\":\"structBitcoinTx.Proof\",\"name\":\"redemptionProof\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"mainUtxo\",\"type\":\"tuple\"},{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"submitRedemptionProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"redemptionKey\",\"type\":\"uint256\"}],\"name\":\"timedOutRedemptions\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"requestedAmount\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"treasuryFee\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"txMaxFee\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"requestedAt\",\"type\":\"uint32\"}],\"internalType\":\"structRedemption.RedemptionRequest\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"utxo\",\"type\":\"tuple\"}],\"name\":\"timeoutPendingMovedFundsSweepRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newGovernance\",\"type\":\"address\"}],\"name\":\"transferGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"txProofDifficultyFactor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"depositDustThreshold\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositTreasuryFeeDivisor\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositTxMaxFee\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"depositRevealAheadPeriod\",\"type\":\"uint32\"}],\"name\":\"updateDepositParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"fraudChallengeDepositAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"fraudChallengeDefeatTimeout\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"fraudSlashingAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"fraudNotifierRewardMultiplier\",\"type\":\"uint32\"}],\"name\":\"updateFraudParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"movingFundsTxMaxTotalFee\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"movingFundsDustThreshold\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"movingFundsTimeoutResetDelay\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"movingFundsTimeout\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"movingFundsTimeoutSlashingAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"movingFundsTimeoutNotifierRewardMultiplier\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"movingFundsCommitmentGasOffset\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"movedFundsSweepTxMaxTotalFee\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"movedFundsSweepTimeout\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"movedFundsSweepTimeoutSlashingAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"movedFundsSweepTimeoutNotifierRewardMultiplier\",\"type\":\"uint32\"}],\"name\":\"updateMovingFundsParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"redemptionDustThreshold\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"redemptionTreasuryFeeDivisor\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"redemptionTxMaxFee\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"redemptionTxMaxTotalFee\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"redemptionTimeout\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"redemptionTimeoutSlashingAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"redemptionTimeoutNotifierRewardMultiplier\",\"type\":\"uint32\"}],\"name\":\"updateRedemptionParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"}],\"name\":\"updateTreasury\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"walletCreationPeriod\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"walletCreationMinBtcBalance\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"walletCreationMaxBtcBalance\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"walletClosureMinBtcBalance\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"walletMaxAge\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"walletMaxBtcTransfer\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"walletClosingPeriod\",\"type\":\"uint32\"}],\"name\":\"updateWalletParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"walletParameters\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"walletCreationPeriod\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"walletCreationMinBtcBalance\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"walletCreationMaxBtcBalance\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"walletClosureMinBtcBalance\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"walletMaxAge\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"walletMaxBtcTransfer\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"walletClosingPeriod\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"wallets\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ecdsaWalletID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mainUtxoHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"pendingRedemptionsValue\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"createdAt\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"movingFundsRequestedAt\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"closingStartedAt\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"pendingMovedFundsSweepRequestsCount\",\"type\":\"uint32\"},{\"internalType\":\"enumWallets.WalletState\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"movingFundsTargetWalletsCommitmentHash\",\"type\":\"bytes32\"}],\"internalType\":\"structWallets.Wallet\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", } // BridgeABI is the input ABI used to generate the binding from. @@ -1316,6 +1316,27 @@ func (_Bridge *BridgeTransactorSession) NotifyWalletClosingPeriodElapsed(walletP return _Bridge.Contract.NotifyWalletClosingPeriodElapsed(&_Bridge.TransactOpts, walletPubKeyHash) } +// ProcessPendingMovedFundsSweepRequest is a paid mutator transaction binding the contract method 0x61879905. +// +// Solidity: function processPendingMovedFundsSweepRequest(bytes20 walletPubKeyHash, (bytes32,uint32,uint64) utxo) returns() +func (_Bridge *BridgeTransactor) ProcessPendingMovedFundsSweepRequest(opts *bind.TransactOpts, walletPubKeyHash [20]byte, utxo BitcoinTxUTXO) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "processPendingMovedFundsSweepRequest", walletPubKeyHash, utxo) +} + +// ProcessPendingMovedFundsSweepRequest is a paid mutator transaction binding the contract method 0x61879905. +// +// Solidity: function processPendingMovedFundsSweepRequest(bytes20 walletPubKeyHash, (bytes32,uint32,uint64) utxo) returns() +func (_Bridge *BridgeSession) ProcessPendingMovedFundsSweepRequest(walletPubKeyHash [20]byte, utxo BitcoinTxUTXO) (*types.Transaction, error) { + return _Bridge.Contract.ProcessPendingMovedFundsSweepRequest(&_Bridge.TransactOpts, walletPubKeyHash, utxo) +} + +// ProcessPendingMovedFundsSweepRequest is a paid mutator transaction binding the contract method 0x61879905. +// +// Solidity: function processPendingMovedFundsSweepRequest(bytes20 walletPubKeyHash, (bytes32,uint32,uint64) utxo) returns() +func (_Bridge *BridgeTransactorSession) ProcessPendingMovedFundsSweepRequest(walletPubKeyHash [20]byte, utxo BitcoinTxUTXO) (*types.Transaction, error) { + return _Bridge.Contract.ProcessPendingMovedFundsSweepRequest(&_Bridge.TransactOpts, walletPubKeyHash, utxo) +} + // ReceiveBalanceApproval is a paid mutator transaction binding the contract method 0x475d0570. // // Solidity: function receiveBalanceApproval(address balanceOwner, uint256 amount, bytes redemptionData) returns() @@ -1421,6 +1442,216 @@ func (_Bridge *BridgeTransactorSession) RevealDeposit(fundingTx BitcoinTxInfo, r return _Bridge.Contract.RevealDeposit(&_Bridge.TransactOpts, fundingTx, reveal) } +// SetActiveWallet is a paid mutator transaction binding the contract method 0xdf7cd4ae. +// +// Solidity: function setActiveWallet(bytes20 activeWalletPubKeyHash) returns() +func (_Bridge *BridgeTransactor) SetActiveWallet(opts *bind.TransactOpts, activeWalletPubKeyHash [20]byte) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "setActiveWallet", activeWalletPubKeyHash) +} + +// SetActiveWallet is a paid mutator transaction binding the contract method 0xdf7cd4ae. +// +// Solidity: function setActiveWallet(bytes20 activeWalletPubKeyHash) returns() +func (_Bridge *BridgeSession) SetActiveWallet(activeWalletPubKeyHash [20]byte) (*types.Transaction, error) { + return _Bridge.Contract.SetActiveWallet(&_Bridge.TransactOpts, activeWalletPubKeyHash) +} + +// SetActiveWallet is a paid mutator transaction binding the contract method 0xdf7cd4ae. +// +// Solidity: function setActiveWallet(bytes20 activeWalletPubKeyHash) returns() +func (_Bridge *BridgeTransactorSession) SetActiveWallet(activeWalletPubKeyHash [20]byte) (*types.Transaction, error) { + return _Bridge.Contract.SetActiveWallet(&_Bridge.TransactOpts, activeWalletPubKeyHash) +} + +// SetDepositDustThreshold is a paid mutator transaction binding the contract method 0x59e6a456. +// +// Solidity: function setDepositDustThreshold(uint64 _depositDustThreshold) returns() +func (_Bridge *BridgeTransactor) SetDepositDustThreshold(opts *bind.TransactOpts, _depositDustThreshold uint64) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "setDepositDustThreshold", _depositDustThreshold) +} + +// SetDepositDustThreshold is a paid mutator transaction binding the contract method 0x59e6a456. +// +// Solidity: function setDepositDustThreshold(uint64 _depositDustThreshold) returns() +func (_Bridge *BridgeSession) SetDepositDustThreshold(_depositDustThreshold uint64) (*types.Transaction, error) { + return _Bridge.Contract.SetDepositDustThreshold(&_Bridge.TransactOpts, _depositDustThreshold) +} + +// SetDepositDustThreshold is a paid mutator transaction binding the contract method 0x59e6a456. +// +// Solidity: function setDepositDustThreshold(uint64 _depositDustThreshold) returns() +func (_Bridge *BridgeTransactorSession) SetDepositDustThreshold(_depositDustThreshold uint64) (*types.Transaction, error) { + return _Bridge.Contract.SetDepositDustThreshold(&_Bridge.TransactOpts, _depositDustThreshold) +} + +// SetDepositRevealAheadPeriod is a paid mutator transaction binding the contract method 0x539c6322. +// +// Solidity: function setDepositRevealAheadPeriod(uint32 _depositRevealAheadPeriod) returns() +func (_Bridge *BridgeTransactor) SetDepositRevealAheadPeriod(opts *bind.TransactOpts, _depositRevealAheadPeriod uint32) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "setDepositRevealAheadPeriod", _depositRevealAheadPeriod) +} + +// SetDepositRevealAheadPeriod is a paid mutator transaction binding the contract method 0x539c6322. +// +// Solidity: function setDepositRevealAheadPeriod(uint32 _depositRevealAheadPeriod) returns() +func (_Bridge *BridgeSession) SetDepositRevealAheadPeriod(_depositRevealAheadPeriod uint32) (*types.Transaction, error) { + return _Bridge.Contract.SetDepositRevealAheadPeriod(&_Bridge.TransactOpts, _depositRevealAheadPeriod) +} + +// SetDepositRevealAheadPeriod is a paid mutator transaction binding the contract method 0x539c6322. +// +// Solidity: function setDepositRevealAheadPeriod(uint32 _depositRevealAheadPeriod) returns() +func (_Bridge *BridgeTransactorSession) SetDepositRevealAheadPeriod(_depositRevealAheadPeriod uint32) (*types.Transaction, error) { + return _Bridge.Contract.SetDepositRevealAheadPeriod(&_Bridge.TransactOpts, _depositRevealAheadPeriod) +} + +// SetDepositTxMaxFee is a paid mutator transaction binding the contract method 0xb036c1ee. +// +// Solidity: function setDepositTxMaxFee(uint64 _depositTxMaxFee) returns() +func (_Bridge *BridgeTransactor) SetDepositTxMaxFee(opts *bind.TransactOpts, _depositTxMaxFee uint64) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "setDepositTxMaxFee", _depositTxMaxFee) +} + +// SetDepositTxMaxFee is a paid mutator transaction binding the contract method 0xb036c1ee. +// +// Solidity: function setDepositTxMaxFee(uint64 _depositTxMaxFee) returns() +func (_Bridge *BridgeSession) SetDepositTxMaxFee(_depositTxMaxFee uint64) (*types.Transaction, error) { + return _Bridge.Contract.SetDepositTxMaxFee(&_Bridge.TransactOpts, _depositTxMaxFee) +} + +// SetDepositTxMaxFee is a paid mutator transaction binding the contract method 0xb036c1ee. +// +// Solidity: function setDepositTxMaxFee(uint64 _depositTxMaxFee) returns() +func (_Bridge *BridgeTransactorSession) SetDepositTxMaxFee(_depositTxMaxFee uint64) (*types.Transaction, error) { + return _Bridge.Contract.SetDepositTxMaxFee(&_Bridge.TransactOpts, _depositTxMaxFee) +} + +// SetMovedFundsSweepTxMaxTotalFee is a paid mutator transaction binding the contract method 0xf139b088. +// +// Solidity: function setMovedFundsSweepTxMaxTotalFee(uint64 _movedFundsSweepTxMaxTotalFee) returns() +func (_Bridge *BridgeTransactor) SetMovedFundsSweepTxMaxTotalFee(opts *bind.TransactOpts, _movedFundsSweepTxMaxTotalFee uint64) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "setMovedFundsSweepTxMaxTotalFee", _movedFundsSweepTxMaxTotalFee) +} + +// SetMovedFundsSweepTxMaxTotalFee is a paid mutator transaction binding the contract method 0xf139b088. +// +// Solidity: function setMovedFundsSweepTxMaxTotalFee(uint64 _movedFundsSweepTxMaxTotalFee) returns() +func (_Bridge *BridgeSession) SetMovedFundsSweepTxMaxTotalFee(_movedFundsSweepTxMaxTotalFee uint64) (*types.Transaction, error) { + return _Bridge.Contract.SetMovedFundsSweepTxMaxTotalFee(&_Bridge.TransactOpts, _movedFundsSweepTxMaxTotalFee) +} + +// SetMovedFundsSweepTxMaxTotalFee is a paid mutator transaction binding the contract method 0xf139b088. +// +// Solidity: function setMovedFundsSweepTxMaxTotalFee(uint64 _movedFundsSweepTxMaxTotalFee) returns() +func (_Bridge *BridgeTransactorSession) SetMovedFundsSweepTxMaxTotalFee(_movedFundsSweepTxMaxTotalFee uint64) (*types.Transaction, error) { + return _Bridge.Contract.SetMovedFundsSweepTxMaxTotalFee(&_Bridge.TransactOpts, _movedFundsSweepTxMaxTotalFee) +} + +// SetPendingMovedFundsSweepRequest is a paid mutator transaction binding the contract method 0x07453444. +// +// Solidity: function setPendingMovedFundsSweepRequest(bytes20 walletPubKeyHash, (bytes32,uint32,uint64) utxo) returns() +func (_Bridge *BridgeTransactor) SetPendingMovedFundsSweepRequest(opts *bind.TransactOpts, walletPubKeyHash [20]byte, utxo BitcoinTxUTXO) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "setPendingMovedFundsSweepRequest", walletPubKeyHash, utxo) +} + +// SetPendingMovedFundsSweepRequest is a paid mutator transaction binding the contract method 0x07453444. +// +// Solidity: function setPendingMovedFundsSweepRequest(bytes20 walletPubKeyHash, (bytes32,uint32,uint64) utxo) returns() +func (_Bridge *BridgeSession) SetPendingMovedFundsSweepRequest(walletPubKeyHash [20]byte, utxo BitcoinTxUTXO) (*types.Transaction, error) { + return _Bridge.Contract.SetPendingMovedFundsSweepRequest(&_Bridge.TransactOpts, walletPubKeyHash, utxo) +} + +// SetPendingMovedFundsSweepRequest is a paid mutator transaction binding the contract method 0x07453444. +// +// Solidity: function setPendingMovedFundsSweepRequest(bytes20 walletPubKeyHash, (bytes32,uint32,uint64) utxo) returns() +func (_Bridge *BridgeTransactorSession) SetPendingMovedFundsSweepRequest(walletPubKeyHash [20]byte, utxo BitcoinTxUTXO) (*types.Transaction, error) { + return _Bridge.Contract.SetPendingMovedFundsSweepRequest(&_Bridge.TransactOpts, walletPubKeyHash, utxo) +} + +// SetProcessedMovedFundsSweepRequests is a paid mutator transaction binding the contract method 0xdccfb3b9. +// +// Solidity: function setProcessedMovedFundsSweepRequests((bytes32,uint32,uint64)[] utxos) returns() +func (_Bridge *BridgeTransactor) SetProcessedMovedFundsSweepRequests(opts *bind.TransactOpts, utxos []BitcoinTxUTXO) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "setProcessedMovedFundsSweepRequests", utxos) +} + +// SetProcessedMovedFundsSweepRequests is a paid mutator transaction binding the contract method 0xdccfb3b9. +// +// Solidity: function setProcessedMovedFundsSweepRequests((bytes32,uint32,uint64)[] utxos) returns() +func (_Bridge *BridgeSession) SetProcessedMovedFundsSweepRequests(utxos []BitcoinTxUTXO) (*types.Transaction, error) { + return _Bridge.Contract.SetProcessedMovedFundsSweepRequests(&_Bridge.TransactOpts, utxos) +} + +// SetProcessedMovedFundsSweepRequests is a paid mutator transaction binding the contract method 0xdccfb3b9. +// +// Solidity: function setProcessedMovedFundsSweepRequests((bytes32,uint32,uint64)[] utxos) returns() +func (_Bridge *BridgeTransactorSession) SetProcessedMovedFundsSweepRequests(utxos []BitcoinTxUTXO) (*types.Transaction, error) { + return _Bridge.Contract.SetProcessedMovedFundsSweepRequests(&_Bridge.TransactOpts, utxos) +} + +// SetRedemptionDustThreshold is a paid mutator transaction binding the contract method 0x3c0038f4. +// +// Solidity: function setRedemptionDustThreshold(uint64 _redemptionDustThreshold) returns() +func (_Bridge *BridgeTransactor) SetRedemptionDustThreshold(opts *bind.TransactOpts, _redemptionDustThreshold uint64) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "setRedemptionDustThreshold", _redemptionDustThreshold) +} + +// SetRedemptionDustThreshold is a paid mutator transaction binding the contract method 0x3c0038f4. +// +// Solidity: function setRedemptionDustThreshold(uint64 _redemptionDustThreshold) returns() +func (_Bridge *BridgeSession) SetRedemptionDustThreshold(_redemptionDustThreshold uint64) (*types.Transaction, error) { + return _Bridge.Contract.SetRedemptionDustThreshold(&_Bridge.TransactOpts, _redemptionDustThreshold) +} + +// SetRedemptionDustThreshold is a paid mutator transaction binding the contract method 0x3c0038f4. +// +// Solidity: function setRedemptionDustThreshold(uint64 _redemptionDustThreshold) returns() +func (_Bridge *BridgeTransactorSession) SetRedemptionDustThreshold(_redemptionDustThreshold uint64) (*types.Transaction, error) { + return _Bridge.Contract.SetRedemptionDustThreshold(&_Bridge.TransactOpts, _redemptionDustThreshold) +} + +// SetRedemptionTreasuryFeeDivisor is a paid mutator transaction binding the contract method 0x6c854186. +// +// Solidity: function setRedemptionTreasuryFeeDivisor(uint64 _redemptionTreasuryFeeDivisor) returns() +func (_Bridge *BridgeTransactor) SetRedemptionTreasuryFeeDivisor(opts *bind.TransactOpts, _redemptionTreasuryFeeDivisor uint64) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "setRedemptionTreasuryFeeDivisor", _redemptionTreasuryFeeDivisor) +} + +// SetRedemptionTreasuryFeeDivisor is a paid mutator transaction binding the contract method 0x6c854186. +// +// Solidity: function setRedemptionTreasuryFeeDivisor(uint64 _redemptionTreasuryFeeDivisor) returns() +func (_Bridge *BridgeSession) SetRedemptionTreasuryFeeDivisor(_redemptionTreasuryFeeDivisor uint64) (*types.Transaction, error) { + return _Bridge.Contract.SetRedemptionTreasuryFeeDivisor(&_Bridge.TransactOpts, _redemptionTreasuryFeeDivisor) +} + +// SetRedemptionTreasuryFeeDivisor is a paid mutator transaction binding the contract method 0x6c854186. +// +// Solidity: function setRedemptionTreasuryFeeDivisor(uint64 _redemptionTreasuryFeeDivisor) returns() +func (_Bridge *BridgeTransactorSession) SetRedemptionTreasuryFeeDivisor(_redemptionTreasuryFeeDivisor uint64) (*types.Transaction, error) { + return _Bridge.Contract.SetRedemptionTreasuryFeeDivisor(&_Bridge.TransactOpts, _redemptionTreasuryFeeDivisor) +} + +// SetSpentMainUtxos is a paid mutator transaction binding the contract method 0x74babd9c. +// +// Solidity: function setSpentMainUtxos((bytes32,uint32,uint64)[] utxos) returns() +func (_Bridge *BridgeTransactor) SetSpentMainUtxos(opts *bind.TransactOpts, utxos []BitcoinTxUTXO) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "setSpentMainUtxos", utxos) +} + +// SetSpentMainUtxos is a paid mutator transaction binding the contract method 0x74babd9c. +// +// Solidity: function setSpentMainUtxos((bytes32,uint32,uint64)[] utxos) returns() +func (_Bridge *BridgeSession) SetSpentMainUtxos(utxos []BitcoinTxUTXO) (*types.Transaction, error) { + return _Bridge.Contract.SetSpentMainUtxos(&_Bridge.TransactOpts, utxos) +} + +// SetSpentMainUtxos is a paid mutator transaction binding the contract method 0x74babd9c. +// +// Solidity: function setSpentMainUtxos((bytes32,uint32,uint64)[] utxos) returns() +func (_Bridge *BridgeTransactorSession) SetSpentMainUtxos(utxos []BitcoinTxUTXO) (*types.Transaction, error) { + return _Bridge.Contract.SetSpentMainUtxos(&_Bridge.TransactOpts, utxos) +} + // SetSpvMaintainerStatus is a paid mutator transaction binding the contract method 0x5f2b2d0d. // // Solidity: function setSpvMaintainerStatus(address spvMaintainer, bool isTrusted) returns() @@ -1442,6 +1673,27 @@ func (_Bridge *BridgeTransactorSession) SetSpvMaintainerStatus(spvMaintainer com return _Bridge.Contract.SetSpvMaintainerStatus(&_Bridge.TransactOpts, spvMaintainer, isTrusted) } +// SetSweptDeposits is a paid mutator transaction binding the contract method 0xb8afb0a5. +// +// Solidity: function setSweptDeposits((bytes32,uint32,uint64)[] utxos) returns() +func (_Bridge *BridgeTransactor) SetSweptDeposits(opts *bind.TransactOpts, utxos []BitcoinTxUTXO) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "setSweptDeposits", utxos) +} + +// SetSweptDeposits is a paid mutator transaction binding the contract method 0xb8afb0a5. +// +// Solidity: function setSweptDeposits((bytes32,uint32,uint64)[] utxos) returns() +func (_Bridge *BridgeSession) SetSweptDeposits(utxos []BitcoinTxUTXO) (*types.Transaction, error) { + return _Bridge.Contract.SetSweptDeposits(&_Bridge.TransactOpts, utxos) +} + +// SetSweptDeposits is a paid mutator transaction binding the contract method 0xb8afb0a5. +// +// Solidity: function setSweptDeposits((bytes32,uint32,uint64)[] utxos) returns() +func (_Bridge *BridgeTransactorSession) SetSweptDeposits(utxos []BitcoinTxUTXO) (*types.Transaction, error) { + return _Bridge.Contract.SetSweptDeposits(&_Bridge.TransactOpts, utxos) +} + // SetVaultStatus is a paid mutator transaction binding the contract method 0x60d712fc. // // Solidity: function setVaultStatus(address vault, bool isTrusted) returns() @@ -1463,6 +1715,48 @@ func (_Bridge *BridgeTransactorSession) SetVaultStatus(vault common.Address, isT return _Bridge.Contract.SetVaultStatus(&_Bridge.TransactOpts, vault, isTrusted) } +// SetWallet is a paid mutator transaction binding the contract method 0xb95b947d. +// +// Solidity: function setWallet(bytes20 walletPubKeyHash, (bytes32,bytes32,uint64,uint32,uint32,uint32,uint32,uint8,bytes32) wallet) returns() +func (_Bridge *BridgeTransactor) SetWallet(opts *bind.TransactOpts, walletPubKeyHash [20]byte, wallet WalletsWallet) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "setWallet", walletPubKeyHash, wallet) +} + +// SetWallet is a paid mutator transaction binding the contract method 0xb95b947d. +// +// Solidity: function setWallet(bytes20 walletPubKeyHash, (bytes32,bytes32,uint64,uint32,uint32,uint32,uint32,uint8,bytes32) wallet) returns() +func (_Bridge *BridgeSession) SetWallet(walletPubKeyHash [20]byte, wallet WalletsWallet) (*types.Transaction, error) { + return _Bridge.Contract.SetWallet(&_Bridge.TransactOpts, walletPubKeyHash, wallet) +} + +// SetWallet is a paid mutator transaction binding the contract method 0xb95b947d. +// +// Solidity: function setWallet(bytes20 walletPubKeyHash, (bytes32,bytes32,uint64,uint32,uint32,uint32,uint32,uint8,bytes32) wallet) returns() +func (_Bridge *BridgeTransactorSession) SetWallet(walletPubKeyHash [20]byte, wallet WalletsWallet) (*types.Transaction, error) { + return _Bridge.Contract.SetWallet(&_Bridge.TransactOpts, walletPubKeyHash, wallet) +} + +// SetWalletMainUtxo is a paid mutator transaction binding the contract method 0xe404c0a9. +// +// Solidity: function setWalletMainUtxo(bytes20 walletPubKeyHash, (bytes32,uint32,uint64) utxo) returns() +func (_Bridge *BridgeTransactor) SetWalletMainUtxo(opts *bind.TransactOpts, walletPubKeyHash [20]byte, utxo BitcoinTxUTXO) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "setWalletMainUtxo", walletPubKeyHash, utxo) +} + +// SetWalletMainUtxo is a paid mutator transaction binding the contract method 0xe404c0a9. +// +// Solidity: function setWalletMainUtxo(bytes20 walletPubKeyHash, (bytes32,uint32,uint64) utxo) returns() +func (_Bridge *BridgeSession) SetWalletMainUtxo(walletPubKeyHash [20]byte, utxo BitcoinTxUTXO) (*types.Transaction, error) { + return _Bridge.Contract.SetWalletMainUtxo(&_Bridge.TransactOpts, walletPubKeyHash, utxo) +} + +// SetWalletMainUtxo is a paid mutator transaction binding the contract method 0xe404c0a9. +// +// Solidity: function setWalletMainUtxo(bytes20 walletPubKeyHash, (bytes32,uint32,uint64) utxo) returns() +func (_Bridge *BridgeTransactorSession) SetWalletMainUtxo(walletPubKeyHash [20]byte, utxo BitcoinTxUTXO) (*types.Transaction, error) { + return _Bridge.Contract.SetWalletMainUtxo(&_Bridge.TransactOpts, walletPubKeyHash, utxo) +} + // SubmitDepositSweepProof is a paid mutator transaction binding the contract method 0x133cafc8. // // Solidity: function submitDepositSweepProof((bytes4,bytes,bytes,bytes4) sweepTx, (bytes,uint256,bytes) sweepProof, (bytes32,uint32,uint64) mainUtxo, address vault) returns() @@ -1589,6 +1883,27 @@ func (_Bridge *BridgeTransactorSession) SubmitRedemptionProof(redemptionTx Bitco return _Bridge.Contract.SubmitRedemptionProof(&_Bridge.TransactOpts, redemptionTx, redemptionProof, mainUtxo, walletPubKeyHash) } +// TimeoutPendingMovedFundsSweepRequest is a paid mutator transaction binding the contract method 0x0bb7a73a. +// +// Solidity: function timeoutPendingMovedFundsSweepRequest(bytes20 walletPubKeyHash, (bytes32,uint32,uint64) utxo) returns() +func (_Bridge *BridgeTransactor) TimeoutPendingMovedFundsSweepRequest(opts *bind.TransactOpts, walletPubKeyHash [20]byte, utxo BitcoinTxUTXO) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "timeoutPendingMovedFundsSweepRequest", walletPubKeyHash, utxo) +} + +// TimeoutPendingMovedFundsSweepRequest is a paid mutator transaction binding the contract method 0x0bb7a73a. +// +// Solidity: function timeoutPendingMovedFundsSweepRequest(bytes20 walletPubKeyHash, (bytes32,uint32,uint64) utxo) returns() +func (_Bridge *BridgeSession) TimeoutPendingMovedFundsSweepRequest(walletPubKeyHash [20]byte, utxo BitcoinTxUTXO) (*types.Transaction, error) { + return _Bridge.Contract.TimeoutPendingMovedFundsSweepRequest(&_Bridge.TransactOpts, walletPubKeyHash, utxo) +} + +// TimeoutPendingMovedFundsSweepRequest is a paid mutator transaction binding the contract method 0x0bb7a73a. +// +// Solidity: function timeoutPendingMovedFundsSweepRequest(bytes20 walletPubKeyHash, (bytes32,uint32,uint64) utxo) returns() +func (_Bridge *BridgeTransactorSession) TimeoutPendingMovedFundsSweepRequest(walletPubKeyHash [20]byte, utxo BitcoinTxUTXO) (*types.Transaction, error) { + return _Bridge.Contract.TimeoutPendingMovedFundsSweepRequest(&_Bridge.TransactOpts, walletPubKeyHash, utxo) +} + // TransferGovernance is a paid mutator transaction binding the contract method 0xd38bfff4. // // Solidity: function transferGovernance(address newGovernance) returns() diff --git a/pkg/chain/ethereum/tbtc/gen/abi/MaintainerProxy.go b/pkg/chain/ethereum/tbtc/gen/abi/MaintainerProxy.go new file mode 100644 index 0000000000..33bfa60fd0 --- /dev/null +++ b/pkg/chain/ethereum/tbtc/gen/abi/MaintainerProxy.go @@ -0,0 +1,2383 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package abi + +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 +) + +// BitcoinTxInfo3 is an auto generated low-level Go binding around an user-defined struct. +type BitcoinTxInfo3 struct { + Version [4]byte + InputVector []byte + OutputVector []byte + Locktime [4]byte +} + +// BitcoinTxProof2 is an auto generated low-level Go binding around an user-defined struct. +type BitcoinTxProof2 struct { + MerkleProof []byte + TxIndexInBlock *big.Int + BitcoinHeaders []byte +} + +// BitcoinTxUTXO2 is an auto generated low-level Go binding around an user-defined struct. +type BitcoinTxUTXO2 struct { + TxHash [32]byte + TxOutputIndex uint32 + TxOutputValue uint64 +} + +// MaintainerProxyMetaData contains all meta data concerning the MaintainerProxy contract. +var MaintainerProxyMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"contractBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contractReimbursementPool\",\"name\":\"_reimbursementPool\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newBridge\",\"type\":\"address\"}],\"name\":\"BridgeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"submitDepositSweepProofGasOffset\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"submitRedemptionProofGasOffset\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"resetMovingFundsTimeoutGasOffset\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"submitMovingFundsProofGasOffset\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"notifyMovingFundsBelowDustGasOffset\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"submitMovedFundsSweepProofGasOffset\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"requestNewWalletGasOffset\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"notifyWalletCloseableGasOffset\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"notifyWalletClosingPeriodElapsedGasOffset\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"defeatFraudChallengeGasOffset\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"defeatFraudChallengeWithHeartbeatGasOffset\",\"type\":\"uint256\"}],\"name\":\"GasOffsetParametersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newReimbursementPool\",\"type\":\"address\"}],\"name\":\"ReimbursementPoolUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"maintainer\",\"type\":\"address\"}],\"name\":\"SpvMaintainerAuthorized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"maintainer\",\"type\":\"address\"}],\"name\":\"SpvMaintainerUnauthorized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"maintainer\",\"type\":\"address\"}],\"name\":\"WalletMaintainerAuthorized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"maintainer\",\"type\":\"address\"}],\"name\":\"WalletMaintainerUnauthorized\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"allSpvMaintainers\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"allWalletMaintainers\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"maintainer\",\"type\":\"address\"}],\"name\":\"authorizeSpvMaintainer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"maintainer\",\"type\":\"address\"}],\"name\":\"authorizeWalletMaintainer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contractBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"walletPublicKey\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"preimage\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"witness\",\"type\":\"bool\"}],\"name\":\"defeatFraudChallenge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"defeatFraudChallengeGasOffset\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"walletPublicKey\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"heartbeatMessage\",\"type\":\"bytes\"}],\"name\":\"defeatFraudChallengeWithHeartbeat\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"defeatFraudChallengeWithHeartbeatGasOffset\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isSpvMaintainer\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isWalletMaintainer\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"mainUtxo\",\"type\":\"tuple\"}],\"name\":\"notifyMovingFundsBelowDust\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"notifyMovingFundsBelowDustGasOffset\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"walletMainUtxo\",\"type\":\"tuple\"}],\"name\":\"notifyWalletCloseable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"notifyWalletCloseableGasOffset\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"notifyWalletClosingPeriodElapsed\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"notifyWalletClosingPeriodElapsedGasOffset\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reimbursementPool\",\"outputs\":[{\"internalType\":\"contractReimbursementPool\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"activeWalletMainUtxo\",\"type\":\"tuple\"}],\"name\":\"requestNewWallet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requestNewWalletGasOffset\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"resetMovingFundsTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resetMovingFundsTimeoutGasOffset\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"spvMaintainers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes4\",\"name\":\"version\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"inputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"outputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes4\",\"name\":\"locktime\",\"type\":\"bytes4\"}],\"internalType\":\"structBitcoinTx.Info\",\"name\":\"sweepTx\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"merkleProof\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"txIndexInBlock\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"bitcoinHeaders\",\"type\":\"bytes\"}],\"internalType\":\"structBitcoinTx.Proof\",\"name\":\"sweepProof\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"mainUtxo\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"vault\",\"type\":\"address\"}],\"name\":\"submitDepositSweepProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"submitDepositSweepProofGasOffset\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes4\",\"name\":\"version\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"inputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"outputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes4\",\"name\":\"locktime\",\"type\":\"bytes4\"}],\"internalType\":\"structBitcoinTx.Info\",\"name\":\"sweepTx\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"merkleProof\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"txIndexInBlock\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"bitcoinHeaders\",\"type\":\"bytes\"}],\"internalType\":\"structBitcoinTx.Proof\",\"name\":\"sweepProof\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"mainUtxo\",\"type\":\"tuple\"}],\"name\":\"submitMovedFundsSweepProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"submitMovedFundsSweepProofGasOffset\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes4\",\"name\":\"version\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"inputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"outputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes4\",\"name\":\"locktime\",\"type\":\"bytes4\"}],\"internalType\":\"structBitcoinTx.Info\",\"name\":\"movingFundsTx\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"merkleProof\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"txIndexInBlock\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"bitcoinHeaders\",\"type\":\"bytes\"}],\"internalType\":\"structBitcoinTx.Proof\",\"name\":\"movingFundsProof\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"mainUtxo\",\"type\":\"tuple\"},{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"submitMovingFundsProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"submitMovingFundsProofGasOffset\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes4\",\"name\":\"version\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"inputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"outputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes4\",\"name\":\"locktime\",\"type\":\"bytes4\"}],\"internalType\":\"structBitcoinTx.Info\",\"name\":\"redemptionTx\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"merkleProof\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"txIndexInBlock\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"bitcoinHeaders\",\"type\":\"bytes\"}],\"internalType\":\"structBitcoinTx.Proof\",\"name\":\"redemptionProof\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"txOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"txOutputValue\",\"type\":\"uint64\"}],\"internalType\":\"structBitcoinTx.UTXO\",\"name\":\"mainUtxo\",\"type\":\"tuple\"},{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"}],\"name\":\"submitRedemptionProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"submitRedemptionProofGasOffset\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"maintainerToUnauthorize\",\"type\":\"address\"}],\"name\":\"unauthorizeSpvMaintainer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"maintainerToUnauthorize\",\"type\":\"address\"}],\"name\":\"unauthorizeWalletMaintainer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractBridge\",\"name\":\"_bridge\",\"type\":\"address\"}],\"name\":\"updateBridge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newSubmitDepositSweepProofGasOffset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newSubmitRedemptionProofGasOffset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newResetMovingFundsTimeoutGasOffset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newSubmitMovingFundsProofGasOffset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newNotifyMovingFundsBelowDustGasOffset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newSubmitMovedFundsSweepProofGasOffset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newRequestNewWalletGasOffset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newNotifyWalletCloseableGasOffset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newNotifyWalletClosingPeriodElapsedGasOffset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newDefeatFraudChallengeGasOffset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newDefeatFraudChallengeWithHeartbeatGasOffset\",\"type\":\"uint256\"}],\"name\":\"updateGasOffsetParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractReimbursementPool\",\"name\":\"_reimbursementPool\",\"type\":\"address\"}],\"name\":\"updateReimbursementPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"walletMaintainers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", +} + +// MaintainerProxyABI is the input ABI used to generate the binding from. +// Deprecated: Use MaintainerProxyMetaData.ABI instead. +var MaintainerProxyABI = MaintainerProxyMetaData.ABI + +// MaintainerProxy is an auto generated Go binding around an Ethereum contract. +type MaintainerProxy struct { + MaintainerProxyCaller // Read-only binding to the contract + MaintainerProxyTransactor // Write-only binding to the contract + MaintainerProxyFilterer // Log filterer for contract events +} + +// MaintainerProxyCaller is an auto generated read-only Go binding around an Ethereum contract. +type MaintainerProxyCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MaintainerProxyTransactor is an auto generated write-only Go binding around an Ethereum contract. +type MaintainerProxyTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MaintainerProxyFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type MaintainerProxyFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MaintainerProxySession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type MaintainerProxySession struct { + Contract *MaintainerProxy // 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 +} + +// MaintainerProxyCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type MaintainerProxyCallerSession struct { + Contract *MaintainerProxyCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// MaintainerProxyTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type MaintainerProxyTransactorSession struct { + Contract *MaintainerProxyTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// MaintainerProxyRaw is an auto generated low-level Go binding around an Ethereum contract. +type MaintainerProxyRaw struct { + Contract *MaintainerProxy // Generic contract binding to access the raw methods on +} + +// MaintainerProxyCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type MaintainerProxyCallerRaw struct { + Contract *MaintainerProxyCaller // Generic read-only contract binding to access the raw methods on +} + +// MaintainerProxyTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type MaintainerProxyTransactorRaw struct { + Contract *MaintainerProxyTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewMaintainerProxy creates a new instance of MaintainerProxy, bound to a specific deployed contract. +func NewMaintainerProxy(address common.Address, backend bind.ContractBackend) (*MaintainerProxy, error) { + contract, err := bindMaintainerProxy(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &MaintainerProxy{MaintainerProxyCaller: MaintainerProxyCaller{contract: contract}, MaintainerProxyTransactor: MaintainerProxyTransactor{contract: contract}, MaintainerProxyFilterer: MaintainerProxyFilterer{contract: contract}}, nil +} + +// NewMaintainerProxyCaller creates a new read-only instance of MaintainerProxy, bound to a specific deployed contract. +func NewMaintainerProxyCaller(address common.Address, caller bind.ContractCaller) (*MaintainerProxyCaller, error) { + contract, err := bindMaintainerProxy(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &MaintainerProxyCaller{contract: contract}, nil +} + +// NewMaintainerProxyTransactor creates a new write-only instance of MaintainerProxy, bound to a specific deployed contract. +func NewMaintainerProxyTransactor(address common.Address, transactor bind.ContractTransactor) (*MaintainerProxyTransactor, error) { + contract, err := bindMaintainerProxy(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &MaintainerProxyTransactor{contract: contract}, nil +} + +// NewMaintainerProxyFilterer creates a new log filterer instance of MaintainerProxy, bound to a specific deployed contract. +func NewMaintainerProxyFilterer(address common.Address, filterer bind.ContractFilterer) (*MaintainerProxyFilterer, error) { + contract, err := bindMaintainerProxy(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &MaintainerProxyFilterer{contract: contract}, nil +} + +// bindMaintainerProxy binds a generic wrapper to an already deployed contract. +func bindMaintainerProxy(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(MaintainerProxyABI)) + 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 (_MaintainerProxy *MaintainerProxyRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MaintainerProxy.Contract.MaintainerProxyCaller.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 (_MaintainerProxy *MaintainerProxyRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MaintainerProxy.Contract.MaintainerProxyTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_MaintainerProxy *MaintainerProxyRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MaintainerProxy.Contract.MaintainerProxyTransactor.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 (_MaintainerProxy *MaintainerProxyCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MaintainerProxy.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 (_MaintainerProxy *MaintainerProxyTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MaintainerProxy.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_MaintainerProxy *MaintainerProxyTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MaintainerProxy.Contract.contract.Transact(opts, method, params...) +} + +// AllSpvMaintainers is a free data retrieval call binding the contract method 0x13f1a99f. +// +// Solidity: function allSpvMaintainers() view returns(address[]) +func (_MaintainerProxy *MaintainerProxyCaller) AllSpvMaintainers(opts *bind.CallOpts) ([]common.Address, error) { + var out []interface{} + err := _MaintainerProxy.contract.Call(opts, &out, "allSpvMaintainers") + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + +} + +// AllSpvMaintainers is a free data retrieval call binding the contract method 0x13f1a99f. +// +// Solidity: function allSpvMaintainers() view returns(address[]) +func (_MaintainerProxy *MaintainerProxySession) AllSpvMaintainers() ([]common.Address, error) { + return _MaintainerProxy.Contract.AllSpvMaintainers(&_MaintainerProxy.CallOpts) +} + +// AllSpvMaintainers is a free data retrieval call binding the contract method 0x13f1a99f. +// +// Solidity: function allSpvMaintainers() view returns(address[]) +func (_MaintainerProxy *MaintainerProxyCallerSession) AllSpvMaintainers() ([]common.Address, error) { + return _MaintainerProxy.Contract.AllSpvMaintainers(&_MaintainerProxy.CallOpts) +} + +// AllWalletMaintainers is a free data retrieval call binding the contract method 0x2f5e2af7. +// +// Solidity: function allWalletMaintainers() view returns(address[]) +func (_MaintainerProxy *MaintainerProxyCaller) AllWalletMaintainers(opts *bind.CallOpts) ([]common.Address, error) { + var out []interface{} + err := _MaintainerProxy.contract.Call(opts, &out, "allWalletMaintainers") + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + +} + +// AllWalletMaintainers is a free data retrieval call binding the contract method 0x2f5e2af7. +// +// Solidity: function allWalletMaintainers() view returns(address[]) +func (_MaintainerProxy *MaintainerProxySession) AllWalletMaintainers() ([]common.Address, error) { + return _MaintainerProxy.Contract.AllWalletMaintainers(&_MaintainerProxy.CallOpts) +} + +// AllWalletMaintainers is a free data retrieval call binding the contract method 0x2f5e2af7. +// +// Solidity: function allWalletMaintainers() view returns(address[]) +func (_MaintainerProxy *MaintainerProxyCallerSession) AllWalletMaintainers() ([]common.Address, error) { + return _MaintainerProxy.Contract.AllWalletMaintainers(&_MaintainerProxy.CallOpts) +} + +// Bridge is a free data retrieval call binding the contract method 0xe78cea92. +// +// Solidity: function bridge() view returns(address) +func (_MaintainerProxy *MaintainerProxyCaller) Bridge(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MaintainerProxy.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 (_MaintainerProxy *MaintainerProxySession) Bridge() (common.Address, error) { + return _MaintainerProxy.Contract.Bridge(&_MaintainerProxy.CallOpts) +} + +// Bridge is a free data retrieval call binding the contract method 0xe78cea92. +// +// Solidity: function bridge() view returns(address) +func (_MaintainerProxy *MaintainerProxyCallerSession) Bridge() (common.Address, error) { + return _MaintainerProxy.Contract.Bridge(&_MaintainerProxy.CallOpts) +} + +// DefeatFraudChallengeGasOffset is a free data retrieval call binding the contract method 0x89065e60. +// +// Solidity: function defeatFraudChallengeGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxyCaller) DefeatFraudChallengeGasOffset(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MaintainerProxy.contract.Call(opts, &out, "defeatFraudChallengeGasOffset") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// DefeatFraudChallengeGasOffset is a free data retrieval call binding the contract method 0x89065e60. +// +// Solidity: function defeatFraudChallengeGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxySession) DefeatFraudChallengeGasOffset() (*big.Int, error) { + return _MaintainerProxy.Contract.DefeatFraudChallengeGasOffset(&_MaintainerProxy.CallOpts) +} + +// DefeatFraudChallengeGasOffset is a free data retrieval call binding the contract method 0x89065e60. +// +// Solidity: function defeatFraudChallengeGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxyCallerSession) DefeatFraudChallengeGasOffset() (*big.Int, error) { + return _MaintainerProxy.Contract.DefeatFraudChallengeGasOffset(&_MaintainerProxy.CallOpts) +} + +// DefeatFraudChallengeWithHeartbeatGasOffset is a free data retrieval call binding the contract method 0x84862c19. +// +// Solidity: function defeatFraudChallengeWithHeartbeatGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxyCaller) DefeatFraudChallengeWithHeartbeatGasOffset(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MaintainerProxy.contract.Call(opts, &out, "defeatFraudChallengeWithHeartbeatGasOffset") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// DefeatFraudChallengeWithHeartbeatGasOffset is a free data retrieval call binding the contract method 0x84862c19. +// +// Solidity: function defeatFraudChallengeWithHeartbeatGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxySession) DefeatFraudChallengeWithHeartbeatGasOffset() (*big.Int, error) { + return _MaintainerProxy.Contract.DefeatFraudChallengeWithHeartbeatGasOffset(&_MaintainerProxy.CallOpts) +} + +// DefeatFraudChallengeWithHeartbeatGasOffset is a free data retrieval call binding the contract method 0x84862c19. +// +// Solidity: function defeatFraudChallengeWithHeartbeatGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxyCallerSession) DefeatFraudChallengeWithHeartbeatGasOffset() (*big.Int, error) { + return _MaintainerProxy.Contract.DefeatFraudChallengeWithHeartbeatGasOffset(&_MaintainerProxy.CallOpts) +} + +// IsSpvMaintainer is a free data retrieval call binding the contract method 0xf5c3c084. +// +// Solidity: function isSpvMaintainer(address ) view returns(uint256) +func (_MaintainerProxy *MaintainerProxyCaller) IsSpvMaintainer(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { + var out []interface{} + err := _MaintainerProxy.contract.Call(opts, &out, "isSpvMaintainer", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// IsSpvMaintainer is a free data retrieval call binding the contract method 0xf5c3c084. +// +// Solidity: function isSpvMaintainer(address ) view returns(uint256) +func (_MaintainerProxy *MaintainerProxySession) IsSpvMaintainer(arg0 common.Address) (*big.Int, error) { + return _MaintainerProxy.Contract.IsSpvMaintainer(&_MaintainerProxy.CallOpts, arg0) +} + +// IsSpvMaintainer is a free data retrieval call binding the contract method 0xf5c3c084. +// +// Solidity: function isSpvMaintainer(address ) view returns(uint256) +func (_MaintainerProxy *MaintainerProxyCallerSession) IsSpvMaintainer(arg0 common.Address) (*big.Int, error) { + return _MaintainerProxy.Contract.IsSpvMaintainer(&_MaintainerProxy.CallOpts, arg0) +} + +// IsWalletMaintainer is a free data retrieval call binding the contract method 0xca05b902. +// +// Solidity: function isWalletMaintainer(address ) view returns(uint256) +func (_MaintainerProxy *MaintainerProxyCaller) IsWalletMaintainer(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { + var out []interface{} + err := _MaintainerProxy.contract.Call(opts, &out, "isWalletMaintainer", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// IsWalletMaintainer is a free data retrieval call binding the contract method 0xca05b902. +// +// Solidity: function isWalletMaintainer(address ) view returns(uint256) +func (_MaintainerProxy *MaintainerProxySession) IsWalletMaintainer(arg0 common.Address) (*big.Int, error) { + return _MaintainerProxy.Contract.IsWalletMaintainer(&_MaintainerProxy.CallOpts, arg0) +} + +// IsWalletMaintainer is a free data retrieval call binding the contract method 0xca05b902. +// +// Solidity: function isWalletMaintainer(address ) view returns(uint256) +func (_MaintainerProxy *MaintainerProxyCallerSession) IsWalletMaintainer(arg0 common.Address) (*big.Int, error) { + return _MaintainerProxy.Contract.IsWalletMaintainer(&_MaintainerProxy.CallOpts, arg0) +} + +// NotifyMovingFundsBelowDustGasOffset is a free data retrieval call binding the contract method 0xe3cfecd1. +// +// Solidity: function notifyMovingFundsBelowDustGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxyCaller) NotifyMovingFundsBelowDustGasOffset(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MaintainerProxy.contract.Call(opts, &out, "notifyMovingFundsBelowDustGasOffset") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// NotifyMovingFundsBelowDustGasOffset is a free data retrieval call binding the contract method 0xe3cfecd1. +// +// Solidity: function notifyMovingFundsBelowDustGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxySession) NotifyMovingFundsBelowDustGasOffset() (*big.Int, error) { + return _MaintainerProxy.Contract.NotifyMovingFundsBelowDustGasOffset(&_MaintainerProxy.CallOpts) +} + +// NotifyMovingFundsBelowDustGasOffset is a free data retrieval call binding the contract method 0xe3cfecd1. +// +// Solidity: function notifyMovingFundsBelowDustGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxyCallerSession) NotifyMovingFundsBelowDustGasOffset() (*big.Int, error) { + return _MaintainerProxy.Contract.NotifyMovingFundsBelowDustGasOffset(&_MaintainerProxy.CallOpts) +} + +// NotifyWalletCloseableGasOffset is a free data retrieval call binding the contract method 0xe46e6eda. +// +// Solidity: function notifyWalletCloseableGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxyCaller) NotifyWalletCloseableGasOffset(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MaintainerProxy.contract.Call(opts, &out, "notifyWalletCloseableGasOffset") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// NotifyWalletCloseableGasOffset is a free data retrieval call binding the contract method 0xe46e6eda. +// +// Solidity: function notifyWalletCloseableGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxySession) NotifyWalletCloseableGasOffset() (*big.Int, error) { + return _MaintainerProxy.Contract.NotifyWalletCloseableGasOffset(&_MaintainerProxy.CallOpts) +} + +// NotifyWalletCloseableGasOffset is a free data retrieval call binding the contract method 0xe46e6eda. +// +// Solidity: function notifyWalletCloseableGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxyCallerSession) NotifyWalletCloseableGasOffset() (*big.Int, error) { + return _MaintainerProxy.Contract.NotifyWalletCloseableGasOffset(&_MaintainerProxy.CallOpts) +} + +// NotifyWalletClosingPeriodElapsedGasOffset is a free data retrieval call binding the contract method 0x93b743bd. +// +// Solidity: function notifyWalletClosingPeriodElapsedGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxyCaller) NotifyWalletClosingPeriodElapsedGasOffset(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MaintainerProxy.contract.Call(opts, &out, "notifyWalletClosingPeriodElapsedGasOffset") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// NotifyWalletClosingPeriodElapsedGasOffset is a free data retrieval call binding the contract method 0x93b743bd. +// +// Solidity: function notifyWalletClosingPeriodElapsedGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxySession) NotifyWalletClosingPeriodElapsedGasOffset() (*big.Int, error) { + return _MaintainerProxy.Contract.NotifyWalletClosingPeriodElapsedGasOffset(&_MaintainerProxy.CallOpts) +} + +// NotifyWalletClosingPeriodElapsedGasOffset is a free data retrieval call binding the contract method 0x93b743bd. +// +// Solidity: function notifyWalletClosingPeriodElapsedGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxyCallerSession) NotifyWalletClosingPeriodElapsedGasOffset() (*big.Int, error) { + return _MaintainerProxy.Contract.NotifyWalletClosingPeriodElapsedGasOffset(&_MaintainerProxy.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MaintainerProxy *MaintainerProxyCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MaintainerProxy.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MaintainerProxy *MaintainerProxySession) Owner() (common.Address, error) { + return _MaintainerProxy.Contract.Owner(&_MaintainerProxy.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MaintainerProxy *MaintainerProxyCallerSession) Owner() (common.Address, error) { + return _MaintainerProxy.Contract.Owner(&_MaintainerProxy.CallOpts) +} + +// ReimbursementPool is a free data retrieval call binding the contract method 0xc09975cd. +// +// Solidity: function reimbursementPool() view returns(address) +func (_MaintainerProxy *MaintainerProxyCaller) ReimbursementPool(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MaintainerProxy.contract.Call(opts, &out, "reimbursementPool") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// ReimbursementPool is a free data retrieval call binding the contract method 0xc09975cd. +// +// Solidity: function reimbursementPool() view returns(address) +func (_MaintainerProxy *MaintainerProxySession) ReimbursementPool() (common.Address, error) { + return _MaintainerProxy.Contract.ReimbursementPool(&_MaintainerProxy.CallOpts) +} + +// ReimbursementPool is a free data retrieval call binding the contract method 0xc09975cd. +// +// Solidity: function reimbursementPool() view returns(address) +func (_MaintainerProxy *MaintainerProxyCallerSession) ReimbursementPool() (common.Address, error) { + return _MaintainerProxy.Contract.ReimbursementPool(&_MaintainerProxy.CallOpts) +} + +// RequestNewWalletGasOffset is a free data retrieval call binding the contract method 0x19fd5c45. +// +// Solidity: function requestNewWalletGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxyCaller) RequestNewWalletGasOffset(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MaintainerProxy.contract.Call(opts, &out, "requestNewWalletGasOffset") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// RequestNewWalletGasOffset is a free data retrieval call binding the contract method 0x19fd5c45. +// +// Solidity: function requestNewWalletGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxySession) RequestNewWalletGasOffset() (*big.Int, error) { + return _MaintainerProxy.Contract.RequestNewWalletGasOffset(&_MaintainerProxy.CallOpts) +} + +// RequestNewWalletGasOffset is a free data retrieval call binding the contract method 0x19fd5c45. +// +// Solidity: function requestNewWalletGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxyCallerSession) RequestNewWalletGasOffset() (*big.Int, error) { + return _MaintainerProxy.Contract.RequestNewWalletGasOffset(&_MaintainerProxy.CallOpts) +} + +// ResetMovingFundsTimeoutGasOffset is a free data retrieval call binding the contract method 0x391f7170. +// +// Solidity: function resetMovingFundsTimeoutGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxyCaller) ResetMovingFundsTimeoutGasOffset(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MaintainerProxy.contract.Call(opts, &out, "resetMovingFundsTimeoutGasOffset") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// ResetMovingFundsTimeoutGasOffset is a free data retrieval call binding the contract method 0x391f7170. +// +// Solidity: function resetMovingFundsTimeoutGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxySession) ResetMovingFundsTimeoutGasOffset() (*big.Int, error) { + return _MaintainerProxy.Contract.ResetMovingFundsTimeoutGasOffset(&_MaintainerProxy.CallOpts) +} + +// ResetMovingFundsTimeoutGasOffset is a free data retrieval call binding the contract method 0x391f7170. +// +// Solidity: function resetMovingFundsTimeoutGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxyCallerSession) ResetMovingFundsTimeoutGasOffset() (*big.Int, error) { + return _MaintainerProxy.Contract.ResetMovingFundsTimeoutGasOffset(&_MaintainerProxy.CallOpts) +} + +// SpvMaintainers is a free data retrieval call binding the contract method 0x4b0e4571. +// +// Solidity: function spvMaintainers(uint256 ) view returns(address) +func (_MaintainerProxy *MaintainerProxyCaller) SpvMaintainers(opts *bind.CallOpts, arg0 *big.Int) (common.Address, error) { + var out []interface{} + err := _MaintainerProxy.contract.Call(opts, &out, "spvMaintainers", arg0) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// SpvMaintainers is a free data retrieval call binding the contract method 0x4b0e4571. +// +// Solidity: function spvMaintainers(uint256 ) view returns(address) +func (_MaintainerProxy *MaintainerProxySession) SpvMaintainers(arg0 *big.Int) (common.Address, error) { + return _MaintainerProxy.Contract.SpvMaintainers(&_MaintainerProxy.CallOpts, arg0) +} + +// SpvMaintainers is a free data retrieval call binding the contract method 0x4b0e4571. +// +// Solidity: function spvMaintainers(uint256 ) view returns(address) +func (_MaintainerProxy *MaintainerProxyCallerSession) SpvMaintainers(arg0 *big.Int) (common.Address, error) { + return _MaintainerProxy.Contract.SpvMaintainers(&_MaintainerProxy.CallOpts, arg0) +} + +// SubmitDepositSweepProofGasOffset is a free data retrieval call binding the contract method 0x55e19036. +// +// Solidity: function submitDepositSweepProofGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxyCaller) SubmitDepositSweepProofGasOffset(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MaintainerProxy.contract.Call(opts, &out, "submitDepositSweepProofGasOffset") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// SubmitDepositSweepProofGasOffset is a free data retrieval call binding the contract method 0x55e19036. +// +// Solidity: function submitDepositSweepProofGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxySession) SubmitDepositSweepProofGasOffset() (*big.Int, error) { + return _MaintainerProxy.Contract.SubmitDepositSweepProofGasOffset(&_MaintainerProxy.CallOpts) +} + +// SubmitDepositSweepProofGasOffset is a free data retrieval call binding the contract method 0x55e19036. +// +// Solidity: function submitDepositSweepProofGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxyCallerSession) SubmitDepositSweepProofGasOffset() (*big.Int, error) { + return _MaintainerProxy.Contract.SubmitDepositSweepProofGasOffset(&_MaintainerProxy.CallOpts) +} + +// SubmitMovedFundsSweepProofGasOffset is a free data retrieval call binding the contract method 0xe12bad86. +// +// Solidity: function submitMovedFundsSweepProofGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxyCaller) SubmitMovedFundsSweepProofGasOffset(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MaintainerProxy.contract.Call(opts, &out, "submitMovedFundsSweepProofGasOffset") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// SubmitMovedFundsSweepProofGasOffset is a free data retrieval call binding the contract method 0xe12bad86. +// +// Solidity: function submitMovedFundsSweepProofGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxySession) SubmitMovedFundsSweepProofGasOffset() (*big.Int, error) { + return _MaintainerProxy.Contract.SubmitMovedFundsSweepProofGasOffset(&_MaintainerProxy.CallOpts) +} + +// SubmitMovedFundsSweepProofGasOffset is a free data retrieval call binding the contract method 0xe12bad86. +// +// Solidity: function submitMovedFundsSweepProofGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxyCallerSession) SubmitMovedFundsSweepProofGasOffset() (*big.Int, error) { + return _MaintainerProxy.Contract.SubmitMovedFundsSweepProofGasOffset(&_MaintainerProxy.CallOpts) +} + +// SubmitMovingFundsProofGasOffset is a free data retrieval call binding the contract method 0xddd23f5e. +// +// Solidity: function submitMovingFundsProofGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxyCaller) SubmitMovingFundsProofGasOffset(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MaintainerProxy.contract.Call(opts, &out, "submitMovingFundsProofGasOffset") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// SubmitMovingFundsProofGasOffset is a free data retrieval call binding the contract method 0xddd23f5e. +// +// Solidity: function submitMovingFundsProofGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxySession) SubmitMovingFundsProofGasOffset() (*big.Int, error) { + return _MaintainerProxy.Contract.SubmitMovingFundsProofGasOffset(&_MaintainerProxy.CallOpts) +} + +// SubmitMovingFundsProofGasOffset is a free data retrieval call binding the contract method 0xddd23f5e. +// +// Solidity: function submitMovingFundsProofGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxyCallerSession) SubmitMovingFundsProofGasOffset() (*big.Int, error) { + return _MaintainerProxy.Contract.SubmitMovingFundsProofGasOffset(&_MaintainerProxy.CallOpts) +} + +// SubmitRedemptionProofGasOffset is a free data retrieval call binding the contract method 0x4147907c. +// +// Solidity: function submitRedemptionProofGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxyCaller) SubmitRedemptionProofGasOffset(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MaintainerProxy.contract.Call(opts, &out, "submitRedemptionProofGasOffset") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// SubmitRedemptionProofGasOffset is a free data retrieval call binding the contract method 0x4147907c. +// +// Solidity: function submitRedemptionProofGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxySession) SubmitRedemptionProofGasOffset() (*big.Int, error) { + return _MaintainerProxy.Contract.SubmitRedemptionProofGasOffset(&_MaintainerProxy.CallOpts) +} + +// SubmitRedemptionProofGasOffset is a free data retrieval call binding the contract method 0x4147907c. +// +// Solidity: function submitRedemptionProofGasOffset() view returns(uint256) +func (_MaintainerProxy *MaintainerProxyCallerSession) SubmitRedemptionProofGasOffset() (*big.Int, error) { + return _MaintainerProxy.Contract.SubmitRedemptionProofGasOffset(&_MaintainerProxy.CallOpts) +} + +// WalletMaintainers is a free data retrieval call binding the contract method 0xa95f7866. +// +// Solidity: function walletMaintainers(uint256 ) view returns(address) +func (_MaintainerProxy *MaintainerProxyCaller) WalletMaintainers(opts *bind.CallOpts, arg0 *big.Int) (common.Address, error) { + var out []interface{} + err := _MaintainerProxy.contract.Call(opts, &out, "walletMaintainers", arg0) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// WalletMaintainers is a free data retrieval call binding the contract method 0xa95f7866. +// +// Solidity: function walletMaintainers(uint256 ) view returns(address) +func (_MaintainerProxy *MaintainerProxySession) WalletMaintainers(arg0 *big.Int) (common.Address, error) { + return _MaintainerProxy.Contract.WalletMaintainers(&_MaintainerProxy.CallOpts, arg0) +} + +// WalletMaintainers is a free data retrieval call binding the contract method 0xa95f7866. +// +// Solidity: function walletMaintainers(uint256 ) view returns(address) +func (_MaintainerProxy *MaintainerProxyCallerSession) WalletMaintainers(arg0 *big.Int) (common.Address, error) { + return _MaintainerProxy.Contract.WalletMaintainers(&_MaintainerProxy.CallOpts, arg0) +} + +// AuthorizeSpvMaintainer is a paid mutator transaction binding the contract method 0x9f4b337d. +// +// Solidity: function authorizeSpvMaintainer(address maintainer) returns() +func (_MaintainerProxy *MaintainerProxyTransactor) AuthorizeSpvMaintainer(opts *bind.TransactOpts, maintainer common.Address) (*types.Transaction, error) { + return _MaintainerProxy.contract.Transact(opts, "authorizeSpvMaintainer", maintainer) +} + +// AuthorizeSpvMaintainer is a paid mutator transaction binding the contract method 0x9f4b337d. +// +// Solidity: function authorizeSpvMaintainer(address maintainer) returns() +func (_MaintainerProxy *MaintainerProxySession) AuthorizeSpvMaintainer(maintainer common.Address) (*types.Transaction, error) { + return _MaintainerProxy.Contract.AuthorizeSpvMaintainer(&_MaintainerProxy.TransactOpts, maintainer) +} + +// AuthorizeSpvMaintainer is a paid mutator transaction binding the contract method 0x9f4b337d. +// +// Solidity: function authorizeSpvMaintainer(address maintainer) returns() +func (_MaintainerProxy *MaintainerProxyTransactorSession) AuthorizeSpvMaintainer(maintainer common.Address) (*types.Transaction, error) { + return _MaintainerProxy.Contract.AuthorizeSpvMaintainer(&_MaintainerProxy.TransactOpts, maintainer) +} + +// AuthorizeWalletMaintainer is a paid mutator transaction binding the contract method 0x0015b04e. +// +// Solidity: function authorizeWalletMaintainer(address maintainer) returns() +func (_MaintainerProxy *MaintainerProxyTransactor) AuthorizeWalletMaintainer(opts *bind.TransactOpts, maintainer common.Address) (*types.Transaction, error) { + return _MaintainerProxy.contract.Transact(opts, "authorizeWalletMaintainer", maintainer) +} + +// AuthorizeWalletMaintainer is a paid mutator transaction binding the contract method 0x0015b04e. +// +// Solidity: function authorizeWalletMaintainer(address maintainer) returns() +func (_MaintainerProxy *MaintainerProxySession) AuthorizeWalletMaintainer(maintainer common.Address) (*types.Transaction, error) { + return _MaintainerProxy.Contract.AuthorizeWalletMaintainer(&_MaintainerProxy.TransactOpts, maintainer) +} + +// AuthorizeWalletMaintainer is a paid mutator transaction binding the contract method 0x0015b04e. +// +// Solidity: function authorizeWalletMaintainer(address maintainer) returns() +func (_MaintainerProxy *MaintainerProxyTransactorSession) AuthorizeWalletMaintainer(maintainer common.Address) (*types.Transaction, error) { + return _MaintainerProxy.Contract.AuthorizeWalletMaintainer(&_MaintainerProxy.TransactOpts, maintainer) +} + +// DefeatFraudChallenge is a paid mutator transaction binding the contract method 0x77145f21. +// +// Solidity: function defeatFraudChallenge(bytes walletPublicKey, bytes preimage, bool witness) returns() +func (_MaintainerProxy *MaintainerProxyTransactor) DefeatFraudChallenge(opts *bind.TransactOpts, walletPublicKey []byte, preimage []byte, witness bool) (*types.Transaction, error) { + return _MaintainerProxy.contract.Transact(opts, "defeatFraudChallenge", walletPublicKey, preimage, witness) +} + +// DefeatFraudChallenge is a paid mutator transaction binding the contract method 0x77145f21. +// +// Solidity: function defeatFraudChallenge(bytes walletPublicKey, bytes preimage, bool witness) returns() +func (_MaintainerProxy *MaintainerProxySession) DefeatFraudChallenge(walletPublicKey []byte, preimage []byte, witness bool) (*types.Transaction, error) { + return _MaintainerProxy.Contract.DefeatFraudChallenge(&_MaintainerProxy.TransactOpts, walletPublicKey, preimage, witness) +} + +// DefeatFraudChallenge is a paid mutator transaction binding the contract method 0x77145f21. +// +// Solidity: function defeatFraudChallenge(bytes walletPublicKey, bytes preimage, bool witness) returns() +func (_MaintainerProxy *MaintainerProxyTransactorSession) DefeatFraudChallenge(walletPublicKey []byte, preimage []byte, witness bool) (*types.Transaction, error) { + return _MaintainerProxy.Contract.DefeatFraudChallenge(&_MaintainerProxy.TransactOpts, walletPublicKey, preimage, witness) +} + +// DefeatFraudChallengeWithHeartbeat is a paid mutator transaction binding the contract method 0x0674f266. +// +// Solidity: function defeatFraudChallengeWithHeartbeat(bytes walletPublicKey, bytes heartbeatMessage) returns() +func (_MaintainerProxy *MaintainerProxyTransactor) DefeatFraudChallengeWithHeartbeat(opts *bind.TransactOpts, walletPublicKey []byte, heartbeatMessage []byte) (*types.Transaction, error) { + return _MaintainerProxy.contract.Transact(opts, "defeatFraudChallengeWithHeartbeat", walletPublicKey, heartbeatMessage) +} + +// DefeatFraudChallengeWithHeartbeat is a paid mutator transaction binding the contract method 0x0674f266. +// +// Solidity: function defeatFraudChallengeWithHeartbeat(bytes walletPublicKey, bytes heartbeatMessage) returns() +func (_MaintainerProxy *MaintainerProxySession) DefeatFraudChallengeWithHeartbeat(walletPublicKey []byte, heartbeatMessage []byte) (*types.Transaction, error) { + return _MaintainerProxy.Contract.DefeatFraudChallengeWithHeartbeat(&_MaintainerProxy.TransactOpts, walletPublicKey, heartbeatMessage) +} + +// DefeatFraudChallengeWithHeartbeat is a paid mutator transaction binding the contract method 0x0674f266. +// +// Solidity: function defeatFraudChallengeWithHeartbeat(bytes walletPublicKey, bytes heartbeatMessage) returns() +func (_MaintainerProxy *MaintainerProxyTransactorSession) DefeatFraudChallengeWithHeartbeat(walletPublicKey []byte, heartbeatMessage []byte) (*types.Transaction, error) { + return _MaintainerProxy.Contract.DefeatFraudChallengeWithHeartbeat(&_MaintainerProxy.TransactOpts, walletPublicKey, heartbeatMessage) +} + +// NotifyMovingFundsBelowDust is a paid mutator transaction binding the contract method 0x07f7d223. +// +// Solidity: function notifyMovingFundsBelowDust(bytes20 walletPubKeyHash, (bytes32,uint32,uint64) mainUtxo) returns() +func (_MaintainerProxy *MaintainerProxyTransactor) NotifyMovingFundsBelowDust(opts *bind.TransactOpts, walletPubKeyHash [20]byte, mainUtxo BitcoinTxUTXO2) (*types.Transaction, error) { + return _MaintainerProxy.contract.Transact(opts, "notifyMovingFundsBelowDust", walletPubKeyHash, mainUtxo) +} + +// NotifyMovingFundsBelowDust is a paid mutator transaction binding the contract method 0x07f7d223. +// +// Solidity: function notifyMovingFundsBelowDust(bytes20 walletPubKeyHash, (bytes32,uint32,uint64) mainUtxo) returns() +func (_MaintainerProxy *MaintainerProxySession) NotifyMovingFundsBelowDust(walletPubKeyHash [20]byte, mainUtxo BitcoinTxUTXO2) (*types.Transaction, error) { + return _MaintainerProxy.Contract.NotifyMovingFundsBelowDust(&_MaintainerProxy.TransactOpts, walletPubKeyHash, mainUtxo) +} + +// NotifyMovingFundsBelowDust is a paid mutator transaction binding the contract method 0x07f7d223. +// +// Solidity: function notifyMovingFundsBelowDust(bytes20 walletPubKeyHash, (bytes32,uint32,uint64) mainUtxo) returns() +func (_MaintainerProxy *MaintainerProxyTransactorSession) NotifyMovingFundsBelowDust(walletPubKeyHash [20]byte, mainUtxo BitcoinTxUTXO2) (*types.Transaction, error) { + return _MaintainerProxy.Contract.NotifyMovingFundsBelowDust(&_MaintainerProxy.TransactOpts, walletPubKeyHash, mainUtxo) +} + +// NotifyWalletCloseable is a paid mutator transaction binding the contract method 0xe44bdd31. +// +// Solidity: function notifyWalletCloseable(bytes20 walletPubKeyHash, (bytes32,uint32,uint64) walletMainUtxo) returns() +func (_MaintainerProxy *MaintainerProxyTransactor) NotifyWalletCloseable(opts *bind.TransactOpts, walletPubKeyHash [20]byte, walletMainUtxo BitcoinTxUTXO2) (*types.Transaction, error) { + return _MaintainerProxy.contract.Transact(opts, "notifyWalletCloseable", walletPubKeyHash, walletMainUtxo) +} + +// NotifyWalletCloseable is a paid mutator transaction binding the contract method 0xe44bdd31. +// +// Solidity: function notifyWalletCloseable(bytes20 walletPubKeyHash, (bytes32,uint32,uint64) walletMainUtxo) returns() +func (_MaintainerProxy *MaintainerProxySession) NotifyWalletCloseable(walletPubKeyHash [20]byte, walletMainUtxo BitcoinTxUTXO2) (*types.Transaction, error) { + return _MaintainerProxy.Contract.NotifyWalletCloseable(&_MaintainerProxy.TransactOpts, walletPubKeyHash, walletMainUtxo) +} + +// NotifyWalletCloseable is a paid mutator transaction binding the contract method 0xe44bdd31. +// +// Solidity: function notifyWalletCloseable(bytes20 walletPubKeyHash, (bytes32,uint32,uint64) walletMainUtxo) returns() +func (_MaintainerProxy *MaintainerProxyTransactorSession) NotifyWalletCloseable(walletPubKeyHash [20]byte, walletMainUtxo BitcoinTxUTXO2) (*types.Transaction, error) { + return _MaintainerProxy.Contract.NotifyWalletCloseable(&_MaintainerProxy.TransactOpts, walletPubKeyHash, walletMainUtxo) +} + +// NotifyWalletClosingPeriodElapsed is a paid mutator transaction binding the contract method 0xc8b5d2db. +// +// Solidity: function notifyWalletClosingPeriodElapsed(bytes20 walletPubKeyHash) returns() +func (_MaintainerProxy *MaintainerProxyTransactor) NotifyWalletClosingPeriodElapsed(opts *bind.TransactOpts, walletPubKeyHash [20]byte) (*types.Transaction, error) { + return _MaintainerProxy.contract.Transact(opts, "notifyWalletClosingPeriodElapsed", walletPubKeyHash) +} + +// NotifyWalletClosingPeriodElapsed is a paid mutator transaction binding the contract method 0xc8b5d2db. +// +// Solidity: function notifyWalletClosingPeriodElapsed(bytes20 walletPubKeyHash) returns() +func (_MaintainerProxy *MaintainerProxySession) NotifyWalletClosingPeriodElapsed(walletPubKeyHash [20]byte) (*types.Transaction, error) { + return _MaintainerProxy.Contract.NotifyWalletClosingPeriodElapsed(&_MaintainerProxy.TransactOpts, walletPubKeyHash) +} + +// NotifyWalletClosingPeriodElapsed is a paid mutator transaction binding the contract method 0xc8b5d2db. +// +// Solidity: function notifyWalletClosingPeriodElapsed(bytes20 walletPubKeyHash) returns() +func (_MaintainerProxy *MaintainerProxyTransactorSession) NotifyWalletClosingPeriodElapsed(walletPubKeyHash [20]byte) (*types.Transaction, error) { + return _MaintainerProxy.Contract.NotifyWalletClosingPeriodElapsed(&_MaintainerProxy.TransactOpts, walletPubKeyHash) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MaintainerProxy *MaintainerProxyTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MaintainerProxy.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MaintainerProxy *MaintainerProxySession) RenounceOwnership() (*types.Transaction, error) { + return _MaintainerProxy.Contract.RenounceOwnership(&_MaintainerProxy.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MaintainerProxy *MaintainerProxyTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _MaintainerProxy.Contract.RenounceOwnership(&_MaintainerProxy.TransactOpts) +} + +// RequestNewWallet is a paid mutator transaction binding the contract method 0xa145e2d5. +// +// Solidity: function requestNewWallet((bytes32,uint32,uint64) activeWalletMainUtxo) returns() +func (_MaintainerProxy *MaintainerProxyTransactor) RequestNewWallet(opts *bind.TransactOpts, activeWalletMainUtxo BitcoinTxUTXO2) (*types.Transaction, error) { + return _MaintainerProxy.contract.Transact(opts, "requestNewWallet", activeWalletMainUtxo) +} + +// RequestNewWallet is a paid mutator transaction binding the contract method 0xa145e2d5. +// +// Solidity: function requestNewWallet((bytes32,uint32,uint64) activeWalletMainUtxo) returns() +func (_MaintainerProxy *MaintainerProxySession) RequestNewWallet(activeWalletMainUtxo BitcoinTxUTXO2) (*types.Transaction, error) { + return _MaintainerProxy.Contract.RequestNewWallet(&_MaintainerProxy.TransactOpts, activeWalletMainUtxo) +} + +// RequestNewWallet is a paid mutator transaction binding the contract method 0xa145e2d5. +// +// Solidity: function requestNewWallet((bytes32,uint32,uint64) activeWalletMainUtxo) returns() +func (_MaintainerProxy *MaintainerProxyTransactorSession) RequestNewWallet(activeWalletMainUtxo BitcoinTxUTXO2) (*types.Transaction, error) { + return _MaintainerProxy.Contract.RequestNewWallet(&_MaintainerProxy.TransactOpts, activeWalletMainUtxo) +} + +// ResetMovingFundsTimeout is a paid mutator transaction binding the contract method 0xee1dd3ea. +// +// Solidity: function resetMovingFundsTimeout(bytes20 walletPubKeyHash) returns() +func (_MaintainerProxy *MaintainerProxyTransactor) ResetMovingFundsTimeout(opts *bind.TransactOpts, walletPubKeyHash [20]byte) (*types.Transaction, error) { + return _MaintainerProxy.contract.Transact(opts, "resetMovingFundsTimeout", walletPubKeyHash) +} + +// ResetMovingFundsTimeout is a paid mutator transaction binding the contract method 0xee1dd3ea. +// +// Solidity: function resetMovingFundsTimeout(bytes20 walletPubKeyHash) returns() +func (_MaintainerProxy *MaintainerProxySession) ResetMovingFundsTimeout(walletPubKeyHash [20]byte) (*types.Transaction, error) { + return _MaintainerProxy.Contract.ResetMovingFundsTimeout(&_MaintainerProxy.TransactOpts, walletPubKeyHash) +} + +// ResetMovingFundsTimeout is a paid mutator transaction binding the contract method 0xee1dd3ea. +// +// Solidity: function resetMovingFundsTimeout(bytes20 walletPubKeyHash) returns() +func (_MaintainerProxy *MaintainerProxyTransactorSession) ResetMovingFundsTimeout(walletPubKeyHash [20]byte) (*types.Transaction, error) { + return _MaintainerProxy.Contract.ResetMovingFundsTimeout(&_MaintainerProxy.TransactOpts, walletPubKeyHash) +} + +// SubmitDepositSweepProof is a paid mutator transaction binding the contract method 0x133cafc8. +// +// Solidity: function submitDepositSweepProof((bytes4,bytes,bytes,bytes4) sweepTx, (bytes,uint256,bytes) sweepProof, (bytes32,uint32,uint64) mainUtxo, address vault) returns() +func (_MaintainerProxy *MaintainerProxyTransactor) SubmitDepositSweepProof(opts *bind.TransactOpts, sweepTx BitcoinTxInfo3, sweepProof BitcoinTxProof2, mainUtxo BitcoinTxUTXO2, vault common.Address) (*types.Transaction, error) { + return _MaintainerProxy.contract.Transact(opts, "submitDepositSweepProof", sweepTx, sweepProof, mainUtxo, vault) +} + +// SubmitDepositSweepProof is a paid mutator transaction binding the contract method 0x133cafc8. +// +// Solidity: function submitDepositSweepProof((bytes4,bytes,bytes,bytes4) sweepTx, (bytes,uint256,bytes) sweepProof, (bytes32,uint32,uint64) mainUtxo, address vault) returns() +func (_MaintainerProxy *MaintainerProxySession) SubmitDepositSweepProof(sweepTx BitcoinTxInfo3, sweepProof BitcoinTxProof2, mainUtxo BitcoinTxUTXO2, vault common.Address) (*types.Transaction, error) { + return _MaintainerProxy.Contract.SubmitDepositSweepProof(&_MaintainerProxy.TransactOpts, sweepTx, sweepProof, mainUtxo, vault) +} + +// SubmitDepositSweepProof is a paid mutator transaction binding the contract method 0x133cafc8. +// +// Solidity: function submitDepositSweepProof((bytes4,bytes,bytes,bytes4) sweepTx, (bytes,uint256,bytes) sweepProof, (bytes32,uint32,uint64) mainUtxo, address vault) returns() +func (_MaintainerProxy *MaintainerProxyTransactorSession) SubmitDepositSweepProof(sweepTx BitcoinTxInfo3, sweepProof BitcoinTxProof2, mainUtxo BitcoinTxUTXO2, vault common.Address) (*types.Transaction, error) { + return _MaintainerProxy.Contract.SubmitDepositSweepProof(&_MaintainerProxy.TransactOpts, sweepTx, sweepProof, mainUtxo, vault) +} + +// SubmitMovedFundsSweepProof is a paid mutator transaction binding the contract method 0xb7d372a4. +// +// Solidity: function submitMovedFundsSweepProof((bytes4,bytes,bytes,bytes4) sweepTx, (bytes,uint256,bytes) sweepProof, (bytes32,uint32,uint64) mainUtxo) returns() +func (_MaintainerProxy *MaintainerProxyTransactor) SubmitMovedFundsSweepProof(opts *bind.TransactOpts, sweepTx BitcoinTxInfo3, sweepProof BitcoinTxProof2, mainUtxo BitcoinTxUTXO2) (*types.Transaction, error) { + return _MaintainerProxy.contract.Transact(opts, "submitMovedFundsSweepProof", sweepTx, sweepProof, mainUtxo) +} + +// SubmitMovedFundsSweepProof is a paid mutator transaction binding the contract method 0xb7d372a4. +// +// Solidity: function submitMovedFundsSweepProof((bytes4,bytes,bytes,bytes4) sweepTx, (bytes,uint256,bytes) sweepProof, (bytes32,uint32,uint64) mainUtxo) returns() +func (_MaintainerProxy *MaintainerProxySession) SubmitMovedFundsSweepProof(sweepTx BitcoinTxInfo3, sweepProof BitcoinTxProof2, mainUtxo BitcoinTxUTXO2) (*types.Transaction, error) { + return _MaintainerProxy.Contract.SubmitMovedFundsSweepProof(&_MaintainerProxy.TransactOpts, sweepTx, sweepProof, mainUtxo) +} + +// SubmitMovedFundsSweepProof is a paid mutator transaction binding the contract method 0xb7d372a4. +// +// Solidity: function submitMovedFundsSweepProof((bytes4,bytes,bytes,bytes4) sweepTx, (bytes,uint256,bytes) sweepProof, (bytes32,uint32,uint64) mainUtxo) returns() +func (_MaintainerProxy *MaintainerProxyTransactorSession) SubmitMovedFundsSweepProof(sweepTx BitcoinTxInfo3, sweepProof BitcoinTxProof2, mainUtxo BitcoinTxUTXO2) (*types.Transaction, error) { + return _MaintainerProxy.Contract.SubmitMovedFundsSweepProof(&_MaintainerProxy.TransactOpts, sweepTx, sweepProof, mainUtxo) +} + +// SubmitMovingFundsProof is a paid mutator transaction binding the contract method 0x2f429b64. +// +// Solidity: function submitMovingFundsProof((bytes4,bytes,bytes,bytes4) movingFundsTx, (bytes,uint256,bytes) movingFundsProof, (bytes32,uint32,uint64) mainUtxo, bytes20 walletPubKeyHash) returns() +func (_MaintainerProxy *MaintainerProxyTransactor) SubmitMovingFundsProof(opts *bind.TransactOpts, movingFundsTx BitcoinTxInfo3, movingFundsProof BitcoinTxProof2, mainUtxo BitcoinTxUTXO2, walletPubKeyHash [20]byte) (*types.Transaction, error) { + return _MaintainerProxy.contract.Transact(opts, "submitMovingFundsProof", movingFundsTx, movingFundsProof, mainUtxo, walletPubKeyHash) +} + +// SubmitMovingFundsProof is a paid mutator transaction binding the contract method 0x2f429b64. +// +// Solidity: function submitMovingFundsProof((bytes4,bytes,bytes,bytes4) movingFundsTx, (bytes,uint256,bytes) movingFundsProof, (bytes32,uint32,uint64) mainUtxo, bytes20 walletPubKeyHash) returns() +func (_MaintainerProxy *MaintainerProxySession) SubmitMovingFundsProof(movingFundsTx BitcoinTxInfo3, movingFundsProof BitcoinTxProof2, mainUtxo BitcoinTxUTXO2, walletPubKeyHash [20]byte) (*types.Transaction, error) { + return _MaintainerProxy.Contract.SubmitMovingFundsProof(&_MaintainerProxy.TransactOpts, movingFundsTx, movingFundsProof, mainUtxo, walletPubKeyHash) +} + +// SubmitMovingFundsProof is a paid mutator transaction binding the contract method 0x2f429b64. +// +// Solidity: function submitMovingFundsProof((bytes4,bytes,bytes,bytes4) movingFundsTx, (bytes,uint256,bytes) movingFundsProof, (bytes32,uint32,uint64) mainUtxo, bytes20 walletPubKeyHash) returns() +func (_MaintainerProxy *MaintainerProxyTransactorSession) SubmitMovingFundsProof(movingFundsTx BitcoinTxInfo3, movingFundsProof BitcoinTxProof2, mainUtxo BitcoinTxUTXO2, walletPubKeyHash [20]byte) (*types.Transaction, error) { + return _MaintainerProxy.Contract.SubmitMovingFundsProof(&_MaintainerProxy.TransactOpts, movingFundsTx, movingFundsProof, mainUtxo, walletPubKeyHash) +} + +// SubmitRedemptionProof is a paid mutator transaction binding the contract method 0xb34b3216. +// +// Solidity: function submitRedemptionProof((bytes4,bytes,bytes,bytes4) redemptionTx, (bytes,uint256,bytes) redemptionProof, (bytes32,uint32,uint64) mainUtxo, bytes20 walletPubKeyHash) returns() +func (_MaintainerProxy *MaintainerProxyTransactor) SubmitRedemptionProof(opts *bind.TransactOpts, redemptionTx BitcoinTxInfo3, redemptionProof BitcoinTxProof2, mainUtxo BitcoinTxUTXO2, walletPubKeyHash [20]byte) (*types.Transaction, error) { + return _MaintainerProxy.contract.Transact(opts, "submitRedemptionProof", redemptionTx, redemptionProof, mainUtxo, walletPubKeyHash) +} + +// SubmitRedemptionProof is a paid mutator transaction binding the contract method 0xb34b3216. +// +// Solidity: function submitRedemptionProof((bytes4,bytes,bytes,bytes4) redemptionTx, (bytes,uint256,bytes) redemptionProof, (bytes32,uint32,uint64) mainUtxo, bytes20 walletPubKeyHash) returns() +func (_MaintainerProxy *MaintainerProxySession) SubmitRedemptionProof(redemptionTx BitcoinTxInfo3, redemptionProof BitcoinTxProof2, mainUtxo BitcoinTxUTXO2, walletPubKeyHash [20]byte) (*types.Transaction, error) { + return _MaintainerProxy.Contract.SubmitRedemptionProof(&_MaintainerProxy.TransactOpts, redemptionTx, redemptionProof, mainUtxo, walletPubKeyHash) +} + +// SubmitRedemptionProof is a paid mutator transaction binding the contract method 0xb34b3216. +// +// Solidity: function submitRedemptionProof((bytes4,bytes,bytes,bytes4) redemptionTx, (bytes,uint256,bytes) redemptionProof, (bytes32,uint32,uint64) mainUtxo, bytes20 walletPubKeyHash) returns() +func (_MaintainerProxy *MaintainerProxyTransactorSession) SubmitRedemptionProof(redemptionTx BitcoinTxInfo3, redemptionProof BitcoinTxProof2, mainUtxo BitcoinTxUTXO2, walletPubKeyHash [20]byte) (*types.Transaction, error) { + return _MaintainerProxy.Contract.SubmitRedemptionProof(&_MaintainerProxy.TransactOpts, redemptionTx, redemptionProof, mainUtxo, walletPubKeyHash) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MaintainerProxy *MaintainerProxyTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _MaintainerProxy.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MaintainerProxy *MaintainerProxySession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _MaintainerProxy.Contract.TransferOwnership(&_MaintainerProxy.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MaintainerProxy *MaintainerProxyTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _MaintainerProxy.Contract.TransferOwnership(&_MaintainerProxy.TransactOpts, newOwner) +} + +// UnauthorizeSpvMaintainer is a paid mutator transaction binding the contract method 0x77ee72c8. +// +// Solidity: function unauthorizeSpvMaintainer(address maintainerToUnauthorize) returns() +func (_MaintainerProxy *MaintainerProxyTransactor) UnauthorizeSpvMaintainer(opts *bind.TransactOpts, maintainerToUnauthorize common.Address) (*types.Transaction, error) { + return _MaintainerProxy.contract.Transact(opts, "unauthorizeSpvMaintainer", maintainerToUnauthorize) +} + +// UnauthorizeSpvMaintainer is a paid mutator transaction binding the contract method 0x77ee72c8. +// +// Solidity: function unauthorizeSpvMaintainer(address maintainerToUnauthorize) returns() +func (_MaintainerProxy *MaintainerProxySession) UnauthorizeSpvMaintainer(maintainerToUnauthorize common.Address) (*types.Transaction, error) { + return _MaintainerProxy.Contract.UnauthorizeSpvMaintainer(&_MaintainerProxy.TransactOpts, maintainerToUnauthorize) +} + +// UnauthorizeSpvMaintainer is a paid mutator transaction binding the contract method 0x77ee72c8. +// +// Solidity: function unauthorizeSpvMaintainer(address maintainerToUnauthorize) returns() +func (_MaintainerProxy *MaintainerProxyTransactorSession) UnauthorizeSpvMaintainer(maintainerToUnauthorize common.Address) (*types.Transaction, error) { + return _MaintainerProxy.Contract.UnauthorizeSpvMaintainer(&_MaintainerProxy.TransactOpts, maintainerToUnauthorize) +} + +// UnauthorizeWalletMaintainer is a paid mutator transaction binding the contract method 0xfc9a7c14. +// +// Solidity: function unauthorizeWalletMaintainer(address maintainerToUnauthorize) returns() +func (_MaintainerProxy *MaintainerProxyTransactor) UnauthorizeWalletMaintainer(opts *bind.TransactOpts, maintainerToUnauthorize common.Address) (*types.Transaction, error) { + return _MaintainerProxy.contract.Transact(opts, "unauthorizeWalletMaintainer", maintainerToUnauthorize) +} + +// UnauthorizeWalletMaintainer is a paid mutator transaction binding the contract method 0xfc9a7c14. +// +// Solidity: function unauthorizeWalletMaintainer(address maintainerToUnauthorize) returns() +func (_MaintainerProxy *MaintainerProxySession) UnauthorizeWalletMaintainer(maintainerToUnauthorize common.Address) (*types.Transaction, error) { + return _MaintainerProxy.Contract.UnauthorizeWalletMaintainer(&_MaintainerProxy.TransactOpts, maintainerToUnauthorize) +} + +// UnauthorizeWalletMaintainer is a paid mutator transaction binding the contract method 0xfc9a7c14. +// +// Solidity: function unauthorizeWalletMaintainer(address maintainerToUnauthorize) returns() +func (_MaintainerProxy *MaintainerProxyTransactorSession) UnauthorizeWalletMaintainer(maintainerToUnauthorize common.Address) (*types.Transaction, error) { + return _MaintainerProxy.Contract.UnauthorizeWalletMaintainer(&_MaintainerProxy.TransactOpts, maintainerToUnauthorize) +} + +// UpdateBridge is a paid mutator transaction binding the contract method 0x6eb38212. +// +// Solidity: function updateBridge(address _bridge) returns() +func (_MaintainerProxy *MaintainerProxyTransactor) UpdateBridge(opts *bind.TransactOpts, _bridge common.Address) (*types.Transaction, error) { + return _MaintainerProxy.contract.Transact(opts, "updateBridge", _bridge) +} + +// UpdateBridge is a paid mutator transaction binding the contract method 0x6eb38212. +// +// Solidity: function updateBridge(address _bridge) returns() +func (_MaintainerProxy *MaintainerProxySession) UpdateBridge(_bridge common.Address) (*types.Transaction, error) { + return _MaintainerProxy.Contract.UpdateBridge(&_MaintainerProxy.TransactOpts, _bridge) +} + +// UpdateBridge is a paid mutator transaction binding the contract method 0x6eb38212. +// +// Solidity: function updateBridge(address _bridge) returns() +func (_MaintainerProxy *MaintainerProxyTransactorSession) UpdateBridge(_bridge common.Address) (*types.Transaction, error) { + return _MaintainerProxy.Contract.UpdateBridge(&_MaintainerProxy.TransactOpts, _bridge) +} + +// UpdateGasOffsetParameters is a paid mutator transaction binding the contract method 0xbae516aa. +// +// Solidity: function updateGasOffsetParameters(uint256 newSubmitDepositSweepProofGasOffset, uint256 newSubmitRedemptionProofGasOffset, uint256 newResetMovingFundsTimeoutGasOffset, uint256 newSubmitMovingFundsProofGasOffset, uint256 newNotifyMovingFundsBelowDustGasOffset, uint256 newSubmitMovedFundsSweepProofGasOffset, uint256 newRequestNewWalletGasOffset, uint256 newNotifyWalletCloseableGasOffset, uint256 newNotifyWalletClosingPeriodElapsedGasOffset, uint256 newDefeatFraudChallengeGasOffset, uint256 newDefeatFraudChallengeWithHeartbeatGasOffset) returns() +func (_MaintainerProxy *MaintainerProxyTransactor) UpdateGasOffsetParameters(opts *bind.TransactOpts, newSubmitDepositSweepProofGasOffset *big.Int, newSubmitRedemptionProofGasOffset *big.Int, newResetMovingFundsTimeoutGasOffset *big.Int, newSubmitMovingFundsProofGasOffset *big.Int, newNotifyMovingFundsBelowDustGasOffset *big.Int, newSubmitMovedFundsSweepProofGasOffset *big.Int, newRequestNewWalletGasOffset *big.Int, newNotifyWalletCloseableGasOffset *big.Int, newNotifyWalletClosingPeriodElapsedGasOffset *big.Int, newDefeatFraudChallengeGasOffset *big.Int, newDefeatFraudChallengeWithHeartbeatGasOffset *big.Int) (*types.Transaction, error) { + return _MaintainerProxy.contract.Transact(opts, "updateGasOffsetParameters", newSubmitDepositSweepProofGasOffset, newSubmitRedemptionProofGasOffset, newResetMovingFundsTimeoutGasOffset, newSubmitMovingFundsProofGasOffset, newNotifyMovingFundsBelowDustGasOffset, newSubmitMovedFundsSweepProofGasOffset, newRequestNewWalletGasOffset, newNotifyWalletCloseableGasOffset, newNotifyWalletClosingPeriodElapsedGasOffset, newDefeatFraudChallengeGasOffset, newDefeatFraudChallengeWithHeartbeatGasOffset) +} + +// UpdateGasOffsetParameters is a paid mutator transaction binding the contract method 0xbae516aa. +// +// Solidity: function updateGasOffsetParameters(uint256 newSubmitDepositSweepProofGasOffset, uint256 newSubmitRedemptionProofGasOffset, uint256 newResetMovingFundsTimeoutGasOffset, uint256 newSubmitMovingFundsProofGasOffset, uint256 newNotifyMovingFundsBelowDustGasOffset, uint256 newSubmitMovedFundsSweepProofGasOffset, uint256 newRequestNewWalletGasOffset, uint256 newNotifyWalletCloseableGasOffset, uint256 newNotifyWalletClosingPeriodElapsedGasOffset, uint256 newDefeatFraudChallengeGasOffset, uint256 newDefeatFraudChallengeWithHeartbeatGasOffset) returns() +func (_MaintainerProxy *MaintainerProxySession) UpdateGasOffsetParameters(newSubmitDepositSweepProofGasOffset *big.Int, newSubmitRedemptionProofGasOffset *big.Int, newResetMovingFundsTimeoutGasOffset *big.Int, newSubmitMovingFundsProofGasOffset *big.Int, newNotifyMovingFundsBelowDustGasOffset *big.Int, newSubmitMovedFundsSweepProofGasOffset *big.Int, newRequestNewWalletGasOffset *big.Int, newNotifyWalletCloseableGasOffset *big.Int, newNotifyWalletClosingPeriodElapsedGasOffset *big.Int, newDefeatFraudChallengeGasOffset *big.Int, newDefeatFraudChallengeWithHeartbeatGasOffset *big.Int) (*types.Transaction, error) { + return _MaintainerProxy.Contract.UpdateGasOffsetParameters(&_MaintainerProxy.TransactOpts, newSubmitDepositSweepProofGasOffset, newSubmitRedemptionProofGasOffset, newResetMovingFundsTimeoutGasOffset, newSubmitMovingFundsProofGasOffset, newNotifyMovingFundsBelowDustGasOffset, newSubmitMovedFundsSweepProofGasOffset, newRequestNewWalletGasOffset, newNotifyWalletCloseableGasOffset, newNotifyWalletClosingPeriodElapsedGasOffset, newDefeatFraudChallengeGasOffset, newDefeatFraudChallengeWithHeartbeatGasOffset) +} + +// UpdateGasOffsetParameters is a paid mutator transaction binding the contract method 0xbae516aa. +// +// Solidity: function updateGasOffsetParameters(uint256 newSubmitDepositSweepProofGasOffset, uint256 newSubmitRedemptionProofGasOffset, uint256 newResetMovingFundsTimeoutGasOffset, uint256 newSubmitMovingFundsProofGasOffset, uint256 newNotifyMovingFundsBelowDustGasOffset, uint256 newSubmitMovedFundsSweepProofGasOffset, uint256 newRequestNewWalletGasOffset, uint256 newNotifyWalletCloseableGasOffset, uint256 newNotifyWalletClosingPeriodElapsedGasOffset, uint256 newDefeatFraudChallengeGasOffset, uint256 newDefeatFraudChallengeWithHeartbeatGasOffset) returns() +func (_MaintainerProxy *MaintainerProxyTransactorSession) UpdateGasOffsetParameters(newSubmitDepositSweepProofGasOffset *big.Int, newSubmitRedemptionProofGasOffset *big.Int, newResetMovingFundsTimeoutGasOffset *big.Int, newSubmitMovingFundsProofGasOffset *big.Int, newNotifyMovingFundsBelowDustGasOffset *big.Int, newSubmitMovedFundsSweepProofGasOffset *big.Int, newRequestNewWalletGasOffset *big.Int, newNotifyWalletCloseableGasOffset *big.Int, newNotifyWalletClosingPeriodElapsedGasOffset *big.Int, newDefeatFraudChallengeGasOffset *big.Int, newDefeatFraudChallengeWithHeartbeatGasOffset *big.Int) (*types.Transaction, error) { + return _MaintainerProxy.Contract.UpdateGasOffsetParameters(&_MaintainerProxy.TransactOpts, newSubmitDepositSweepProofGasOffset, newSubmitRedemptionProofGasOffset, newResetMovingFundsTimeoutGasOffset, newSubmitMovingFundsProofGasOffset, newNotifyMovingFundsBelowDustGasOffset, newSubmitMovedFundsSweepProofGasOffset, newRequestNewWalletGasOffset, newNotifyWalletCloseableGasOffset, newNotifyWalletClosingPeriodElapsedGasOffset, newDefeatFraudChallengeGasOffset, newDefeatFraudChallengeWithHeartbeatGasOffset) +} + +// UpdateReimbursementPool is a paid mutator transaction binding the contract method 0x7b35b4e6. +// +// Solidity: function updateReimbursementPool(address _reimbursementPool) returns() +func (_MaintainerProxy *MaintainerProxyTransactor) UpdateReimbursementPool(opts *bind.TransactOpts, _reimbursementPool common.Address) (*types.Transaction, error) { + return _MaintainerProxy.contract.Transact(opts, "updateReimbursementPool", _reimbursementPool) +} + +// UpdateReimbursementPool is a paid mutator transaction binding the contract method 0x7b35b4e6. +// +// Solidity: function updateReimbursementPool(address _reimbursementPool) returns() +func (_MaintainerProxy *MaintainerProxySession) UpdateReimbursementPool(_reimbursementPool common.Address) (*types.Transaction, error) { + return _MaintainerProxy.Contract.UpdateReimbursementPool(&_MaintainerProxy.TransactOpts, _reimbursementPool) +} + +// UpdateReimbursementPool is a paid mutator transaction binding the contract method 0x7b35b4e6. +// +// Solidity: function updateReimbursementPool(address _reimbursementPool) returns() +func (_MaintainerProxy *MaintainerProxyTransactorSession) UpdateReimbursementPool(_reimbursementPool common.Address) (*types.Transaction, error) { + return _MaintainerProxy.Contract.UpdateReimbursementPool(&_MaintainerProxy.TransactOpts, _reimbursementPool) +} + +// MaintainerProxyBridgeUpdatedIterator is returned from FilterBridgeUpdated and is used to iterate over the raw logs and unpacked data for BridgeUpdated events raised by the MaintainerProxy contract. +type MaintainerProxyBridgeUpdatedIterator struct { + Event *MaintainerProxyBridgeUpdated // 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 *MaintainerProxyBridgeUpdatedIterator) 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(MaintainerProxyBridgeUpdated) + 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(MaintainerProxyBridgeUpdated) + 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 *MaintainerProxyBridgeUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MaintainerProxyBridgeUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MaintainerProxyBridgeUpdated represents a BridgeUpdated event raised by the MaintainerProxy contract. +type MaintainerProxyBridgeUpdated struct { + NewBridge common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBridgeUpdated is a free log retrieval operation binding the contract event 0xe1694c0b21fdceff6411daed547c7463c2341b9695387bc82595b5b9b1851d4a. +// +// Solidity: event BridgeUpdated(address newBridge) +func (_MaintainerProxy *MaintainerProxyFilterer) FilterBridgeUpdated(opts *bind.FilterOpts) (*MaintainerProxyBridgeUpdatedIterator, error) { + + logs, sub, err := _MaintainerProxy.contract.FilterLogs(opts, "BridgeUpdated") + if err != nil { + return nil, err + } + return &MaintainerProxyBridgeUpdatedIterator{contract: _MaintainerProxy.contract, event: "BridgeUpdated", logs: logs, sub: sub}, nil +} + +// WatchBridgeUpdated is a free log subscription operation binding the contract event 0xe1694c0b21fdceff6411daed547c7463c2341b9695387bc82595b5b9b1851d4a. +// +// Solidity: event BridgeUpdated(address newBridge) +func (_MaintainerProxy *MaintainerProxyFilterer) WatchBridgeUpdated(opts *bind.WatchOpts, sink chan<- *MaintainerProxyBridgeUpdated) (event.Subscription, error) { + + logs, sub, err := _MaintainerProxy.contract.WatchLogs(opts, "BridgeUpdated") + 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(MaintainerProxyBridgeUpdated) + if err := _MaintainerProxy.contract.UnpackLog(event, "BridgeUpdated", 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 +} + +// ParseBridgeUpdated is a log parse operation binding the contract event 0xe1694c0b21fdceff6411daed547c7463c2341b9695387bc82595b5b9b1851d4a. +// +// Solidity: event BridgeUpdated(address newBridge) +func (_MaintainerProxy *MaintainerProxyFilterer) ParseBridgeUpdated(log types.Log) (*MaintainerProxyBridgeUpdated, error) { + event := new(MaintainerProxyBridgeUpdated) + if err := _MaintainerProxy.contract.UnpackLog(event, "BridgeUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MaintainerProxyGasOffsetParametersUpdatedIterator is returned from FilterGasOffsetParametersUpdated and is used to iterate over the raw logs and unpacked data for GasOffsetParametersUpdated events raised by the MaintainerProxy contract. +type MaintainerProxyGasOffsetParametersUpdatedIterator struct { + Event *MaintainerProxyGasOffsetParametersUpdated // 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 *MaintainerProxyGasOffsetParametersUpdatedIterator) 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(MaintainerProxyGasOffsetParametersUpdated) + 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(MaintainerProxyGasOffsetParametersUpdated) + 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 *MaintainerProxyGasOffsetParametersUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MaintainerProxyGasOffsetParametersUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MaintainerProxyGasOffsetParametersUpdated represents a GasOffsetParametersUpdated event raised by the MaintainerProxy contract. +type MaintainerProxyGasOffsetParametersUpdated struct { + SubmitDepositSweepProofGasOffset *big.Int + SubmitRedemptionProofGasOffset *big.Int + ResetMovingFundsTimeoutGasOffset *big.Int + SubmitMovingFundsProofGasOffset *big.Int + NotifyMovingFundsBelowDustGasOffset *big.Int + SubmitMovedFundsSweepProofGasOffset *big.Int + RequestNewWalletGasOffset *big.Int + NotifyWalletCloseableGasOffset *big.Int + NotifyWalletClosingPeriodElapsedGasOffset *big.Int + DefeatFraudChallengeGasOffset *big.Int + DefeatFraudChallengeWithHeartbeatGasOffset *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterGasOffsetParametersUpdated is a free log retrieval operation binding the contract event 0x2696d8d4050334a4233b7a4a7d94d1ae1badb0a200e1b222f2a9837664b4cc5e. +// +// Solidity: event GasOffsetParametersUpdated(uint256 submitDepositSweepProofGasOffset, uint256 submitRedemptionProofGasOffset, uint256 resetMovingFundsTimeoutGasOffset, uint256 submitMovingFundsProofGasOffset, uint256 notifyMovingFundsBelowDustGasOffset, uint256 submitMovedFundsSweepProofGasOffset, uint256 requestNewWalletGasOffset, uint256 notifyWalletCloseableGasOffset, uint256 notifyWalletClosingPeriodElapsedGasOffset, uint256 defeatFraudChallengeGasOffset, uint256 defeatFraudChallengeWithHeartbeatGasOffset) +func (_MaintainerProxy *MaintainerProxyFilterer) FilterGasOffsetParametersUpdated(opts *bind.FilterOpts) (*MaintainerProxyGasOffsetParametersUpdatedIterator, error) { + + logs, sub, err := _MaintainerProxy.contract.FilterLogs(opts, "GasOffsetParametersUpdated") + if err != nil { + return nil, err + } + return &MaintainerProxyGasOffsetParametersUpdatedIterator{contract: _MaintainerProxy.contract, event: "GasOffsetParametersUpdated", logs: logs, sub: sub}, nil +} + +// WatchGasOffsetParametersUpdated is a free log subscription operation binding the contract event 0x2696d8d4050334a4233b7a4a7d94d1ae1badb0a200e1b222f2a9837664b4cc5e. +// +// Solidity: event GasOffsetParametersUpdated(uint256 submitDepositSweepProofGasOffset, uint256 submitRedemptionProofGasOffset, uint256 resetMovingFundsTimeoutGasOffset, uint256 submitMovingFundsProofGasOffset, uint256 notifyMovingFundsBelowDustGasOffset, uint256 submitMovedFundsSweepProofGasOffset, uint256 requestNewWalletGasOffset, uint256 notifyWalletCloseableGasOffset, uint256 notifyWalletClosingPeriodElapsedGasOffset, uint256 defeatFraudChallengeGasOffset, uint256 defeatFraudChallengeWithHeartbeatGasOffset) +func (_MaintainerProxy *MaintainerProxyFilterer) WatchGasOffsetParametersUpdated(opts *bind.WatchOpts, sink chan<- *MaintainerProxyGasOffsetParametersUpdated) (event.Subscription, error) { + + logs, sub, err := _MaintainerProxy.contract.WatchLogs(opts, "GasOffsetParametersUpdated") + 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(MaintainerProxyGasOffsetParametersUpdated) + if err := _MaintainerProxy.contract.UnpackLog(event, "GasOffsetParametersUpdated", 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 +} + +// ParseGasOffsetParametersUpdated is a log parse operation binding the contract event 0x2696d8d4050334a4233b7a4a7d94d1ae1badb0a200e1b222f2a9837664b4cc5e. +// +// Solidity: event GasOffsetParametersUpdated(uint256 submitDepositSweepProofGasOffset, uint256 submitRedemptionProofGasOffset, uint256 resetMovingFundsTimeoutGasOffset, uint256 submitMovingFundsProofGasOffset, uint256 notifyMovingFundsBelowDustGasOffset, uint256 submitMovedFundsSweepProofGasOffset, uint256 requestNewWalletGasOffset, uint256 notifyWalletCloseableGasOffset, uint256 notifyWalletClosingPeriodElapsedGasOffset, uint256 defeatFraudChallengeGasOffset, uint256 defeatFraudChallengeWithHeartbeatGasOffset) +func (_MaintainerProxy *MaintainerProxyFilterer) ParseGasOffsetParametersUpdated(log types.Log) (*MaintainerProxyGasOffsetParametersUpdated, error) { + event := new(MaintainerProxyGasOffsetParametersUpdated) + if err := _MaintainerProxy.contract.UnpackLog(event, "GasOffsetParametersUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MaintainerProxyOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the MaintainerProxy contract. +type MaintainerProxyOwnershipTransferredIterator struct { + Event *MaintainerProxyOwnershipTransferred // 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 *MaintainerProxyOwnershipTransferredIterator) 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(MaintainerProxyOwnershipTransferred) + 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(MaintainerProxyOwnershipTransferred) + 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 *MaintainerProxyOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MaintainerProxyOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MaintainerProxyOwnershipTransferred represents a OwnershipTransferred event raised by the MaintainerProxy contract. +type MaintainerProxyOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MaintainerProxy *MaintainerProxyFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*MaintainerProxyOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _MaintainerProxy.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &MaintainerProxyOwnershipTransferredIterator{contract: _MaintainerProxy.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MaintainerProxy *MaintainerProxyFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *MaintainerProxyOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _MaintainerProxy.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + 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(MaintainerProxyOwnershipTransferred) + if err := _MaintainerProxy.contract.UnpackLog(event, "OwnershipTransferred", 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 +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MaintainerProxy *MaintainerProxyFilterer) ParseOwnershipTransferred(log types.Log) (*MaintainerProxyOwnershipTransferred, error) { + event := new(MaintainerProxyOwnershipTransferred) + if err := _MaintainerProxy.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MaintainerProxyReimbursementPoolUpdatedIterator is returned from FilterReimbursementPoolUpdated and is used to iterate over the raw logs and unpacked data for ReimbursementPoolUpdated events raised by the MaintainerProxy contract. +type MaintainerProxyReimbursementPoolUpdatedIterator struct { + Event *MaintainerProxyReimbursementPoolUpdated // 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 *MaintainerProxyReimbursementPoolUpdatedIterator) 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(MaintainerProxyReimbursementPoolUpdated) + 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(MaintainerProxyReimbursementPoolUpdated) + 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 *MaintainerProxyReimbursementPoolUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MaintainerProxyReimbursementPoolUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MaintainerProxyReimbursementPoolUpdated represents a ReimbursementPoolUpdated event raised by the MaintainerProxy contract. +type MaintainerProxyReimbursementPoolUpdated struct { + NewReimbursementPool common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterReimbursementPoolUpdated is a free log retrieval operation binding the contract event 0x0e2d2343d31b085b7c4e56d1c8a6ec79f7ab07460386f1c9a1756239fe2533ac. +// +// Solidity: event ReimbursementPoolUpdated(address newReimbursementPool) +func (_MaintainerProxy *MaintainerProxyFilterer) FilterReimbursementPoolUpdated(opts *bind.FilterOpts) (*MaintainerProxyReimbursementPoolUpdatedIterator, error) { + + logs, sub, err := _MaintainerProxy.contract.FilterLogs(opts, "ReimbursementPoolUpdated") + if err != nil { + return nil, err + } + return &MaintainerProxyReimbursementPoolUpdatedIterator{contract: _MaintainerProxy.contract, event: "ReimbursementPoolUpdated", logs: logs, sub: sub}, nil +} + +// WatchReimbursementPoolUpdated is a free log subscription operation binding the contract event 0x0e2d2343d31b085b7c4e56d1c8a6ec79f7ab07460386f1c9a1756239fe2533ac. +// +// Solidity: event ReimbursementPoolUpdated(address newReimbursementPool) +func (_MaintainerProxy *MaintainerProxyFilterer) WatchReimbursementPoolUpdated(opts *bind.WatchOpts, sink chan<- *MaintainerProxyReimbursementPoolUpdated) (event.Subscription, error) { + + logs, sub, err := _MaintainerProxy.contract.WatchLogs(opts, "ReimbursementPoolUpdated") + 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(MaintainerProxyReimbursementPoolUpdated) + if err := _MaintainerProxy.contract.UnpackLog(event, "ReimbursementPoolUpdated", 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 +} + +// ParseReimbursementPoolUpdated is a log parse operation binding the contract event 0x0e2d2343d31b085b7c4e56d1c8a6ec79f7ab07460386f1c9a1756239fe2533ac. +// +// Solidity: event ReimbursementPoolUpdated(address newReimbursementPool) +func (_MaintainerProxy *MaintainerProxyFilterer) ParseReimbursementPoolUpdated(log types.Log) (*MaintainerProxyReimbursementPoolUpdated, error) { + event := new(MaintainerProxyReimbursementPoolUpdated) + if err := _MaintainerProxy.contract.UnpackLog(event, "ReimbursementPoolUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MaintainerProxySpvMaintainerAuthorizedIterator is returned from FilterSpvMaintainerAuthorized and is used to iterate over the raw logs and unpacked data for SpvMaintainerAuthorized events raised by the MaintainerProxy contract. +type MaintainerProxySpvMaintainerAuthorizedIterator struct { + Event *MaintainerProxySpvMaintainerAuthorized // 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 *MaintainerProxySpvMaintainerAuthorizedIterator) 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(MaintainerProxySpvMaintainerAuthorized) + 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(MaintainerProxySpvMaintainerAuthorized) + 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 *MaintainerProxySpvMaintainerAuthorizedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MaintainerProxySpvMaintainerAuthorizedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MaintainerProxySpvMaintainerAuthorized represents a SpvMaintainerAuthorized event raised by the MaintainerProxy contract. +type MaintainerProxySpvMaintainerAuthorized struct { + Maintainer common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSpvMaintainerAuthorized is a free log retrieval operation binding the contract event 0xeb6ed19fe6551d940b426deea5c55162c4b2e6b3256f3507173e8f15be01faf3. +// +// Solidity: event SpvMaintainerAuthorized(address indexed maintainer) +func (_MaintainerProxy *MaintainerProxyFilterer) FilterSpvMaintainerAuthorized(opts *bind.FilterOpts, maintainer []common.Address) (*MaintainerProxySpvMaintainerAuthorizedIterator, error) { + + var maintainerRule []interface{} + for _, maintainerItem := range maintainer { + maintainerRule = append(maintainerRule, maintainerItem) + } + + logs, sub, err := _MaintainerProxy.contract.FilterLogs(opts, "SpvMaintainerAuthorized", maintainerRule) + if err != nil { + return nil, err + } + return &MaintainerProxySpvMaintainerAuthorizedIterator{contract: _MaintainerProxy.contract, event: "SpvMaintainerAuthorized", logs: logs, sub: sub}, nil +} + +// WatchSpvMaintainerAuthorized is a free log subscription operation binding the contract event 0xeb6ed19fe6551d940b426deea5c55162c4b2e6b3256f3507173e8f15be01faf3. +// +// Solidity: event SpvMaintainerAuthorized(address indexed maintainer) +func (_MaintainerProxy *MaintainerProxyFilterer) WatchSpvMaintainerAuthorized(opts *bind.WatchOpts, sink chan<- *MaintainerProxySpvMaintainerAuthorized, maintainer []common.Address) (event.Subscription, error) { + + var maintainerRule []interface{} + for _, maintainerItem := range maintainer { + maintainerRule = append(maintainerRule, maintainerItem) + } + + logs, sub, err := _MaintainerProxy.contract.WatchLogs(opts, "SpvMaintainerAuthorized", maintainerRule) + 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(MaintainerProxySpvMaintainerAuthorized) + if err := _MaintainerProxy.contract.UnpackLog(event, "SpvMaintainerAuthorized", 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 +} + +// ParseSpvMaintainerAuthorized is a log parse operation binding the contract event 0xeb6ed19fe6551d940b426deea5c55162c4b2e6b3256f3507173e8f15be01faf3. +// +// Solidity: event SpvMaintainerAuthorized(address indexed maintainer) +func (_MaintainerProxy *MaintainerProxyFilterer) ParseSpvMaintainerAuthorized(log types.Log) (*MaintainerProxySpvMaintainerAuthorized, error) { + event := new(MaintainerProxySpvMaintainerAuthorized) + if err := _MaintainerProxy.contract.UnpackLog(event, "SpvMaintainerAuthorized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MaintainerProxySpvMaintainerUnauthorizedIterator is returned from FilterSpvMaintainerUnauthorized and is used to iterate over the raw logs and unpacked data for SpvMaintainerUnauthorized events raised by the MaintainerProxy contract. +type MaintainerProxySpvMaintainerUnauthorizedIterator struct { + Event *MaintainerProxySpvMaintainerUnauthorized // 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 *MaintainerProxySpvMaintainerUnauthorizedIterator) 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(MaintainerProxySpvMaintainerUnauthorized) + 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(MaintainerProxySpvMaintainerUnauthorized) + 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 *MaintainerProxySpvMaintainerUnauthorizedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MaintainerProxySpvMaintainerUnauthorizedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MaintainerProxySpvMaintainerUnauthorized represents a SpvMaintainerUnauthorized event raised by the MaintainerProxy contract. +type MaintainerProxySpvMaintainerUnauthorized struct { + Maintainer common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSpvMaintainerUnauthorized is a free log retrieval operation binding the contract event 0x8534c5565cb2e3175cf88e9616a3b20f6c5caf29d831c49d3f762921507780af. +// +// Solidity: event SpvMaintainerUnauthorized(address indexed maintainer) +func (_MaintainerProxy *MaintainerProxyFilterer) FilterSpvMaintainerUnauthorized(opts *bind.FilterOpts, maintainer []common.Address) (*MaintainerProxySpvMaintainerUnauthorizedIterator, error) { + + var maintainerRule []interface{} + for _, maintainerItem := range maintainer { + maintainerRule = append(maintainerRule, maintainerItem) + } + + logs, sub, err := _MaintainerProxy.contract.FilterLogs(opts, "SpvMaintainerUnauthorized", maintainerRule) + if err != nil { + return nil, err + } + return &MaintainerProxySpvMaintainerUnauthorizedIterator{contract: _MaintainerProxy.contract, event: "SpvMaintainerUnauthorized", logs: logs, sub: sub}, nil +} + +// WatchSpvMaintainerUnauthorized is a free log subscription operation binding the contract event 0x8534c5565cb2e3175cf88e9616a3b20f6c5caf29d831c49d3f762921507780af. +// +// Solidity: event SpvMaintainerUnauthorized(address indexed maintainer) +func (_MaintainerProxy *MaintainerProxyFilterer) WatchSpvMaintainerUnauthorized(opts *bind.WatchOpts, sink chan<- *MaintainerProxySpvMaintainerUnauthorized, maintainer []common.Address) (event.Subscription, error) { + + var maintainerRule []interface{} + for _, maintainerItem := range maintainer { + maintainerRule = append(maintainerRule, maintainerItem) + } + + logs, sub, err := _MaintainerProxy.contract.WatchLogs(opts, "SpvMaintainerUnauthorized", maintainerRule) + 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(MaintainerProxySpvMaintainerUnauthorized) + if err := _MaintainerProxy.contract.UnpackLog(event, "SpvMaintainerUnauthorized", 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 +} + +// ParseSpvMaintainerUnauthorized is a log parse operation binding the contract event 0x8534c5565cb2e3175cf88e9616a3b20f6c5caf29d831c49d3f762921507780af. +// +// Solidity: event SpvMaintainerUnauthorized(address indexed maintainer) +func (_MaintainerProxy *MaintainerProxyFilterer) ParseSpvMaintainerUnauthorized(log types.Log) (*MaintainerProxySpvMaintainerUnauthorized, error) { + event := new(MaintainerProxySpvMaintainerUnauthorized) + if err := _MaintainerProxy.contract.UnpackLog(event, "SpvMaintainerUnauthorized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MaintainerProxyWalletMaintainerAuthorizedIterator is returned from FilterWalletMaintainerAuthorized and is used to iterate over the raw logs and unpacked data for WalletMaintainerAuthorized events raised by the MaintainerProxy contract. +type MaintainerProxyWalletMaintainerAuthorizedIterator struct { + Event *MaintainerProxyWalletMaintainerAuthorized // 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 *MaintainerProxyWalletMaintainerAuthorizedIterator) 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(MaintainerProxyWalletMaintainerAuthorized) + 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(MaintainerProxyWalletMaintainerAuthorized) + 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 *MaintainerProxyWalletMaintainerAuthorizedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MaintainerProxyWalletMaintainerAuthorizedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MaintainerProxyWalletMaintainerAuthorized represents a WalletMaintainerAuthorized event raised by the MaintainerProxy contract. +type MaintainerProxyWalletMaintainerAuthorized struct { + Maintainer common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWalletMaintainerAuthorized is a free log retrieval operation binding the contract event 0x7b22a9ca0e4062aa08f1b002d95a3d99342205c693cb088e382d8e20cfb70a3a. +// +// Solidity: event WalletMaintainerAuthorized(address indexed maintainer) +func (_MaintainerProxy *MaintainerProxyFilterer) FilterWalletMaintainerAuthorized(opts *bind.FilterOpts, maintainer []common.Address) (*MaintainerProxyWalletMaintainerAuthorizedIterator, error) { + + var maintainerRule []interface{} + for _, maintainerItem := range maintainer { + maintainerRule = append(maintainerRule, maintainerItem) + } + + logs, sub, err := _MaintainerProxy.contract.FilterLogs(opts, "WalletMaintainerAuthorized", maintainerRule) + if err != nil { + return nil, err + } + return &MaintainerProxyWalletMaintainerAuthorizedIterator{contract: _MaintainerProxy.contract, event: "WalletMaintainerAuthorized", logs: logs, sub: sub}, nil +} + +// WatchWalletMaintainerAuthorized is a free log subscription operation binding the contract event 0x7b22a9ca0e4062aa08f1b002d95a3d99342205c693cb088e382d8e20cfb70a3a. +// +// Solidity: event WalletMaintainerAuthorized(address indexed maintainer) +func (_MaintainerProxy *MaintainerProxyFilterer) WatchWalletMaintainerAuthorized(opts *bind.WatchOpts, sink chan<- *MaintainerProxyWalletMaintainerAuthorized, maintainer []common.Address) (event.Subscription, error) { + + var maintainerRule []interface{} + for _, maintainerItem := range maintainer { + maintainerRule = append(maintainerRule, maintainerItem) + } + + logs, sub, err := _MaintainerProxy.contract.WatchLogs(opts, "WalletMaintainerAuthorized", maintainerRule) + 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(MaintainerProxyWalletMaintainerAuthorized) + if err := _MaintainerProxy.contract.UnpackLog(event, "WalletMaintainerAuthorized", 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 +} + +// ParseWalletMaintainerAuthorized is a log parse operation binding the contract event 0x7b22a9ca0e4062aa08f1b002d95a3d99342205c693cb088e382d8e20cfb70a3a. +// +// Solidity: event WalletMaintainerAuthorized(address indexed maintainer) +func (_MaintainerProxy *MaintainerProxyFilterer) ParseWalletMaintainerAuthorized(log types.Log) (*MaintainerProxyWalletMaintainerAuthorized, error) { + event := new(MaintainerProxyWalletMaintainerAuthorized) + if err := _MaintainerProxy.contract.UnpackLog(event, "WalletMaintainerAuthorized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MaintainerProxyWalletMaintainerUnauthorizedIterator is returned from FilterWalletMaintainerUnauthorized and is used to iterate over the raw logs and unpacked data for WalletMaintainerUnauthorized events raised by the MaintainerProxy contract. +type MaintainerProxyWalletMaintainerUnauthorizedIterator struct { + Event *MaintainerProxyWalletMaintainerUnauthorized // 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 *MaintainerProxyWalletMaintainerUnauthorizedIterator) 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(MaintainerProxyWalletMaintainerUnauthorized) + 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(MaintainerProxyWalletMaintainerUnauthorized) + 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 *MaintainerProxyWalletMaintainerUnauthorizedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MaintainerProxyWalletMaintainerUnauthorizedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MaintainerProxyWalletMaintainerUnauthorized represents a WalletMaintainerUnauthorized event raised by the MaintainerProxy contract. +type MaintainerProxyWalletMaintainerUnauthorized struct { + Maintainer common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWalletMaintainerUnauthorized is a free log retrieval operation binding the contract event 0xb43b4403ab2d3b17d8f18b9366c2da409c988c0a99b8ca0b006f9115dd676cb6. +// +// Solidity: event WalletMaintainerUnauthorized(address indexed maintainer) +func (_MaintainerProxy *MaintainerProxyFilterer) FilterWalletMaintainerUnauthorized(opts *bind.FilterOpts, maintainer []common.Address) (*MaintainerProxyWalletMaintainerUnauthorizedIterator, error) { + + var maintainerRule []interface{} + for _, maintainerItem := range maintainer { + maintainerRule = append(maintainerRule, maintainerItem) + } + + logs, sub, err := _MaintainerProxy.contract.FilterLogs(opts, "WalletMaintainerUnauthorized", maintainerRule) + if err != nil { + return nil, err + } + return &MaintainerProxyWalletMaintainerUnauthorizedIterator{contract: _MaintainerProxy.contract, event: "WalletMaintainerUnauthorized", logs: logs, sub: sub}, nil +} + +// WatchWalletMaintainerUnauthorized is a free log subscription operation binding the contract event 0xb43b4403ab2d3b17d8f18b9366c2da409c988c0a99b8ca0b006f9115dd676cb6. +// +// Solidity: event WalletMaintainerUnauthorized(address indexed maintainer) +func (_MaintainerProxy *MaintainerProxyFilterer) WatchWalletMaintainerUnauthorized(opts *bind.WatchOpts, sink chan<- *MaintainerProxyWalletMaintainerUnauthorized, maintainer []common.Address) (event.Subscription, error) { + + var maintainerRule []interface{} + for _, maintainerItem := range maintainer { + maintainerRule = append(maintainerRule, maintainerItem) + } + + logs, sub, err := _MaintainerProxy.contract.WatchLogs(opts, "WalletMaintainerUnauthorized", maintainerRule) + 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(MaintainerProxyWalletMaintainerUnauthorized) + if err := _MaintainerProxy.contract.UnpackLog(event, "WalletMaintainerUnauthorized", 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 +} + +// ParseWalletMaintainerUnauthorized is a log parse operation binding the contract event 0xb43b4403ab2d3b17d8f18b9366c2da409c988c0a99b8ca0b006f9115dd676cb6. +// +// Solidity: event WalletMaintainerUnauthorized(address indexed maintainer) +func (_MaintainerProxy *MaintainerProxyFilterer) ParseWalletMaintainerUnauthorized(log types.Log) (*MaintainerProxyWalletMaintainerUnauthorized, error) { + event := new(MaintainerProxyWalletMaintainerUnauthorized) + if err := _MaintainerProxy.contract.UnpackLog(event, "WalletMaintainerUnauthorized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/chain/ethereum/tbtc/gen/cmd/Bridge.go b/pkg/chain/ethereum/tbtc/gen/cmd/Bridge.go index 7a9c78d340..33b157d2b2 100644 --- a/pkg/chain/ethereum/tbtc/gen/cmd/Bridge.go +++ b/pkg/chain/ethereum/tbtc/gen/cmd/Bridge.go @@ -79,18 +79,30 @@ func init() { bNotifyMovingFundsBelowDustCommand(), bNotifyWalletCloseableCommand(), bNotifyWalletClosingPeriodElapsedCommand(), + bProcessPendingMovedFundsSweepRequestCommand(), bReceiveBalanceApprovalCommand(), bRequestNewWalletCommand(), bRequestRedemptionCommand(), bResetMovingFundsTimeoutCommand(), bRevealDepositCommand(), + bSetActiveWalletCommand(), + bSetDepositDustThresholdCommand(), + bSetDepositRevealAheadPeriodCommand(), + bSetDepositTxMaxFeeCommand(), + bSetMovedFundsSweepTxMaxTotalFeeCommand(), + bSetPendingMovedFundsSweepRequestCommand(), + bSetRedemptionDustThresholdCommand(), + bSetRedemptionTreasuryFeeDivisorCommand(), bSetSpvMaintainerStatusCommand(), bSetVaultStatusCommand(), + bSetWalletCommand(), + bSetWalletMainUtxoCommand(), bSubmitDepositSweepProofCommand(), bSubmitFraudChallengeCommand(), bSubmitMovedFundsSweepProofCommand(), bSubmitMovingFundsProofCommand(), bSubmitRedemptionProofCommand(), + bTimeoutPendingMovedFundsSweepRequestCommand(), bTransferGovernanceCommand(), bUpdateDepositParametersCommand(), bUpdateFraudParametersCommand(), @@ -1467,6 +1479,78 @@ func bNotifyWalletClosingPeriodElapsed(c *cobra.Command, args []string) error { return nil } +func bProcessPendingMovedFundsSweepRequestCommand() *cobra.Command { + c := &cobra.Command{ + Use: "process-pending-moved-funds-sweep-request [arg_walletPubKeyHash] [arg_utxo_json]", + Short: "Calls the nonpayable method processPendingMovedFundsSweepRequest on the Bridge contract.", + Args: cmd.ArgCountChecker(2), + RunE: bProcessPendingMovedFundsSweepRequest, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func bProcessPendingMovedFundsSweepRequest(c *cobra.Command, args []string) error { + contract, err := initializeBridge(c) + if err != nil { + return err + } + + arg_walletPubKeyHash, err := decode.ParseBytes20(args[0]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_walletPubKeyHash, a bytes20, from passed value %v", + args[0], + ) + } + + arg_utxo_json := abi.BitcoinTxUTXO{} + if err := json.Unmarshal([]byte(args[1]), &arg_utxo_json); err != nil { + return fmt.Errorf("failed to unmarshal arg_utxo_json to abi.BitcoinTxUTXO: %w", err) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.ProcessPendingMovedFundsSweepRequest( + arg_walletPubKeyHash, + arg_utxo_json, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallProcessPendingMovedFundsSweepRequest( + arg_walletPubKeyHash, + arg_utxo_json, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + func bReceiveBalanceApprovalCommand() *cobra.Command { c := &cobra.Command{ Use: "receive-balance-approval [arg_balanceOwner] [arg_amount] [arg_redemptionData]", @@ -1503,24 +1587,708 @@ func bReceiveBalanceApproval(c *cobra.Command, args []string) error { args[1], ) } - arg_redemptionData, err := hexutil.Decode(args[2]) + arg_redemptionData, err := hexutil.Decode(args[2]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_redemptionData, a bytes, from passed value %v", + args[2], + ) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.ReceiveBalanceApproval( + arg_balanceOwner, + arg_amount, + arg_redemptionData, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallReceiveBalanceApproval( + arg_balanceOwner, + arg_amount, + arg_redemptionData, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func bRequestNewWalletCommand() *cobra.Command { + c := &cobra.Command{ + Use: "request-new-wallet [arg_activeWalletMainUtxo_json]", + Short: "Calls the nonpayable method requestNewWallet on the Bridge contract.", + Args: cmd.ArgCountChecker(1), + RunE: bRequestNewWallet, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func bRequestNewWallet(c *cobra.Command, args []string) error { + contract, err := initializeBridge(c) + if err != nil { + return err + } + + arg_activeWalletMainUtxo_json := abi.BitcoinTxUTXO{} + if err := json.Unmarshal([]byte(args[0]), &arg_activeWalletMainUtxo_json); err != nil { + return fmt.Errorf("failed to unmarshal arg_activeWalletMainUtxo_json to abi.BitcoinTxUTXO: %w", err) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.RequestNewWallet( + arg_activeWalletMainUtxo_json, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallRequestNewWallet( + arg_activeWalletMainUtxo_json, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func bRequestRedemptionCommand() *cobra.Command { + c := &cobra.Command{ + Use: "request-redemption [arg_walletPubKeyHash] [arg_mainUtxo_json] [arg_redeemerOutputScript] [arg_amount]", + Short: "Calls the nonpayable method requestRedemption on the Bridge contract.", + Args: cmd.ArgCountChecker(4), + RunE: bRequestRedemption, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func bRequestRedemption(c *cobra.Command, args []string) error { + contract, err := initializeBridge(c) + if err != nil { + return err + } + + arg_walletPubKeyHash, err := decode.ParseBytes20(args[0]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_walletPubKeyHash, a bytes20, from passed value %v", + args[0], + ) + } + + arg_mainUtxo_json := abi.BitcoinTxUTXO{} + if err := json.Unmarshal([]byte(args[1]), &arg_mainUtxo_json); err != nil { + return fmt.Errorf("failed to unmarshal arg_mainUtxo_json to abi.BitcoinTxUTXO: %w", err) + } + arg_redeemerOutputScript, err := hexutil.Decode(args[2]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_redeemerOutputScript, a bytes, from passed value %v", + args[2], + ) + } + arg_amount, err := decode.ParseUint[uint64](args[3], 64) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_amount, a uint64, from passed value %v", + args[3], + ) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.RequestRedemption( + arg_walletPubKeyHash, + arg_mainUtxo_json, + arg_redeemerOutputScript, + arg_amount, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallRequestRedemption( + arg_walletPubKeyHash, + arg_mainUtxo_json, + arg_redeemerOutputScript, + arg_amount, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func bResetMovingFundsTimeoutCommand() *cobra.Command { + c := &cobra.Command{ + Use: "reset-moving-funds-timeout [arg_walletPubKeyHash]", + Short: "Calls the nonpayable method resetMovingFundsTimeout on the Bridge contract.", + Args: cmd.ArgCountChecker(1), + RunE: bResetMovingFundsTimeout, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func bResetMovingFundsTimeout(c *cobra.Command, args []string) error { + contract, err := initializeBridge(c) + if err != nil { + return err + } + + arg_walletPubKeyHash, err := decode.ParseBytes20(args[0]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_walletPubKeyHash, a bytes20, from passed value %v", + args[0], + ) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.ResetMovingFundsTimeout( + arg_walletPubKeyHash, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallResetMovingFundsTimeout( + arg_walletPubKeyHash, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func bRevealDepositCommand() *cobra.Command { + c := &cobra.Command{ + Use: "reveal-deposit [arg_fundingTx_json] [arg_reveal_json]", + Short: "Calls the nonpayable method revealDeposit on the Bridge contract.", + Args: cmd.ArgCountChecker(2), + RunE: bRevealDeposit, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func bRevealDeposit(c *cobra.Command, args []string) error { + contract, err := initializeBridge(c) + if err != nil { + return err + } + + arg_fundingTx_json := abi.BitcoinTxInfo{} + if err := json.Unmarshal([]byte(args[0]), &arg_fundingTx_json); err != nil { + return fmt.Errorf("failed to unmarshal arg_fundingTx_json to abi.BitcoinTxInfo: %w", err) + } + + arg_reveal_json := abi.DepositDepositRevealInfo{} + if err := json.Unmarshal([]byte(args[1]), &arg_reveal_json); err != nil { + return fmt.Errorf("failed to unmarshal arg_reveal_json to abi.DepositDepositRevealInfo: %w", err) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.RevealDeposit( + arg_fundingTx_json, + arg_reveal_json, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallRevealDeposit( + arg_fundingTx_json, + arg_reveal_json, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func bSetActiveWalletCommand() *cobra.Command { + c := &cobra.Command{ + Use: "set-active-wallet [arg_activeWalletPubKeyHash]", + Short: "Calls the nonpayable method setActiveWallet on the Bridge contract.", + Args: cmd.ArgCountChecker(1), + RunE: bSetActiveWallet, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func bSetActiveWallet(c *cobra.Command, args []string) error { + contract, err := initializeBridge(c) + if err != nil { + return err + } + + arg_activeWalletPubKeyHash, err := decode.ParseBytes20(args[0]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_activeWalletPubKeyHash, a bytes20, from passed value %v", + args[0], + ) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.SetActiveWallet( + arg_activeWalletPubKeyHash, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallSetActiveWallet( + arg_activeWalletPubKeyHash, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func bSetDepositDustThresholdCommand() *cobra.Command { + c := &cobra.Command{ + Use: "set-deposit-dust-threshold [arg__depositDustThreshold]", + Short: "Calls the nonpayable method setDepositDustThreshold on the Bridge contract.", + Args: cmd.ArgCountChecker(1), + RunE: bSetDepositDustThreshold, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func bSetDepositDustThreshold(c *cobra.Command, args []string) error { + contract, err := initializeBridge(c) + if err != nil { + return err + } + + arg__depositDustThreshold, err := decode.ParseUint[uint64](args[0], 64) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg__depositDustThreshold, a uint64, from passed value %v", + args[0], + ) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.SetDepositDustThreshold( + arg__depositDustThreshold, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallSetDepositDustThreshold( + arg__depositDustThreshold, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func bSetDepositRevealAheadPeriodCommand() *cobra.Command { + c := &cobra.Command{ + Use: "set-deposit-reveal-ahead-period [arg__depositRevealAheadPeriod]", + Short: "Calls the nonpayable method setDepositRevealAheadPeriod on the Bridge contract.", + Args: cmd.ArgCountChecker(1), + RunE: bSetDepositRevealAheadPeriod, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func bSetDepositRevealAheadPeriod(c *cobra.Command, args []string) error { + contract, err := initializeBridge(c) + if err != nil { + return err + } + + arg__depositRevealAheadPeriod, err := decode.ParseUint[uint32](args[0], 32) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg__depositRevealAheadPeriod, a uint32, from passed value %v", + args[0], + ) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.SetDepositRevealAheadPeriod( + arg__depositRevealAheadPeriod, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallSetDepositRevealAheadPeriod( + arg__depositRevealAheadPeriod, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func bSetDepositTxMaxFeeCommand() *cobra.Command { + c := &cobra.Command{ + Use: "set-deposit-tx-max-fee [arg__depositTxMaxFee]", + Short: "Calls the nonpayable method setDepositTxMaxFee on the Bridge contract.", + Args: cmd.ArgCountChecker(1), + RunE: bSetDepositTxMaxFee, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func bSetDepositTxMaxFee(c *cobra.Command, args []string) error { + contract, err := initializeBridge(c) + if err != nil { + return err + } + + arg__depositTxMaxFee, err := decode.ParseUint[uint64](args[0], 64) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg__depositTxMaxFee, a uint64, from passed value %v", + args[0], + ) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.SetDepositTxMaxFee( + arg__depositTxMaxFee, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallSetDepositTxMaxFee( + arg__depositTxMaxFee, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func bSetMovedFundsSweepTxMaxTotalFeeCommand() *cobra.Command { + c := &cobra.Command{ + Use: "set-moved-funds-sweep-tx-max-total-fee [arg__movedFundsSweepTxMaxTotalFee]", + Short: "Calls the nonpayable method setMovedFundsSweepTxMaxTotalFee on the Bridge contract.", + Args: cmd.ArgCountChecker(1), + RunE: bSetMovedFundsSweepTxMaxTotalFee, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func bSetMovedFundsSweepTxMaxTotalFee(c *cobra.Command, args []string) error { + contract, err := initializeBridge(c) + if err != nil { + return err + } + + arg__movedFundsSweepTxMaxTotalFee, err := decode.ParseUint[uint64](args[0], 64) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg__movedFundsSweepTxMaxTotalFee, a uint64, from passed value %v", + args[0], + ) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.SetMovedFundsSweepTxMaxTotalFee( + arg__movedFundsSweepTxMaxTotalFee, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallSetMovedFundsSweepTxMaxTotalFee( + arg__movedFundsSweepTxMaxTotalFee, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func bSetPendingMovedFundsSweepRequestCommand() *cobra.Command { + c := &cobra.Command{ + Use: "set-pending-moved-funds-sweep-request [arg_walletPubKeyHash] [arg_utxo_json]", + Short: "Calls the nonpayable method setPendingMovedFundsSweepRequest on the Bridge contract.", + Args: cmd.ArgCountChecker(2), + RunE: bSetPendingMovedFundsSweepRequest, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func bSetPendingMovedFundsSweepRequest(c *cobra.Command, args []string) error { + contract, err := initializeBridge(c) + if err != nil { + return err + } + + arg_walletPubKeyHash, err := decode.ParseBytes20(args[0]) if err != nil { return fmt.Errorf( - "couldn't parse parameter arg_redemptionData, a bytes, from passed value %v", - args[2], + "couldn't parse parameter arg_walletPubKeyHash, a bytes20, from passed value %v", + args[0], ) } + arg_utxo_json := abi.BitcoinTxUTXO{} + if err := json.Unmarshal([]byte(args[1]), &arg_utxo_json); err != nil { + return fmt.Errorf("failed to unmarshal arg_utxo_json to abi.BitcoinTxUTXO: %w", err) + } + var ( transaction *types.Transaction ) if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { // Do a regular submission. Take payable into account. - transaction, err = contract.ReceiveBalanceApproval( - arg_balanceOwner, - arg_amount, - arg_redemptionData, + transaction, err = contract.SetPendingMovedFundsSweepRequest( + arg_walletPubKeyHash, + arg_utxo_json, ) if err != nil { return err @@ -1529,10 +2297,9 @@ func bReceiveBalanceApproval(c *cobra.Command, args []string) error { cmd.PrintOutput(transaction.Hash()) } else { // Do a call. - err = contract.CallReceiveBalanceApproval( - arg_balanceOwner, - arg_amount, - arg_redemptionData, + err = contract.CallSetPendingMovedFundsSweepRequest( + arg_walletPubKeyHash, + arg_utxo_json, cmd.BlockFlagValue.Int, ) if err != nil { @@ -1550,12 +2317,12 @@ func bReceiveBalanceApproval(c *cobra.Command, args []string) error { return nil } -func bRequestNewWalletCommand() *cobra.Command { +func bSetRedemptionDustThresholdCommand() *cobra.Command { c := &cobra.Command{ - Use: "request-new-wallet [arg_activeWalletMainUtxo_json]", - Short: "Calls the nonpayable method requestNewWallet on the Bridge contract.", + Use: "set-redemption-dust-threshold [arg__redemptionDustThreshold]", + Short: "Calls the nonpayable method setRedemptionDustThreshold on the Bridge contract.", Args: cmd.ArgCountChecker(1), - RunE: bRequestNewWallet, + RunE: bSetRedemptionDustThreshold, SilenceUsage: true, DisableFlagsInUseLine: true, } @@ -1566,15 +2333,18 @@ func bRequestNewWalletCommand() *cobra.Command { return c } -func bRequestNewWallet(c *cobra.Command, args []string) error { +func bSetRedemptionDustThreshold(c *cobra.Command, args []string) error { contract, err := initializeBridge(c) if err != nil { return err } - arg_activeWalletMainUtxo_json := abi.BitcoinTxUTXO{} - if err := json.Unmarshal([]byte(args[0]), &arg_activeWalletMainUtxo_json); err != nil { - return fmt.Errorf("failed to unmarshal arg_activeWalletMainUtxo_json to abi.BitcoinTxUTXO: %w", err) + arg__redemptionDustThreshold, err := decode.ParseUint[uint64](args[0], 64) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg__redemptionDustThreshold, a uint64, from passed value %v", + args[0], + ) } var ( @@ -1583,8 +2353,8 @@ func bRequestNewWallet(c *cobra.Command, args []string) error { if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { // Do a regular submission. Take payable into account. - transaction, err = contract.RequestNewWallet( - arg_activeWalletMainUtxo_json, + transaction, err = contract.SetRedemptionDustThreshold( + arg__redemptionDustThreshold, ) if err != nil { return err @@ -1593,8 +2363,8 @@ func bRequestNewWallet(c *cobra.Command, args []string) error { cmd.PrintOutput(transaction.Hash()) } else { // Do a call. - err = contract.CallRequestNewWallet( - arg_activeWalletMainUtxo_json, + err = contract.CallSetRedemptionDustThreshold( + arg__redemptionDustThreshold, cmd.BlockFlagValue.Int, ) if err != nil { @@ -1612,12 +2382,12 @@ func bRequestNewWallet(c *cobra.Command, args []string) error { return nil } -func bRequestRedemptionCommand() *cobra.Command { +func bSetRedemptionTreasuryFeeDivisorCommand() *cobra.Command { c := &cobra.Command{ - Use: "request-redemption [arg_walletPubKeyHash] [arg_mainUtxo_json] [arg_redeemerOutputScript] [arg_amount]", - Short: "Calls the nonpayable method requestRedemption on the Bridge contract.", - Args: cmd.ArgCountChecker(4), - RunE: bRequestRedemption, + Use: "set-redemption-treasury-fee-divisor [arg__redemptionTreasuryFeeDivisor]", + Short: "Calls the nonpayable method setRedemptionTreasuryFeeDivisor on the Bridge contract.", + Args: cmd.ArgCountChecker(1), + RunE: bSetRedemptionTreasuryFeeDivisor, SilenceUsage: true, DisableFlagsInUseLine: true, } @@ -1628,50 +2398,28 @@ func bRequestRedemptionCommand() *cobra.Command { return c } -func bRequestRedemption(c *cobra.Command, args []string) error { +func bSetRedemptionTreasuryFeeDivisor(c *cobra.Command, args []string) error { contract, err := initializeBridge(c) if err != nil { return err } - arg_walletPubKeyHash, err := decode.ParseBytes20(args[0]) + arg__redemptionTreasuryFeeDivisor, err := decode.ParseUint[uint64](args[0], 64) if err != nil { return fmt.Errorf( - "couldn't parse parameter arg_walletPubKeyHash, a bytes20, from passed value %v", + "couldn't parse parameter arg__redemptionTreasuryFeeDivisor, a uint64, from passed value %v", args[0], ) } - arg_mainUtxo_json := abi.BitcoinTxUTXO{} - if err := json.Unmarshal([]byte(args[1]), &arg_mainUtxo_json); err != nil { - return fmt.Errorf("failed to unmarshal arg_mainUtxo_json to abi.BitcoinTxUTXO: %w", err) - } - arg_redeemerOutputScript, err := hexutil.Decode(args[2]) - if err != nil { - return fmt.Errorf( - "couldn't parse parameter arg_redeemerOutputScript, a bytes, from passed value %v", - args[2], - ) - } - arg_amount, err := decode.ParseUint[uint64](args[3], 64) - if err != nil { - return fmt.Errorf( - "couldn't parse parameter arg_amount, a uint64, from passed value %v", - args[3], - ) - } - var ( transaction *types.Transaction ) if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { // Do a regular submission. Take payable into account. - transaction, err = contract.RequestRedemption( - arg_walletPubKeyHash, - arg_mainUtxo_json, - arg_redeemerOutputScript, - arg_amount, + transaction, err = contract.SetRedemptionTreasuryFeeDivisor( + arg__redemptionTreasuryFeeDivisor, ) if err != nil { return err @@ -1680,11 +2428,8 @@ func bRequestRedemption(c *cobra.Command, args []string) error { cmd.PrintOutput(transaction.Hash()) } else { // Do a call. - err = contract.CallRequestRedemption( - arg_walletPubKeyHash, - arg_mainUtxo_json, - arg_redeemerOutputScript, - arg_amount, + err = contract.CallSetRedemptionTreasuryFeeDivisor( + arg__redemptionTreasuryFeeDivisor, cmd.BlockFlagValue.Int, ) if err != nil { @@ -1702,12 +2447,12 @@ func bRequestRedemption(c *cobra.Command, args []string) error { return nil } -func bResetMovingFundsTimeoutCommand() *cobra.Command { +func bSetSpvMaintainerStatusCommand() *cobra.Command { c := &cobra.Command{ - Use: "reset-moving-funds-timeout [arg_walletPubKeyHash]", - Short: "Calls the nonpayable method resetMovingFundsTimeout on the Bridge contract.", - Args: cmd.ArgCountChecker(1), - RunE: bResetMovingFundsTimeout, + Use: "set-spv-maintainer-status [arg_spvMaintainer] [arg_isTrusted]", + Short: "Calls the nonpayable method setSpvMaintainerStatus on the Bridge contract.", + Args: cmd.ArgCountChecker(2), + RunE: bSetSpvMaintainerStatus, SilenceUsage: true, DisableFlagsInUseLine: true, } @@ -1718,19 +2463,26 @@ func bResetMovingFundsTimeoutCommand() *cobra.Command { return c } -func bResetMovingFundsTimeout(c *cobra.Command, args []string) error { +func bSetSpvMaintainerStatus(c *cobra.Command, args []string) error { contract, err := initializeBridge(c) if err != nil { return err } - arg_walletPubKeyHash, err := decode.ParseBytes20(args[0]) + arg_spvMaintainer, err := chainutil.AddressFromHex(args[0]) if err != nil { return fmt.Errorf( - "couldn't parse parameter arg_walletPubKeyHash, a bytes20, from passed value %v", + "couldn't parse parameter arg_spvMaintainer, a address, from passed value %v", args[0], ) } + arg_isTrusted, err := strconv.ParseBool(args[1]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_isTrusted, a bool, from passed value %v", + args[1], + ) + } var ( transaction *types.Transaction @@ -1738,8 +2490,9 @@ func bResetMovingFundsTimeout(c *cobra.Command, args []string) error { if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { // Do a regular submission. Take payable into account. - transaction, err = contract.ResetMovingFundsTimeout( - arg_walletPubKeyHash, + transaction, err = contract.SetSpvMaintainerStatus( + arg_spvMaintainer, + arg_isTrusted, ) if err != nil { return err @@ -1748,8 +2501,9 @@ func bResetMovingFundsTimeout(c *cobra.Command, args []string) error { cmd.PrintOutput(transaction.Hash()) } else { // Do a call. - err = contract.CallResetMovingFundsTimeout( - arg_walletPubKeyHash, + err = contract.CallSetSpvMaintainerStatus( + arg_spvMaintainer, + arg_isTrusted, cmd.BlockFlagValue.Int, ) if err != nil { @@ -1767,12 +2521,12 @@ func bResetMovingFundsTimeout(c *cobra.Command, args []string) error { return nil } -func bRevealDepositCommand() *cobra.Command { +func bSetVaultStatusCommand() *cobra.Command { c := &cobra.Command{ - Use: "reveal-deposit [arg_fundingTx_json] [arg_reveal_json]", - Short: "Calls the nonpayable method revealDeposit on the Bridge contract.", + Use: "set-vault-status [arg_vault] [arg_isTrusted]", + Short: "Calls the nonpayable method setVaultStatus on the Bridge contract.", Args: cmd.ArgCountChecker(2), - RunE: bRevealDeposit, + RunE: bSetVaultStatus, SilenceUsage: true, DisableFlagsInUseLine: true, } @@ -1783,20 +2537,25 @@ func bRevealDepositCommand() *cobra.Command { return c } -func bRevealDeposit(c *cobra.Command, args []string) error { +func bSetVaultStatus(c *cobra.Command, args []string) error { contract, err := initializeBridge(c) if err != nil { return err } - arg_fundingTx_json := abi.BitcoinTxInfo{} - if err := json.Unmarshal([]byte(args[0]), &arg_fundingTx_json); err != nil { - return fmt.Errorf("failed to unmarshal arg_fundingTx_json to abi.BitcoinTxInfo: %w", err) + arg_vault, err := chainutil.AddressFromHex(args[0]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_vault, a address, from passed value %v", + args[0], + ) } - - arg_reveal_json := abi.DepositDepositRevealInfo{} - if err := json.Unmarshal([]byte(args[1]), &arg_reveal_json); err != nil { - return fmt.Errorf("failed to unmarshal arg_reveal_json to abi.DepositDepositRevealInfo: %w", err) + arg_isTrusted, err := strconv.ParseBool(args[1]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_isTrusted, a bool, from passed value %v", + args[1], + ) } var ( @@ -1805,9 +2564,9 @@ func bRevealDeposit(c *cobra.Command, args []string) error { if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { // Do a regular submission. Take payable into account. - transaction, err = contract.RevealDeposit( - arg_fundingTx_json, - arg_reveal_json, + transaction, err = contract.SetVaultStatus( + arg_vault, + arg_isTrusted, ) if err != nil { return err @@ -1816,9 +2575,9 @@ func bRevealDeposit(c *cobra.Command, args []string) error { cmd.PrintOutput(transaction.Hash()) } else { // Do a call. - err = contract.CallRevealDeposit( - arg_fundingTx_json, - arg_reveal_json, + err = contract.CallSetVaultStatus( + arg_vault, + arg_isTrusted, cmd.BlockFlagValue.Int, ) if err != nil { @@ -1836,12 +2595,12 @@ func bRevealDeposit(c *cobra.Command, args []string) error { return nil } -func bSetSpvMaintainerStatusCommand() *cobra.Command { +func bSetWalletCommand() *cobra.Command { c := &cobra.Command{ - Use: "set-spv-maintainer-status [arg_spvMaintainer] [arg_isTrusted]", - Short: "Calls the nonpayable method setSpvMaintainerStatus on the Bridge contract.", + Use: "set-wallet [arg_walletPubKeyHash] [arg_wallet_json]", + Short: "Calls the nonpayable method setWallet on the Bridge contract.", Args: cmd.ArgCountChecker(2), - RunE: bSetSpvMaintainerStatus, + RunE: bSetWallet, SilenceUsage: true, DisableFlagsInUseLine: true, } @@ -1852,25 +2611,23 @@ func bSetSpvMaintainerStatusCommand() *cobra.Command { return c } -func bSetSpvMaintainerStatus(c *cobra.Command, args []string) error { +func bSetWallet(c *cobra.Command, args []string) error { contract, err := initializeBridge(c) if err != nil { return err } - arg_spvMaintainer, err := chainutil.AddressFromHex(args[0]) + arg_walletPubKeyHash, err := decode.ParseBytes20(args[0]) if err != nil { return fmt.Errorf( - "couldn't parse parameter arg_spvMaintainer, a address, from passed value %v", + "couldn't parse parameter arg_walletPubKeyHash, a bytes20, from passed value %v", args[0], ) } - arg_isTrusted, err := strconv.ParseBool(args[1]) - if err != nil { - return fmt.Errorf( - "couldn't parse parameter arg_isTrusted, a bool, from passed value %v", - args[1], - ) + + arg_wallet_json := abi.WalletsWallet{} + if err := json.Unmarshal([]byte(args[1]), &arg_wallet_json); err != nil { + return fmt.Errorf("failed to unmarshal arg_wallet_json to abi.WalletsWallet: %w", err) } var ( @@ -1879,9 +2636,9 @@ func bSetSpvMaintainerStatus(c *cobra.Command, args []string) error { if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { // Do a regular submission. Take payable into account. - transaction, err = contract.SetSpvMaintainerStatus( - arg_spvMaintainer, - arg_isTrusted, + transaction, err = contract.SetWallet( + arg_walletPubKeyHash, + arg_wallet_json, ) if err != nil { return err @@ -1890,9 +2647,9 @@ func bSetSpvMaintainerStatus(c *cobra.Command, args []string) error { cmd.PrintOutput(transaction.Hash()) } else { // Do a call. - err = contract.CallSetSpvMaintainerStatus( - arg_spvMaintainer, - arg_isTrusted, + err = contract.CallSetWallet( + arg_walletPubKeyHash, + arg_wallet_json, cmd.BlockFlagValue.Int, ) if err != nil { @@ -1910,12 +2667,12 @@ func bSetSpvMaintainerStatus(c *cobra.Command, args []string) error { return nil } -func bSetVaultStatusCommand() *cobra.Command { +func bSetWalletMainUtxoCommand() *cobra.Command { c := &cobra.Command{ - Use: "set-vault-status [arg_vault] [arg_isTrusted]", - Short: "Calls the nonpayable method setVaultStatus on the Bridge contract.", + Use: "set-wallet-main-utxo [arg_walletPubKeyHash] [arg_utxo_json]", + Short: "Calls the nonpayable method setWalletMainUtxo on the Bridge contract.", Args: cmd.ArgCountChecker(2), - RunE: bSetVaultStatus, + RunE: bSetWalletMainUtxo, SilenceUsage: true, DisableFlagsInUseLine: true, } @@ -1926,25 +2683,23 @@ func bSetVaultStatusCommand() *cobra.Command { return c } -func bSetVaultStatus(c *cobra.Command, args []string) error { +func bSetWalletMainUtxo(c *cobra.Command, args []string) error { contract, err := initializeBridge(c) if err != nil { return err } - arg_vault, err := chainutil.AddressFromHex(args[0]) + arg_walletPubKeyHash, err := decode.ParseBytes20(args[0]) if err != nil { return fmt.Errorf( - "couldn't parse parameter arg_vault, a address, from passed value %v", + "couldn't parse parameter arg_walletPubKeyHash, a bytes20, from passed value %v", args[0], ) } - arg_isTrusted, err := strconv.ParseBool(args[1]) - if err != nil { - return fmt.Errorf( - "couldn't parse parameter arg_isTrusted, a bool, from passed value %v", - args[1], - ) + + arg_utxo_json := abi.BitcoinTxUTXO{} + if err := json.Unmarshal([]byte(args[1]), &arg_utxo_json); err != nil { + return fmt.Errorf("failed to unmarshal arg_utxo_json to abi.BitcoinTxUTXO: %w", err) } var ( @@ -1953,9 +2708,9 @@ func bSetVaultStatus(c *cobra.Command, args []string) error { if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { // Do a regular submission. Take payable into account. - transaction, err = contract.SetVaultStatus( - arg_vault, - arg_isTrusted, + transaction, err = contract.SetWalletMainUtxo( + arg_walletPubKeyHash, + arg_utxo_json, ) if err != nil { return err @@ -1964,9 +2719,9 @@ func bSetVaultStatus(c *cobra.Command, args []string) error { cmd.PrintOutput(transaction.Hash()) } else { // Do a call. - err = contract.CallSetVaultStatus( - arg_vault, - arg_isTrusted, + err = contract.CallSetWalletMainUtxo( + arg_walletPubKeyHash, + arg_utxo_json, cmd.BlockFlagValue.Int, ) if err != nil { @@ -2396,6 +3151,78 @@ func bSubmitRedemptionProof(c *cobra.Command, args []string) error { return nil } +func bTimeoutPendingMovedFundsSweepRequestCommand() *cobra.Command { + c := &cobra.Command{ + Use: "timeout-pending-moved-funds-sweep-request [arg_walletPubKeyHash] [arg_utxo_json]", + Short: "Calls the nonpayable method timeoutPendingMovedFundsSweepRequest on the Bridge contract.", + Args: cmd.ArgCountChecker(2), + RunE: bTimeoutPendingMovedFundsSweepRequest, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func bTimeoutPendingMovedFundsSweepRequest(c *cobra.Command, args []string) error { + contract, err := initializeBridge(c) + if err != nil { + return err + } + + arg_walletPubKeyHash, err := decode.ParseBytes20(args[0]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_walletPubKeyHash, a bytes20, from passed value %v", + args[0], + ) + } + + arg_utxo_json := abi.BitcoinTxUTXO{} + if err := json.Unmarshal([]byte(args[1]), &arg_utxo_json); err != nil { + return fmt.Errorf("failed to unmarshal arg_utxo_json to abi.BitcoinTxUTXO: %w", err) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.TimeoutPendingMovedFundsSweepRequest( + arg_walletPubKeyHash, + arg_utxo_json, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallTimeoutPendingMovedFundsSweepRequest( + arg_walletPubKeyHash, + arg_utxo_json, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + func bTransferGovernanceCommand() *cobra.Command { c := &cobra.Command{ Use: "transfer-governance [arg_newGovernance]", diff --git a/pkg/chain/ethereum/tbtc/gen/cmd/MaintainerProxy.go b/pkg/chain/ethereum/tbtc/gen/cmd/MaintainerProxy.go new file mode 100644 index 0000000000..afa3102320 --- /dev/null +++ b/pkg/chain/ethereum/tbtc/gen/cmd/MaintainerProxy.go @@ -0,0 +1,2367 @@ +// Code generated - DO NOT EDIT. +// This file is a generated command and any manual changes will be lost. + +package cmd + +import ( + "context" + "encoding/json" + "fmt" + "strconv" + "sync" + + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/ethclient" + + chainutil "github.com/keep-network/keep-common/pkg/chain/ethereum/ethutil" + "github.com/keep-network/keep-common/pkg/cmd" + "github.com/keep-network/keep-common/pkg/utils/decode" + "github.com/keep-network/keep-core/pkg/chain/ethereum/tbtc/gen/abi" + "github.com/keep-network/keep-core/pkg/chain/ethereum/tbtc/gen/contract" + + "github.com/spf13/cobra" +) + +var MaintainerProxyCommand *cobra.Command + +var maintainerProxyDescription = `The maintainer-proxy command allows calling the MaintainerProxy contract on an + Ethereum network. It has subcommands corresponding to each contract method, + which respectively each take parameters based on the contract method's + parameters. + + Subcommands will submit a non-mutating call to the network and output the + result. + + All subcommands can be called against a specific block by passing the + -b/--block flag. + + Subcommands for mutating methods may be submitted as a mutating transaction + by passing the -s/--submit flag. In this mode, this command will terminate + successfully once the transaction has been submitted, but will not wait for + the transaction to be included in a block. They return the transaction hash. + + Calls that require ether to be paid will get 0 ether by default, which can + be changed by passing the -v/--value flag.` + +func init() { + MaintainerProxyCommand := &cobra.Command{ + Use: "maintainer-proxy", + Short: `Provides access to the MaintainerProxy contract.`, + Long: maintainerProxyDescription, + } + + MaintainerProxyCommand.AddCommand( + mpAllSpvMaintainersCommand(), + mpAllWalletMaintainersCommand(), + mpBridgeCommand(), + mpDefeatFraudChallengeGasOffsetCommand(), + mpDefeatFraudChallengeWithHeartbeatGasOffsetCommand(), + mpIsSpvMaintainerCommand(), + mpIsWalletMaintainerCommand(), + mpNotifyMovingFundsBelowDustGasOffsetCommand(), + mpNotifyWalletCloseableGasOffsetCommand(), + mpNotifyWalletClosingPeriodElapsedGasOffsetCommand(), + mpOwnerCommand(), + mpReimbursementPoolCommand(), + mpRequestNewWalletGasOffsetCommand(), + mpResetMovingFundsTimeoutGasOffsetCommand(), + mpSpvMaintainersCommand(), + mpSubmitDepositSweepProofGasOffsetCommand(), + mpSubmitMovedFundsSweepProofGasOffsetCommand(), + mpSubmitMovingFundsProofGasOffsetCommand(), + mpSubmitRedemptionProofGasOffsetCommand(), + mpWalletMaintainersCommand(), + mpAuthorizeSpvMaintainerCommand(), + mpAuthorizeWalletMaintainerCommand(), + mpDefeatFraudChallengeCommand(), + mpDefeatFraudChallengeWithHeartbeatCommand(), + mpNotifyMovingFundsBelowDustCommand(), + mpNotifyWalletCloseableCommand(), + mpNotifyWalletClosingPeriodElapsedCommand(), + mpRenounceOwnershipCommand(), + mpRequestNewWalletCommand(), + mpResetMovingFundsTimeoutCommand(), + mpSubmitDepositSweepProofCommand(), + mpSubmitMovedFundsSweepProofCommand(), + mpSubmitMovingFundsProofCommand(), + mpSubmitRedemptionProofCommand(), + mpTransferOwnershipCommand(), + mpUnauthorizeSpvMaintainerCommand(), + mpUnauthorizeWalletMaintainerCommand(), + mpUpdateBridgeCommand(), + mpUpdateGasOffsetParametersCommand(), + mpUpdateReimbursementPoolCommand(), + ) + + ModuleCommand.AddCommand(MaintainerProxyCommand) +} + +/// ------------------- Const methods ------------------- + +func mpAllSpvMaintainersCommand() *cobra.Command { + c := &cobra.Command{ + Use: "all-spv-maintainers", + Short: "Calls the view method allSpvMaintainers on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(0), + RunE: mpAllSpvMaintainers, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + cmd.InitConstFlags(c) + + return c +} + +func mpAllSpvMaintainers(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + result, err := contract.AllSpvMaintainersAtBlock( + cmd.BlockFlagValue.Int, + ) + + if err != nil { + return err + } + + cmd.PrintOutput(result) + + return nil +} + +func mpAllWalletMaintainersCommand() *cobra.Command { + c := &cobra.Command{ + Use: "all-wallet-maintainers", + Short: "Calls the view method allWalletMaintainers on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(0), + RunE: mpAllWalletMaintainers, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + cmd.InitConstFlags(c) + + return c +} + +func mpAllWalletMaintainers(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + result, err := contract.AllWalletMaintainersAtBlock( + cmd.BlockFlagValue.Int, + ) + + if err != nil { + return err + } + + cmd.PrintOutput(result) + + return nil +} + +func mpBridgeCommand() *cobra.Command { + c := &cobra.Command{ + Use: "bridge", + Short: "Calls the view method bridge on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(0), + RunE: mpBridge, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + cmd.InitConstFlags(c) + + return c +} + +func mpBridge(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + result, err := contract.BridgeAtBlock( + cmd.BlockFlagValue.Int, + ) + + if err != nil { + return err + } + + cmd.PrintOutput(result) + + return nil +} + +func mpDefeatFraudChallengeGasOffsetCommand() *cobra.Command { + c := &cobra.Command{ + Use: "defeat-fraud-challenge-gas-offset", + Short: "Calls the view method defeatFraudChallengeGasOffset on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(0), + RunE: mpDefeatFraudChallengeGasOffset, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + cmd.InitConstFlags(c) + + return c +} + +func mpDefeatFraudChallengeGasOffset(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + result, err := contract.DefeatFraudChallengeGasOffsetAtBlock( + cmd.BlockFlagValue.Int, + ) + + if err != nil { + return err + } + + cmd.PrintOutput(result) + + return nil +} + +func mpDefeatFraudChallengeWithHeartbeatGasOffsetCommand() *cobra.Command { + c := &cobra.Command{ + Use: "defeat-fraud-challenge-with-heartbeat-gas-offset", + Short: "Calls the view method defeatFraudChallengeWithHeartbeatGasOffset on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(0), + RunE: mpDefeatFraudChallengeWithHeartbeatGasOffset, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + cmd.InitConstFlags(c) + + return c +} + +func mpDefeatFraudChallengeWithHeartbeatGasOffset(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + result, err := contract.DefeatFraudChallengeWithHeartbeatGasOffsetAtBlock( + cmd.BlockFlagValue.Int, + ) + + if err != nil { + return err + } + + cmd.PrintOutput(result) + + return nil +} + +func mpIsSpvMaintainerCommand() *cobra.Command { + c := &cobra.Command{ + Use: "is-spv-maintainer [arg0]", + Short: "Calls the view method isSpvMaintainer on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(1), + RunE: mpIsSpvMaintainer, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + cmd.InitConstFlags(c) + + return c +} + +func mpIsSpvMaintainer(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + arg0, err := chainutil.AddressFromHex(args[0]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg0, a address, from passed value %v", + args[0], + ) + } + + result, err := contract.IsSpvMaintainerAtBlock( + arg0, + cmd.BlockFlagValue.Int, + ) + + if err != nil { + return err + } + + cmd.PrintOutput(result) + + return nil +} + +func mpIsWalletMaintainerCommand() *cobra.Command { + c := &cobra.Command{ + Use: "is-wallet-maintainer [arg0]", + Short: "Calls the view method isWalletMaintainer on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(1), + RunE: mpIsWalletMaintainer, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + cmd.InitConstFlags(c) + + return c +} + +func mpIsWalletMaintainer(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + arg0, err := chainutil.AddressFromHex(args[0]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg0, a address, from passed value %v", + args[0], + ) + } + + result, err := contract.IsWalletMaintainerAtBlock( + arg0, + cmd.BlockFlagValue.Int, + ) + + if err != nil { + return err + } + + cmd.PrintOutput(result) + + return nil +} + +func mpNotifyMovingFundsBelowDustGasOffsetCommand() *cobra.Command { + c := &cobra.Command{ + Use: "notify-moving-funds-below-dust-gas-offset", + Short: "Calls the view method notifyMovingFundsBelowDustGasOffset on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(0), + RunE: mpNotifyMovingFundsBelowDustGasOffset, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + cmd.InitConstFlags(c) + + return c +} + +func mpNotifyMovingFundsBelowDustGasOffset(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + result, err := contract.NotifyMovingFundsBelowDustGasOffsetAtBlock( + cmd.BlockFlagValue.Int, + ) + + if err != nil { + return err + } + + cmd.PrintOutput(result) + + return nil +} + +func mpNotifyWalletCloseableGasOffsetCommand() *cobra.Command { + c := &cobra.Command{ + Use: "notify-wallet-closeable-gas-offset", + Short: "Calls the view method notifyWalletCloseableGasOffset on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(0), + RunE: mpNotifyWalletCloseableGasOffset, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + cmd.InitConstFlags(c) + + return c +} + +func mpNotifyWalletCloseableGasOffset(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + result, err := contract.NotifyWalletCloseableGasOffsetAtBlock( + cmd.BlockFlagValue.Int, + ) + + if err != nil { + return err + } + + cmd.PrintOutput(result) + + return nil +} + +func mpNotifyWalletClosingPeriodElapsedGasOffsetCommand() *cobra.Command { + c := &cobra.Command{ + Use: "notify-wallet-closing-period-elapsed-gas-offset", + Short: "Calls the view method notifyWalletClosingPeriodElapsedGasOffset on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(0), + RunE: mpNotifyWalletClosingPeriodElapsedGasOffset, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + cmd.InitConstFlags(c) + + return c +} + +func mpNotifyWalletClosingPeriodElapsedGasOffset(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + result, err := contract.NotifyWalletClosingPeriodElapsedGasOffsetAtBlock( + cmd.BlockFlagValue.Int, + ) + + if err != nil { + return err + } + + cmd.PrintOutput(result) + + return nil +} + +func mpOwnerCommand() *cobra.Command { + c := &cobra.Command{ + Use: "owner", + Short: "Calls the view method owner on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(0), + RunE: mpOwner, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + cmd.InitConstFlags(c) + + return c +} + +func mpOwner(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + result, err := contract.OwnerAtBlock( + cmd.BlockFlagValue.Int, + ) + + if err != nil { + return err + } + + cmd.PrintOutput(result) + + return nil +} + +func mpReimbursementPoolCommand() *cobra.Command { + c := &cobra.Command{ + Use: "reimbursement-pool", + Short: "Calls the view method reimbursementPool on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(0), + RunE: mpReimbursementPool, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + cmd.InitConstFlags(c) + + return c +} + +func mpReimbursementPool(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + result, err := contract.ReimbursementPoolAtBlock( + cmd.BlockFlagValue.Int, + ) + + if err != nil { + return err + } + + cmd.PrintOutput(result) + + return nil +} + +func mpRequestNewWalletGasOffsetCommand() *cobra.Command { + c := &cobra.Command{ + Use: "request-new-wallet-gas-offset", + Short: "Calls the view method requestNewWalletGasOffset on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(0), + RunE: mpRequestNewWalletGasOffset, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + cmd.InitConstFlags(c) + + return c +} + +func mpRequestNewWalletGasOffset(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + result, err := contract.RequestNewWalletGasOffsetAtBlock( + cmd.BlockFlagValue.Int, + ) + + if err != nil { + return err + } + + cmd.PrintOutput(result) + + return nil +} + +func mpResetMovingFundsTimeoutGasOffsetCommand() *cobra.Command { + c := &cobra.Command{ + Use: "reset-moving-funds-timeout-gas-offset", + Short: "Calls the view method resetMovingFundsTimeoutGasOffset on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(0), + RunE: mpResetMovingFundsTimeoutGasOffset, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + cmd.InitConstFlags(c) + + return c +} + +func mpResetMovingFundsTimeoutGasOffset(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + result, err := contract.ResetMovingFundsTimeoutGasOffsetAtBlock( + cmd.BlockFlagValue.Int, + ) + + if err != nil { + return err + } + + cmd.PrintOutput(result) + + return nil +} + +func mpSpvMaintainersCommand() *cobra.Command { + c := &cobra.Command{ + Use: "spv-maintainers [arg0]", + Short: "Calls the view method spvMaintainers on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(1), + RunE: mpSpvMaintainers, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + cmd.InitConstFlags(c) + + return c +} + +func mpSpvMaintainers(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + arg0, err := hexutil.DecodeBig(args[0]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg0, a uint256, from passed value %v", + args[0], + ) + } + + result, err := contract.SpvMaintainersAtBlock( + arg0, + cmd.BlockFlagValue.Int, + ) + + if err != nil { + return err + } + + cmd.PrintOutput(result) + + return nil +} + +func mpSubmitDepositSweepProofGasOffsetCommand() *cobra.Command { + c := &cobra.Command{ + Use: "submit-deposit-sweep-proof-gas-offset", + Short: "Calls the view method submitDepositSweepProofGasOffset on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(0), + RunE: mpSubmitDepositSweepProofGasOffset, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + cmd.InitConstFlags(c) + + return c +} + +func mpSubmitDepositSweepProofGasOffset(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + result, err := contract.SubmitDepositSweepProofGasOffsetAtBlock( + cmd.BlockFlagValue.Int, + ) + + if err != nil { + return err + } + + cmd.PrintOutput(result) + + return nil +} + +func mpSubmitMovedFundsSweepProofGasOffsetCommand() *cobra.Command { + c := &cobra.Command{ + Use: "submit-moved-funds-sweep-proof-gas-offset", + Short: "Calls the view method submitMovedFundsSweepProofGasOffset on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(0), + RunE: mpSubmitMovedFundsSweepProofGasOffset, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + cmd.InitConstFlags(c) + + return c +} + +func mpSubmitMovedFundsSweepProofGasOffset(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + result, err := contract.SubmitMovedFundsSweepProofGasOffsetAtBlock( + cmd.BlockFlagValue.Int, + ) + + if err != nil { + return err + } + + cmd.PrintOutput(result) + + return nil +} + +func mpSubmitMovingFundsProofGasOffsetCommand() *cobra.Command { + c := &cobra.Command{ + Use: "submit-moving-funds-proof-gas-offset", + Short: "Calls the view method submitMovingFundsProofGasOffset on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(0), + RunE: mpSubmitMovingFundsProofGasOffset, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + cmd.InitConstFlags(c) + + return c +} + +func mpSubmitMovingFundsProofGasOffset(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + result, err := contract.SubmitMovingFundsProofGasOffsetAtBlock( + cmd.BlockFlagValue.Int, + ) + + if err != nil { + return err + } + + cmd.PrintOutput(result) + + return nil +} + +func mpSubmitRedemptionProofGasOffsetCommand() *cobra.Command { + c := &cobra.Command{ + Use: "submit-redemption-proof-gas-offset", + Short: "Calls the view method submitRedemptionProofGasOffset on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(0), + RunE: mpSubmitRedemptionProofGasOffset, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + cmd.InitConstFlags(c) + + return c +} + +func mpSubmitRedemptionProofGasOffset(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + result, err := contract.SubmitRedemptionProofGasOffsetAtBlock( + cmd.BlockFlagValue.Int, + ) + + if err != nil { + return err + } + + cmd.PrintOutput(result) + + return nil +} + +func mpWalletMaintainersCommand() *cobra.Command { + c := &cobra.Command{ + Use: "wallet-maintainers [arg0]", + Short: "Calls the view method walletMaintainers on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(1), + RunE: mpWalletMaintainers, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + cmd.InitConstFlags(c) + + return c +} + +func mpWalletMaintainers(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + arg0, err := hexutil.DecodeBig(args[0]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg0, a uint256, from passed value %v", + args[0], + ) + } + + result, err := contract.WalletMaintainersAtBlock( + arg0, + cmd.BlockFlagValue.Int, + ) + + if err != nil { + return err + } + + cmd.PrintOutput(result) + + return nil +} + +/// ------------------- Non-const methods ------------------- + +func mpAuthorizeSpvMaintainerCommand() *cobra.Command { + c := &cobra.Command{ + Use: "authorize-spv-maintainer [arg_maintainer]", + Short: "Calls the nonpayable method authorizeSpvMaintainer on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(1), + RunE: mpAuthorizeSpvMaintainer, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func mpAuthorizeSpvMaintainer(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + arg_maintainer, err := chainutil.AddressFromHex(args[0]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_maintainer, a address, from passed value %v", + args[0], + ) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.AuthorizeSpvMaintainer( + arg_maintainer, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallAuthorizeSpvMaintainer( + arg_maintainer, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func mpAuthorizeWalletMaintainerCommand() *cobra.Command { + c := &cobra.Command{ + Use: "authorize-wallet-maintainer [arg_maintainer]", + Short: "Calls the nonpayable method authorizeWalletMaintainer on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(1), + RunE: mpAuthorizeWalletMaintainer, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func mpAuthorizeWalletMaintainer(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + arg_maintainer, err := chainutil.AddressFromHex(args[0]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_maintainer, a address, from passed value %v", + args[0], + ) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.AuthorizeWalletMaintainer( + arg_maintainer, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallAuthorizeWalletMaintainer( + arg_maintainer, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func mpDefeatFraudChallengeCommand() *cobra.Command { + c := &cobra.Command{ + Use: "defeat-fraud-challenge [arg_walletPublicKey] [arg_preimage] [arg_witness]", + Short: "Calls the nonpayable method defeatFraudChallenge on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(3), + RunE: mpDefeatFraudChallenge, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func mpDefeatFraudChallenge(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + arg_walletPublicKey, err := hexutil.Decode(args[0]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_walletPublicKey, a bytes, from passed value %v", + args[0], + ) + } + arg_preimage, err := hexutil.Decode(args[1]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_preimage, a bytes, from passed value %v", + args[1], + ) + } + arg_witness, err := strconv.ParseBool(args[2]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_witness, a bool, from passed value %v", + args[2], + ) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.DefeatFraudChallenge( + arg_walletPublicKey, + arg_preimage, + arg_witness, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallDefeatFraudChallenge( + arg_walletPublicKey, + arg_preimage, + arg_witness, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func mpDefeatFraudChallengeWithHeartbeatCommand() *cobra.Command { + c := &cobra.Command{ + Use: "defeat-fraud-challenge-with-heartbeat [arg_walletPublicKey] [arg_heartbeatMessage]", + Short: "Calls the nonpayable method defeatFraudChallengeWithHeartbeat on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(2), + RunE: mpDefeatFraudChallengeWithHeartbeat, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func mpDefeatFraudChallengeWithHeartbeat(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + arg_walletPublicKey, err := hexutil.Decode(args[0]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_walletPublicKey, a bytes, from passed value %v", + args[0], + ) + } + arg_heartbeatMessage, err := hexutil.Decode(args[1]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_heartbeatMessage, a bytes, from passed value %v", + args[1], + ) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.DefeatFraudChallengeWithHeartbeat( + arg_walletPublicKey, + arg_heartbeatMessage, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallDefeatFraudChallengeWithHeartbeat( + arg_walletPublicKey, + arg_heartbeatMessage, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func mpNotifyMovingFundsBelowDustCommand() *cobra.Command { + c := &cobra.Command{ + Use: "notify-moving-funds-below-dust [arg_walletPubKeyHash] [arg_mainUtxo_json]", + Short: "Calls the nonpayable method notifyMovingFundsBelowDust on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(2), + RunE: mpNotifyMovingFundsBelowDust, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func mpNotifyMovingFundsBelowDust(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + arg_walletPubKeyHash, err := decode.ParseBytes20(args[0]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_walletPubKeyHash, a bytes20, from passed value %v", + args[0], + ) + } + + arg_mainUtxo_json := abi.BitcoinTxUTXO2{} + if err := json.Unmarshal([]byte(args[1]), &arg_mainUtxo_json); err != nil { + return fmt.Errorf("failed to unmarshal arg_mainUtxo_json to abi.BitcoinTxUTXO2: %w", err) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.NotifyMovingFundsBelowDust( + arg_walletPubKeyHash, + arg_mainUtxo_json, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallNotifyMovingFundsBelowDust( + arg_walletPubKeyHash, + arg_mainUtxo_json, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func mpNotifyWalletCloseableCommand() *cobra.Command { + c := &cobra.Command{ + Use: "notify-wallet-closeable [arg_walletPubKeyHash] [arg_walletMainUtxo_json]", + Short: "Calls the nonpayable method notifyWalletCloseable on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(2), + RunE: mpNotifyWalletCloseable, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func mpNotifyWalletCloseable(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + arg_walletPubKeyHash, err := decode.ParseBytes20(args[0]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_walletPubKeyHash, a bytes20, from passed value %v", + args[0], + ) + } + + arg_walletMainUtxo_json := abi.BitcoinTxUTXO2{} + if err := json.Unmarshal([]byte(args[1]), &arg_walletMainUtxo_json); err != nil { + return fmt.Errorf("failed to unmarshal arg_walletMainUtxo_json to abi.BitcoinTxUTXO2: %w", err) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.NotifyWalletCloseable( + arg_walletPubKeyHash, + arg_walletMainUtxo_json, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallNotifyWalletCloseable( + arg_walletPubKeyHash, + arg_walletMainUtxo_json, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func mpNotifyWalletClosingPeriodElapsedCommand() *cobra.Command { + c := &cobra.Command{ + Use: "notify-wallet-closing-period-elapsed [arg_walletPubKeyHash]", + Short: "Calls the nonpayable method notifyWalletClosingPeriodElapsed on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(1), + RunE: mpNotifyWalletClosingPeriodElapsed, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func mpNotifyWalletClosingPeriodElapsed(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + arg_walletPubKeyHash, err := decode.ParseBytes20(args[0]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_walletPubKeyHash, a bytes20, from passed value %v", + args[0], + ) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.NotifyWalletClosingPeriodElapsed( + arg_walletPubKeyHash, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallNotifyWalletClosingPeriodElapsed( + arg_walletPubKeyHash, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func mpRenounceOwnershipCommand() *cobra.Command { + c := &cobra.Command{ + Use: "renounce-ownership", + Short: "Calls the nonpayable method renounceOwnership on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(0), + RunE: mpRenounceOwnership, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func mpRenounceOwnership(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.RenounceOwnership() + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallRenounceOwnership( + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func mpRequestNewWalletCommand() *cobra.Command { + c := &cobra.Command{ + Use: "request-new-wallet [arg_activeWalletMainUtxo_json]", + Short: "Calls the nonpayable method requestNewWallet on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(1), + RunE: mpRequestNewWallet, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func mpRequestNewWallet(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + arg_activeWalletMainUtxo_json := abi.BitcoinTxUTXO2{} + if err := json.Unmarshal([]byte(args[0]), &arg_activeWalletMainUtxo_json); err != nil { + return fmt.Errorf("failed to unmarshal arg_activeWalletMainUtxo_json to abi.BitcoinTxUTXO2: %w", err) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.RequestNewWallet( + arg_activeWalletMainUtxo_json, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallRequestNewWallet( + arg_activeWalletMainUtxo_json, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func mpResetMovingFundsTimeoutCommand() *cobra.Command { + c := &cobra.Command{ + Use: "reset-moving-funds-timeout [arg_walletPubKeyHash]", + Short: "Calls the nonpayable method resetMovingFundsTimeout on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(1), + RunE: mpResetMovingFundsTimeout, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func mpResetMovingFundsTimeout(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + arg_walletPubKeyHash, err := decode.ParseBytes20(args[0]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_walletPubKeyHash, a bytes20, from passed value %v", + args[0], + ) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.ResetMovingFundsTimeout( + arg_walletPubKeyHash, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallResetMovingFundsTimeout( + arg_walletPubKeyHash, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func mpSubmitDepositSweepProofCommand() *cobra.Command { + c := &cobra.Command{ + Use: "submit-deposit-sweep-proof [arg_sweepTx_json] [arg_sweepProof_json] [arg_mainUtxo_json] [arg_vault]", + Short: "Calls the nonpayable method submitDepositSweepProof on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(4), + RunE: mpSubmitDepositSweepProof, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func mpSubmitDepositSweepProof(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + arg_sweepTx_json := abi.BitcoinTxInfo3{} + if err := json.Unmarshal([]byte(args[0]), &arg_sweepTx_json); err != nil { + return fmt.Errorf("failed to unmarshal arg_sweepTx_json to abi.BitcoinTxInfo3: %w", err) + } + + arg_sweepProof_json := abi.BitcoinTxProof2{} + if err := json.Unmarshal([]byte(args[1]), &arg_sweepProof_json); err != nil { + return fmt.Errorf("failed to unmarshal arg_sweepProof_json to abi.BitcoinTxProof2: %w", err) + } + + arg_mainUtxo_json := abi.BitcoinTxUTXO2{} + if err := json.Unmarshal([]byte(args[2]), &arg_mainUtxo_json); err != nil { + return fmt.Errorf("failed to unmarshal arg_mainUtxo_json to abi.BitcoinTxUTXO2: %w", err) + } + arg_vault, err := chainutil.AddressFromHex(args[3]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_vault, a address, from passed value %v", + args[3], + ) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.SubmitDepositSweepProof( + arg_sweepTx_json, + arg_sweepProof_json, + arg_mainUtxo_json, + arg_vault, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallSubmitDepositSweepProof( + arg_sweepTx_json, + arg_sweepProof_json, + arg_mainUtxo_json, + arg_vault, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func mpSubmitMovedFundsSweepProofCommand() *cobra.Command { + c := &cobra.Command{ + Use: "submit-moved-funds-sweep-proof [arg_sweepTx_json] [arg_sweepProof_json] [arg_mainUtxo_json]", + Short: "Calls the nonpayable method submitMovedFundsSweepProof on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(3), + RunE: mpSubmitMovedFundsSweepProof, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func mpSubmitMovedFundsSweepProof(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + arg_sweepTx_json := abi.BitcoinTxInfo3{} + if err := json.Unmarshal([]byte(args[0]), &arg_sweepTx_json); err != nil { + return fmt.Errorf("failed to unmarshal arg_sweepTx_json to abi.BitcoinTxInfo3: %w", err) + } + + arg_sweepProof_json := abi.BitcoinTxProof2{} + if err := json.Unmarshal([]byte(args[1]), &arg_sweepProof_json); err != nil { + return fmt.Errorf("failed to unmarshal arg_sweepProof_json to abi.BitcoinTxProof2: %w", err) + } + + arg_mainUtxo_json := abi.BitcoinTxUTXO2{} + if err := json.Unmarshal([]byte(args[2]), &arg_mainUtxo_json); err != nil { + return fmt.Errorf("failed to unmarshal arg_mainUtxo_json to abi.BitcoinTxUTXO2: %w", err) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.SubmitMovedFundsSweepProof( + arg_sweepTx_json, + arg_sweepProof_json, + arg_mainUtxo_json, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallSubmitMovedFundsSweepProof( + arg_sweepTx_json, + arg_sweepProof_json, + arg_mainUtxo_json, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func mpSubmitMovingFundsProofCommand() *cobra.Command { + c := &cobra.Command{ + Use: "submit-moving-funds-proof [arg_movingFundsTx_json] [arg_movingFundsProof_json] [arg_mainUtxo_json] [arg_walletPubKeyHash]", + Short: "Calls the nonpayable method submitMovingFundsProof on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(4), + RunE: mpSubmitMovingFundsProof, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func mpSubmitMovingFundsProof(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + arg_movingFundsTx_json := abi.BitcoinTxInfo3{} + if err := json.Unmarshal([]byte(args[0]), &arg_movingFundsTx_json); err != nil { + return fmt.Errorf("failed to unmarshal arg_movingFundsTx_json to abi.BitcoinTxInfo3: %w", err) + } + + arg_movingFundsProof_json := abi.BitcoinTxProof2{} + if err := json.Unmarshal([]byte(args[1]), &arg_movingFundsProof_json); err != nil { + return fmt.Errorf("failed to unmarshal arg_movingFundsProof_json to abi.BitcoinTxProof2: %w", err) + } + + arg_mainUtxo_json := abi.BitcoinTxUTXO2{} + if err := json.Unmarshal([]byte(args[2]), &arg_mainUtxo_json); err != nil { + return fmt.Errorf("failed to unmarshal arg_mainUtxo_json to abi.BitcoinTxUTXO2: %w", err) + } + arg_walletPubKeyHash, err := decode.ParseBytes20(args[3]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_walletPubKeyHash, a bytes20, from passed value %v", + args[3], + ) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.SubmitMovingFundsProof( + arg_movingFundsTx_json, + arg_movingFundsProof_json, + arg_mainUtxo_json, + arg_walletPubKeyHash, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallSubmitMovingFundsProof( + arg_movingFundsTx_json, + arg_movingFundsProof_json, + arg_mainUtxo_json, + arg_walletPubKeyHash, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func mpSubmitRedemptionProofCommand() *cobra.Command { + c := &cobra.Command{ + Use: "submit-redemption-proof [arg_redemptionTx_json] [arg_redemptionProof_json] [arg_mainUtxo_json] [arg_walletPubKeyHash]", + Short: "Calls the nonpayable method submitRedemptionProof on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(4), + RunE: mpSubmitRedemptionProof, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func mpSubmitRedemptionProof(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + arg_redemptionTx_json := abi.BitcoinTxInfo3{} + if err := json.Unmarshal([]byte(args[0]), &arg_redemptionTx_json); err != nil { + return fmt.Errorf("failed to unmarshal arg_redemptionTx_json to abi.BitcoinTxInfo3: %w", err) + } + + arg_redemptionProof_json := abi.BitcoinTxProof2{} + if err := json.Unmarshal([]byte(args[1]), &arg_redemptionProof_json); err != nil { + return fmt.Errorf("failed to unmarshal arg_redemptionProof_json to abi.BitcoinTxProof2: %w", err) + } + + arg_mainUtxo_json := abi.BitcoinTxUTXO2{} + if err := json.Unmarshal([]byte(args[2]), &arg_mainUtxo_json); err != nil { + return fmt.Errorf("failed to unmarshal arg_mainUtxo_json to abi.BitcoinTxUTXO2: %w", err) + } + arg_walletPubKeyHash, err := decode.ParseBytes20(args[3]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_walletPubKeyHash, a bytes20, from passed value %v", + args[3], + ) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.SubmitRedemptionProof( + arg_redemptionTx_json, + arg_redemptionProof_json, + arg_mainUtxo_json, + arg_walletPubKeyHash, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallSubmitRedemptionProof( + arg_redemptionTx_json, + arg_redemptionProof_json, + arg_mainUtxo_json, + arg_walletPubKeyHash, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func mpTransferOwnershipCommand() *cobra.Command { + c := &cobra.Command{ + Use: "transfer-ownership [arg_newOwner]", + Short: "Calls the nonpayable method transferOwnership on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(1), + RunE: mpTransferOwnership, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func mpTransferOwnership(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + arg_newOwner, err := chainutil.AddressFromHex(args[0]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_newOwner, a address, from passed value %v", + args[0], + ) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.TransferOwnership( + arg_newOwner, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallTransferOwnership( + arg_newOwner, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func mpUnauthorizeSpvMaintainerCommand() *cobra.Command { + c := &cobra.Command{ + Use: "unauthorize-spv-maintainer [arg_maintainerToUnauthorize]", + Short: "Calls the nonpayable method unauthorizeSpvMaintainer on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(1), + RunE: mpUnauthorizeSpvMaintainer, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func mpUnauthorizeSpvMaintainer(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + arg_maintainerToUnauthorize, err := chainutil.AddressFromHex(args[0]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_maintainerToUnauthorize, a address, from passed value %v", + args[0], + ) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.UnauthorizeSpvMaintainer( + arg_maintainerToUnauthorize, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallUnauthorizeSpvMaintainer( + arg_maintainerToUnauthorize, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func mpUnauthorizeWalletMaintainerCommand() *cobra.Command { + c := &cobra.Command{ + Use: "unauthorize-wallet-maintainer [arg_maintainerToUnauthorize]", + Short: "Calls the nonpayable method unauthorizeWalletMaintainer on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(1), + RunE: mpUnauthorizeWalletMaintainer, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func mpUnauthorizeWalletMaintainer(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + arg_maintainerToUnauthorize, err := chainutil.AddressFromHex(args[0]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_maintainerToUnauthorize, a address, from passed value %v", + args[0], + ) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.UnauthorizeWalletMaintainer( + arg_maintainerToUnauthorize, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallUnauthorizeWalletMaintainer( + arg_maintainerToUnauthorize, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func mpUpdateBridgeCommand() *cobra.Command { + c := &cobra.Command{ + Use: "update-bridge [arg__bridge]", + Short: "Calls the nonpayable method updateBridge on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(1), + RunE: mpUpdateBridge, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func mpUpdateBridge(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + arg__bridge, err := chainutil.AddressFromHex(args[0]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg__bridge, a address, from passed value %v", + args[0], + ) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.UpdateBridge( + arg__bridge, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallUpdateBridge( + arg__bridge, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func mpUpdateGasOffsetParametersCommand() *cobra.Command { + c := &cobra.Command{ + Use: "update-gas-offset-parameters [arg_newSubmitDepositSweepProofGasOffset] [arg_newSubmitRedemptionProofGasOffset] [arg_newResetMovingFundsTimeoutGasOffset] [arg_newSubmitMovingFundsProofGasOffset] [arg_newNotifyMovingFundsBelowDustGasOffset] [arg_newSubmitMovedFundsSweepProofGasOffset] [arg_newRequestNewWalletGasOffset] [arg_newNotifyWalletCloseableGasOffset] [arg_newNotifyWalletClosingPeriodElapsedGasOffset] [arg_newDefeatFraudChallengeGasOffset] [arg_newDefeatFraudChallengeWithHeartbeatGasOffset]", + Short: "Calls the nonpayable method updateGasOffsetParameters on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(11), + RunE: mpUpdateGasOffsetParameters, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func mpUpdateGasOffsetParameters(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + arg_newSubmitDepositSweepProofGasOffset, err := hexutil.DecodeBig(args[0]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_newSubmitDepositSweepProofGasOffset, a uint256, from passed value %v", + args[0], + ) + } + arg_newSubmitRedemptionProofGasOffset, err := hexutil.DecodeBig(args[1]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_newSubmitRedemptionProofGasOffset, a uint256, from passed value %v", + args[1], + ) + } + arg_newResetMovingFundsTimeoutGasOffset, err := hexutil.DecodeBig(args[2]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_newResetMovingFundsTimeoutGasOffset, a uint256, from passed value %v", + args[2], + ) + } + arg_newSubmitMovingFundsProofGasOffset, err := hexutil.DecodeBig(args[3]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_newSubmitMovingFundsProofGasOffset, a uint256, from passed value %v", + args[3], + ) + } + arg_newNotifyMovingFundsBelowDustGasOffset, err := hexutil.DecodeBig(args[4]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_newNotifyMovingFundsBelowDustGasOffset, a uint256, from passed value %v", + args[4], + ) + } + arg_newSubmitMovedFundsSweepProofGasOffset, err := hexutil.DecodeBig(args[5]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_newSubmitMovedFundsSweepProofGasOffset, a uint256, from passed value %v", + args[5], + ) + } + arg_newRequestNewWalletGasOffset, err := hexutil.DecodeBig(args[6]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_newRequestNewWalletGasOffset, a uint256, from passed value %v", + args[6], + ) + } + arg_newNotifyWalletCloseableGasOffset, err := hexutil.DecodeBig(args[7]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_newNotifyWalletCloseableGasOffset, a uint256, from passed value %v", + args[7], + ) + } + arg_newNotifyWalletClosingPeriodElapsedGasOffset, err := hexutil.DecodeBig(args[8]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_newNotifyWalletClosingPeriodElapsedGasOffset, a uint256, from passed value %v", + args[8], + ) + } + arg_newDefeatFraudChallengeGasOffset, err := hexutil.DecodeBig(args[9]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_newDefeatFraudChallengeGasOffset, a uint256, from passed value %v", + args[9], + ) + } + arg_newDefeatFraudChallengeWithHeartbeatGasOffset, err := hexutil.DecodeBig(args[10]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg_newDefeatFraudChallengeWithHeartbeatGasOffset, a uint256, from passed value %v", + args[10], + ) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.UpdateGasOffsetParameters( + arg_newSubmitDepositSweepProofGasOffset, + arg_newSubmitRedemptionProofGasOffset, + arg_newResetMovingFundsTimeoutGasOffset, + arg_newSubmitMovingFundsProofGasOffset, + arg_newNotifyMovingFundsBelowDustGasOffset, + arg_newSubmitMovedFundsSweepProofGasOffset, + arg_newRequestNewWalletGasOffset, + arg_newNotifyWalletCloseableGasOffset, + arg_newNotifyWalletClosingPeriodElapsedGasOffset, + arg_newDefeatFraudChallengeGasOffset, + arg_newDefeatFraudChallengeWithHeartbeatGasOffset, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallUpdateGasOffsetParameters( + arg_newSubmitDepositSweepProofGasOffset, + arg_newSubmitRedemptionProofGasOffset, + arg_newResetMovingFundsTimeoutGasOffset, + arg_newSubmitMovingFundsProofGasOffset, + arg_newNotifyMovingFundsBelowDustGasOffset, + arg_newSubmitMovedFundsSweepProofGasOffset, + arg_newRequestNewWalletGasOffset, + arg_newNotifyWalletCloseableGasOffset, + arg_newNotifyWalletClosingPeriodElapsedGasOffset, + arg_newDefeatFraudChallengeGasOffset, + arg_newDefeatFraudChallengeWithHeartbeatGasOffset, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +func mpUpdateReimbursementPoolCommand() *cobra.Command { + c := &cobra.Command{ + Use: "update-reimbursement-pool [arg__reimbursementPool]", + Short: "Calls the nonpayable method updateReimbursementPool on the MaintainerProxy contract.", + Args: cmd.ArgCountChecker(1), + RunE: mpUpdateReimbursementPool, + SilenceUsage: true, + DisableFlagsInUseLine: true, + } + + c.PreRunE = cmd.NonConstArgsChecker + cmd.InitNonConstFlags(c) + + return c +} + +func mpUpdateReimbursementPool(c *cobra.Command, args []string) error { + contract, err := initializeMaintainerProxy(c) + if err != nil { + return err + } + + arg__reimbursementPool, err := chainutil.AddressFromHex(args[0]) + if err != nil { + return fmt.Errorf( + "couldn't parse parameter arg__reimbursementPool, a address, from passed value %v", + args[0], + ) + } + + var ( + transaction *types.Transaction + ) + + if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { + // Do a regular submission. Take payable into account. + transaction, err = contract.UpdateReimbursementPool( + arg__reimbursementPool, + ) + if err != nil { + return err + } + + cmd.PrintOutput(transaction.Hash()) + } else { + // Do a call. + err = contract.CallUpdateReimbursementPool( + arg__reimbursementPool, + cmd.BlockFlagValue.Int, + ) + if err != nil { + return err + } + + cmd.PrintOutput("success") + + cmd.PrintOutput( + "the transaction was not submitted to the chain; " + + "please add the `--submit` flag", + ) + } + + return nil +} + +/// ------------------- Initialization ------------------- + +func initializeMaintainerProxy(c *cobra.Command) (*contract.MaintainerProxy, error) { + cfg := *ModuleCommand.GetConfig() + + client, err := ethclient.Dial(cfg.URL) + if err != nil { + return nil, fmt.Errorf("error connecting to host chain node: [%v]", err) + } + + chainID, err := client.ChainID(context.Background()) + if err != nil { + return nil, fmt.Errorf( + "failed to resolve host chain id: [%v]", + err, + ) + } + + key, err := chainutil.DecryptKeyFile( + cfg.Account.KeyFile, + cfg.Account.KeyFilePassword, + ) + if err != nil { + return nil, fmt.Errorf( + "failed to read KeyFile: %s: [%v]", + cfg.Account.KeyFile, + err, + ) + } + + miningWaiter := chainutil.NewMiningWaiter(client, cfg) + + blockCounter, err := chainutil.NewBlockCounter(client) + if err != nil { + return nil, fmt.Errorf( + "failed to create block counter: [%v]", + err, + ) + } + + address, err := cfg.ContractAddress("MaintainerProxy") + if err != nil { + return nil, fmt.Errorf( + "failed to get %s address: [%w]", + "MaintainerProxy", + err, + ) + } + + return contract.NewMaintainerProxy( + address, + chainID, + key, + client, + chainutil.NewNonceManager(client, key.Address), + miningWaiter, + blockCounter, + &sync.Mutex{}, + ) +} diff --git a/pkg/chain/ethereum/tbtc/gen/contract/Bridge.go b/pkg/chain/ethereum/tbtc/gen/contract/Bridge.go index 8b4698623e..5311f1efe8 100644 --- a/pkg/chain/ethereum/tbtc/gen/contract/Bridge.go +++ b/pkg/chain/ethereum/tbtc/gen/contract/Bridge.go @@ -1970,6 +1970,154 @@ func (b *Bridge) NotifyWalletClosingPeriodElapsedGasEstimate( return result, err } +// Transaction submission. +func (b *Bridge) ProcessPendingMovedFundsSweepRequest( + arg_walletPubKeyHash [20]byte, + arg_utxo abi.BitcoinTxUTXO, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + bLogger.Debug( + "submitting transaction processPendingMovedFundsSweepRequest", + " params: ", + fmt.Sprint( + arg_walletPubKeyHash, + arg_utxo, + ), + ) + + b.transactionMutex.Lock() + defer b.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *b.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := b.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := b.contract.ProcessPendingMovedFundsSweepRequest( + transactorOptions, + arg_walletPubKeyHash, + arg_utxo, + ) + if err != nil { + return transaction, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "processPendingMovedFundsSweepRequest", + arg_walletPubKeyHash, + arg_utxo, + ) + } + + bLogger.Infof( + "submitted transaction processPendingMovedFundsSweepRequest with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go b.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := b.contract.ProcessPendingMovedFundsSweepRequest( + newTransactorOptions, + arg_walletPubKeyHash, + arg_utxo, + ) + if err != nil { + return nil, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "processPendingMovedFundsSweepRequest", + arg_walletPubKeyHash, + arg_utxo, + ) + } + + bLogger.Infof( + "submitted transaction processPendingMovedFundsSweepRequest with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + b.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (b *Bridge) CallProcessPendingMovedFundsSweepRequest( + arg_walletPubKeyHash [20]byte, + arg_utxo abi.BitcoinTxUTXO, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + b.transactorOptions.From, + blockNumber, nil, + b.contractABI, + b.caller, + b.errorResolver, + b.contractAddress, + "processPendingMovedFundsSweepRequest", + &result, + arg_walletPubKeyHash, + arg_utxo, + ) + + return err +} + +func (b *Bridge) ProcessPendingMovedFundsSweepRequestGasEstimate( + arg_walletPubKeyHash [20]byte, + arg_utxo abi.BitcoinTxUTXO, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + b.callerOptions.From, + b.contractAddress, + "processPendingMovedFundsSweepRequest", + b.contractABI, + b.transactor, + arg_walletPubKeyHash, + arg_utxo, + ) + + return result, err +} + // Transaction submission. func (b *Bridge) ReceiveBalanceApproval( arg_balanceOwner common.Address, @@ -2620,14 +2768,1838 @@ func (b *Bridge) RevealDeposit( err, b.transactorOptions.From, nil, - "revealDeposit", - arg_fundingTx, - arg_reveal, + "revealDeposit", + arg_fundingTx, + arg_reveal, + ) + } + + bLogger.Infof( + "submitted transaction revealDeposit with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go b.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := b.contract.RevealDeposit( + newTransactorOptions, + arg_fundingTx, + arg_reveal, + ) + if err != nil { + return nil, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "revealDeposit", + arg_fundingTx, + arg_reveal, + ) + } + + bLogger.Infof( + "submitted transaction revealDeposit with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + b.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (b *Bridge) CallRevealDeposit( + arg_fundingTx abi.BitcoinTxInfo, + arg_reveal abi.DepositDepositRevealInfo, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + b.transactorOptions.From, + blockNumber, nil, + b.contractABI, + b.caller, + b.errorResolver, + b.contractAddress, + "revealDeposit", + &result, + arg_fundingTx, + arg_reveal, + ) + + return err +} + +func (b *Bridge) RevealDepositGasEstimate( + arg_fundingTx abi.BitcoinTxInfo, + arg_reveal abi.DepositDepositRevealInfo, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + b.callerOptions.From, + b.contractAddress, + "revealDeposit", + b.contractABI, + b.transactor, + arg_fundingTx, + arg_reveal, + ) + + return result, err +} + +// Transaction submission. +func (b *Bridge) SetActiveWallet( + arg_activeWalletPubKeyHash [20]byte, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + bLogger.Debug( + "submitting transaction setActiveWallet", + " params: ", + fmt.Sprint( + arg_activeWalletPubKeyHash, + ), + ) + + b.transactionMutex.Lock() + defer b.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *b.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := b.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := b.contract.SetActiveWallet( + transactorOptions, + arg_activeWalletPubKeyHash, + ) + if err != nil { + return transaction, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "setActiveWallet", + arg_activeWalletPubKeyHash, + ) + } + + bLogger.Infof( + "submitted transaction setActiveWallet with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go b.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := b.contract.SetActiveWallet( + newTransactorOptions, + arg_activeWalletPubKeyHash, + ) + if err != nil { + return nil, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "setActiveWallet", + arg_activeWalletPubKeyHash, + ) + } + + bLogger.Infof( + "submitted transaction setActiveWallet with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + b.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (b *Bridge) CallSetActiveWallet( + arg_activeWalletPubKeyHash [20]byte, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + b.transactorOptions.From, + blockNumber, nil, + b.contractABI, + b.caller, + b.errorResolver, + b.contractAddress, + "setActiveWallet", + &result, + arg_activeWalletPubKeyHash, + ) + + return err +} + +func (b *Bridge) SetActiveWalletGasEstimate( + arg_activeWalletPubKeyHash [20]byte, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + b.callerOptions.From, + b.contractAddress, + "setActiveWallet", + b.contractABI, + b.transactor, + arg_activeWalletPubKeyHash, + ) + + return result, err +} + +// Transaction submission. +func (b *Bridge) SetDepositDustThreshold( + arg__depositDustThreshold uint64, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + bLogger.Debug( + "submitting transaction setDepositDustThreshold", + " params: ", + fmt.Sprint( + arg__depositDustThreshold, + ), + ) + + b.transactionMutex.Lock() + defer b.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *b.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := b.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := b.contract.SetDepositDustThreshold( + transactorOptions, + arg__depositDustThreshold, + ) + if err != nil { + return transaction, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "setDepositDustThreshold", + arg__depositDustThreshold, + ) + } + + bLogger.Infof( + "submitted transaction setDepositDustThreshold with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go b.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := b.contract.SetDepositDustThreshold( + newTransactorOptions, + arg__depositDustThreshold, + ) + if err != nil { + return nil, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "setDepositDustThreshold", + arg__depositDustThreshold, + ) + } + + bLogger.Infof( + "submitted transaction setDepositDustThreshold with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + b.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (b *Bridge) CallSetDepositDustThreshold( + arg__depositDustThreshold uint64, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + b.transactorOptions.From, + blockNumber, nil, + b.contractABI, + b.caller, + b.errorResolver, + b.contractAddress, + "setDepositDustThreshold", + &result, + arg__depositDustThreshold, + ) + + return err +} + +func (b *Bridge) SetDepositDustThresholdGasEstimate( + arg__depositDustThreshold uint64, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + b.callerOptions.From, + b.contractAddress, + "setDepositDustThreshold", + b.contractABI, + b.transactor, + arg__depositDustThreshold, + ) + + return result, err +} + +// Transaction submission. +func (b *Bridge) SetDepositRevealAheadPeriod( + arg__depositRevealAheadPeriod uint32, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + bLogger.Debug( + "submitting transaction setDepositRevealAheadPeriod", + " params: ", + fmt.Sprint( + arg__depositRevealAheadPeriod, + ), + ) + + b.transactionMutex.Lock() + defer b.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *b.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := b.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := b.contract.SetDepositRevealAheadPeriod( + transactorOptions, + arg__depositRevealAheadPeriod, + ) + if err != nil { + return transaction, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "setDepositRevealAheadPeriod", + arg__depositRevealAheadPeriod, + ) + } + + bLogger.Infof( + "submitted transaction setDepositRevealAheadPeriod with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go b.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := b.contract.SetDepositRevealAheadPeriod( + newTransactorOptions, + arg__depositRevealAheadPeriod, + ) + if err != nil { + return nil, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "setDepositRevealAheadPeriod", + arg__depositRevealAheadPeriod, + ) + } + + bLogger.Infof( + "submitted transaction setDepositRevealAheadPeriod with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + b.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (b *Bridge) CallSetDepositRevealAheadPeriod( + arg__depositRevealAheadPeriod uint32, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + b.transactorOptions.From, + blockNumber, nil, + b.contractABI, + b.caller, + b.errorResolver, + b.contractAddress, + "setDepositRevealAheadPeriod", + &result, + arg__depositRevealAheadPeriod, + ) + + return err +} + +func (b *Bridge) SetDepositRevealAheadPeriodGasEstimate( + arg__depositRevealAheadPeriod uint32, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + b.callerOptions.From, + b.contractAddress, + "setDepositRevealAheadPeriod", + b.contractABI, + b.transactor, + arg__depositRevealAheadPeriod, + ) + + return result, err +} + +// Transaction submission. +func (b *Bridge) SetDepositTxMaxFee( + arg__depositTxMaxFee uint64, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + bLogger.Debug( + "submitting transaction setDepositTxMaxFee", + " params: ", + fmt.Sprint( + arg__depositTxMaxFee, + ), + ) + + b.transactionMutex.Lock() + defer b.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *b.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := b.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := b.contract.SetDepositTxMaxFee( + transactorOptions, + arg__depositTxMaxFee, + ) + if err != nil { + return transaction, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "setDepositTxMaxFee", + arg__depositTxMaxFee, + ) + } + + bLogger.Infof( + "submitted transaction setDepositTxMaxFee with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go b.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := b.contract.SetDepositTxMaxFee( + newTransactorOptions, + arg__depositTxMaxFee, + ) + if err != nil { + return nil, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "setDepositTxMaxFee", + arg__depositTxMaxFee, + ) + } + + bLogger.Infof( + "submitted transaction setDepositTxMaxFee with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + b.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (b *Bridge) CallSetDepositTxMaxFee( + arg__depositTxMaxFee uint64, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + b.transactorOptions.From, + blockNumber, nil, + b.contractABI, + b.caller, + b.errorResolver, + b.contractAddress, + "setDepositTxMaxFee", + &result, + arg__depositTxMaxFee, + ) + + return err +} + +func (b *Bridge) SetDepositTxMaxFeeGasEstimate( + arg__depositTxMaxFee uint64, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + b.callerOptions.From, + b.contractAddress, + "setDepositTxMaxFee", + b.contractABI, + b.transactor, + arg__depositTxMaxFee, + ) + + return result, err +} + +// Transaction submission. +func (b *Bridge) SetMovedFundsSweepTxMaxTotalFee( + arg__movedFundsSweepTxMaxTotalFee uint64, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + bLogger.Debug( + "submitting transaction setMovedFundsSweepTxMaxTotalFee", + " params: ", + fmt.Sprint( + arg__movedFundsSweepTxMaxTotalFee, + ), + ) + + b.transactionMutex.Lock() + defer b.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *b.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := b.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := b.contract.SetMovedFundsSweepTxMaxTotalFee( + transactorOptions, + arg__movedFundsSweepTxMaxTotalFee, + ) + if err != nil { + return transaction, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "setMovedFundsSweepTxMaxTotalFee", + arg__movedFundsSweepTxMaxTotalFee, + ) + } + + bLogger.Infof( + "submitted transaction setMovedFundsSweepTxMaxTotalFee with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go b.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := b.contract.SetMovedFundsSweepTxMaxTotalFee( + newTransactorOptions, + arg__movedFundsSweepTxMaxTotalFee, + ) + if err != nil { + return nil, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "setMovedFundsSweepTxMaxTotalFee", + arg__movedFundsSweepTxMaxTotalFee, + ) + } + + bLogger.Infof( + "submitted transaction setMovedFundsSweepTxMaxTotalFee with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + b.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (b *Bridge) CallSetMovedFundsSweepTxMaxTotalFee( + arg__movedFundsSweepTxMaxTotalFee uint64, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + b.transactorOptions.From, + blockNumber, nil, + b.contractABI, + b.caller, + b.errorResolver, + b.contractAddress, + "setMovedFundsSweepTxMaxTotalFee", + &result, + arg__movedFundsSweepTxMaxTotalFee, + ) + + return err +} + +func (b *Bridge) SetMovedFundsSweepTxMaxTotalFeeGasEstimate( + arg__movedFundsSweepTxMaxTotalFee uint64, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + b.callerOptions.From, + b.contractAddress, + "setMovedFundsSweepTxMaxTotalFee", + b.contractABI, + b.transactor, + arg__movedFundsSweepTxMaxTotalFee, + ) + + return result, err +} + +// Transaction submission. +func (b *Bridge) SetPendingMovedFundsSweepRequest( + arg_walletPubKeyHash [20]byte, + arg_utxo abi.BitcoinTxUTXO, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + bLogger.Debug( + "submitting transaction setPendingMovedFundsSweepRequest", + " params: ", + fmt.Sprint( + arg_walletPubKeyHash, + arg_utxo, + ), + ) + + b.transactionMutex.Lock() + defer b.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *b.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := b.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := b.contract.SetPendingMovedFundsSweepRequest( + transactorOptions, + arg_walletPubKeyHash, + arg_utxo, + ) + if err != nil { + return transaction, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "setPendingMovedFundsSweepRequest", + arg_walletPubKeyHash, + arg_utxo, + ) + } + + bLogger.Infof( + "submitted transaction setPendingMovedFundsSweepRequest with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go b.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := b.contract.SetPendingMovedFundsSweepRequest( + newTransactorOptions, + arg_walletPubKeyHash, + arg_utxo, + ) + if err != nil { + return nil, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "setPendingMovedFundsSweepRequest", + arg_walletPubKeyHash, + arg_utxo, + ) + } + + bLogger.Infof( + "submitted transaction setPendingMovedFundsSweepRequest with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + b.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (b *Bridge) CallSetPendingMovedFundsSweepRequest( + arg_walletPubKeyHash [20]byte, + arg_utxo abi.BitcoinTxUTXO, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + b.transactorOptions.From, + blockNumber, nil, + b.contractABI, + b.caller, + b.errorResolver, + b.contractAddress, + "setPendingMovedFundsSweepRequest", + &result, + arg_walletPubKeyHash, + arg_utxo, + ) + + return err +} + +func (b *Bridge) SetPendingMovedFundsSweepRequestGasEstimate( + arg_walletPubKeyHash [20]byte, + arg_utxo abi.BitcoinTxUTXO, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + b.callerOptions.From, + b.contractAddress, + "setPendingMovedFundsSweepRequest", + b.contractABI, + b.transactor, + arg_walletPubKeyHash, + arg_utxo, + ) + + return result, err +} + +// Transaction submission. +func (b *Bridge) SetProcessedMovedFundsSweepRequests( + arg_utxos []abi.BitcoinTxUTXO, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + bLogger.Debug( + "submitting transaction setProcessedMovedFundsSweepRequests", + " params: ", + fmt.Sprint( + arg_utxos, + ), + ) + + b.transactionMutex.Lock() + defer b.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *b.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := b.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := b.contract.SetProcessedMovedFundsSweepRequests( + transactorOptions, + arg_utxos, + ) + if err != nil { + return transaction, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "setProcessedMovedFundsSweepRequests", + arg_utxos, + ) + } + + bLogger.Infof( + "submitted transaction setProcessedMovedFundsSweepRequests with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go b.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := b.contract.SetProcessedMovedFundsSweepRequests( + newTransactorOptions, + arg_utxos, + ) + if err != nil { + return nil, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "setProcessedMovedFundsSweepRequests", + arg_utxos, + ) + } + + bLogger.Infof( + "submitted transaction setProcessedMovedFundsSweepRequests with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + b.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (b *Bridge) CallSetProcessedMovedFundsSweepRequests( + arg_utxos []abi.BitcoinTxUTXO, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + b.transactorOptions.From, + blockNumber, nil, + b.contractABI, + b.caller, + b.errorResolver, + b.contractAddress, + "setProcessedMovedFundsSweepRequests", + &result, + arg_utxos, + ) + + return err +} + +func (b *Bridge) SetProcessedMovedFundsSweepRequestsGasEstimate( + arg_utxos []abi.BitcoinTxUTXO, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + b.callerOptions.From, + b.contractAddress, + "setProcessedMovedFundsSweepRequests", + b.contractABI, + b.transactor, + arg_utxos, + ) + + return result, err +} + +// Transaction submission. +func (b *Bridge) SetRedemptionDustThreshold( + arg__redemptionDustThreshold uint64, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + bLogger.Debug( + "submitting transaction setRedemptionDustThreshold", + " params: ", + fmt.Sprint( + arg__redemptionDustThreshold, + ), + ) + + b.transactionMutex.Lock() + defer b.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *b.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := b.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := b.contract.SetRedemptionDustThreshold( + transactorOptions, + arg__redemptionDustThreshold, + ) + if err != nil { + return transaction, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "setRedemptionDustThreshold", + arg__redemptionDustThreshold, + ) + } + + bLogger.Infof( + "submitted transaction setRedemptionDustThreshold with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go b.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := b.contract.SetRedemptionDustThreshold( + newTransactorOptions, + arg__redemptionDustThreshold, + ) + if err != nil { + return nil, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "setRedemptionDustThreshold", + arg__redemptionDustThreshold, + ) + } + + bLogger.Infof( + "submitted transaction setRedemptionDustThreshold with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + b.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (b *Bridge) CallSetRedemptionDustThreshold( + arg__redemptionDustThreshold uint64, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + b.transactorOptions.From, + blockNumber, nil, + b.contractABI, + b.caller, + b.errorResolver, + b.contractAddress, + "setRedemptionDustThreshold", + &result, + arg__redemptionDustThreshold, + ) + + return err +} + +func (b *Bridge) SetRedemptionDustThresholdGasEstimate( + arg__redemptionDustThreshold uint64, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + b.callerOptions.From, + b.contractAddress, + "setRedemptionDustThreshold", + b.contractABI, + b.transactor, + arg__redemptionDustThreshold, + ) + + return result, err +} + +// Transaction submission. +func (b *Bridge) SetRedemptionTreasuryFeeDivisor( + arg__redemptionTreasuryFeeDivisor uint64, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + bLogger.Debug( + "submitting transaction setRedemptionTreasuryFeeDivisor", + " params: ", + fmt.Sprint( + arg__redemptionTreasuryFeeDivisor, + ), + ) + + b.transactionMutex.Lock() + defer b.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *b.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := b.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := b.contract.SetRedemptionTreasuryFeeDivisor( + transactorOptions, + arg__redemptionTreasuryFeeDivisor, + ) + if err != nil { + return transaction, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "setRedemptionTreasuryFeeDivisor", + arg__redemptionTreasuryFeeDivisor, + ) + } + + bLogger.Infof( + "submitted transaction setRedemptionTreasuryFeeDivisor with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go b.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := b.contract.SetRedemptionTreasuryFeeDivisor( + newTransactorOptions, + arg__redemptionTreasuryFeeDivisor, + ) + if err != nil { + return nil, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "setRedemptionTreasuryFeeDivisor", + arg__redemptionTreasuryFeeDivisor, + ) + } + + bLogger.Infof( + "submitted transaction setRedemptionTreasuryFeeDivisor with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + b.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (b *Bridge) CallSetRedemptionTreasuryFeeDivisor( + arg__redemptionTreasuryFeeDivisor uint64, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + b.transactorOptions.From, + blockNumber, nil, + b.contractABI, + b.caller, + b.errorResolver, + b.contractAddress, + "setRedemptionTreasuryFeeDivisor", + &result, + arg__redemptionTreasuryFeeDivisor, + ) + + return err +} + +func (b *Bridge) SetRedemptionTreasuryFeeDivisorGasEstimate( + arg__redemptionTreasuryFeeDivisor uint64, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + b.callerOptions.From, + b.contractAddress, + "setRedemptionTreasuryFeeDivisor", + b.contractABI, + b.transactor, + arg__redemptionTreasuryFeeDivisor, + ) + + return result, err +} + +// Transaction submission. +func (b *Bridge) SetSpentMainUtxos( + arg_utxos []abi.BitcoinTxUTXO, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + bLogger.Debug( + "submitting transaction setSpentMainUtxos", + " params: ", + fmt.Sprint( + arg_utxos, + ), + ) + + b.transactionMutex.Lock() + defer b.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *b.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := b.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := b.contract.SetSpentMainUtxos( + transactorOptions, + arg_utxos, + ) + if err != nil { + return transaction, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "setSpentMainUtxos", + arg_utxos, + ) + } + + bLogger.Infof( + "submitted transaction setSpentMainUtxos with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go b.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := b.contract.SetSpentMainUtxos( + newTransactorOptions, + arg_utxos, + ) + if err != nil { + return nil, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "setSpentMainUtxos", + arg_utxos, + ) + } + + bLogger.Infof( + "submitted transaction setSpentMainUtxos with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + b.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (b *Bridge) CallSetSpentMainUtxos( + arg_utxos []abi.BitcoinTxUTXO, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + b.transactorOptions.From, + blockNumber, nil, + b.contractABI, + b.caller, + b.errorResolver, + b.contractAddress, + "setSpentMainUtxos", + &result, + arg_utxos, + ) + + return err +} + +func (b *Bridge) SetSpentMainUtxosGasEstimate( + arg_utxos []abi.BitcoinTxUTXO, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + b.callerOptions.From, + b.contractAddress, + "setSpentMainUtxos", + b.contractABI, + b.transactor, + arg_utxos, + ) + + return result, err +} + +// Transaction submission. +func (b *Bridge) SetSpvMaintainerStatus( + arg_spvMaintainer common.Address, + arg_isTrusted bool, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + bLogger.Debug( + "submitting transaction setSpvMaintainerStatus", + " params: ", + fmt.Sprint( + arg_spvMaintainer, + arg_isTrusted, + ), + ) + + b.transactionMutex.Lock() + defer b.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *b.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := b.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := b.contract.SetSpvMaintainerStatus( + transactorOptions, + arg_spvMaintainer, + arg_isTrusted, + ) + if err != nil { + return transaction, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "setSpvMaintainerStatus", + arg_spvMaintainer, + arg_isTrusted, + ) + } + + bLogger.Infof( + "submitted transaction setSpvMaintainerStatus with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go b.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := b.contract.SetSpvMaintainerStatus( + newTransactorOptions, + arg_spvMaintainer, + arg_isTrusted, + ) + if err != nil { + return nil, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "setSpvMaintainerStatus", + arg_spvMaintainer, + arg_isTrusted, + ) + } + + bLogger.Infof( + "submitted transaction setSpvMaintainerStatus with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + b.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (b *Bridge) CallSetSpvMaintainerStatus( + arg_spvMaintainer common.Address, + arg_isTrusted bool, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + b.transactorOptions.From, + blockNumber, nil, + b.contractABI, + b.caller, + b.errorResolver, + b.contractAddress, + "setSpvMaintainerStatus", + &result, + arg_spvMaintainer, + arg_isTrusted, + ) + + return err +} + +func (b *Bridge) SetSpvMaintainerStatusGasEstimate( + arg_spvMaintainer common.Address, + arg_isTrusted bool, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + b.callerOptions.From, + b.contractAddress, + "setSpvMaintainerStatus", + b.contractABI, + b.transactor, + arg_spvMaintainer, + arg_isTrusted, + ) + + return result, err +} + +// Transaction submission. +func (b *Bridge) SetSweptDeposits( + arg_utxos []abi.BitcoinTxUTXO, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + bLogger.Debug( + "submitting transaction setSweptDeposits", + " params: ", + fmt.Sprint( + arg_utxos, + ), + ) + + b.transactionMutex.Lock() + defer b.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *b.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := b.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := b.contract.SetSweptDeposits( + transactorOptions, + arg_utxos, + ) + if err != nil { + return transaction, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "setSweptDeposits", + arg_utxos, + ) + } + + bLogger.Infof( + "submitted transaction setSweptDeposits with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go b.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := b.contract.SetSweptDeposits( + newTransactorOptions, + arg_utxos, + ) + if err != nil { + return nil, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "setSweptDeposits", + arg_utxos, + ) + } + + bLogger.Infof( + "submitted transaction setSweptDeposits with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + b.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (b *Bridge) CallSetSweptDeposits( + arg_utxos []abi.BitcoinTxUTXO, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + b.transactorOptions.From, + blockNumber, nil, + b.contractABI, + b.caller, + b.errorResolver, + b.contractAddress, + "setSweptDeposits", + &result, + arg_utxos, + ) + + return err +} + +func (b *Bridge) SetSweptDepositsGasEstimate( + arg_utxos []abi.BitcoinTxUTXO, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + b.callerOptions.From, + b.contractAddress, + "setSweptDeposits", + b.contractABI, + b.transactor, + arg_utxos, + ) + + return result, err +} + +// Transaction submission. +func (b *Bridge) SetVaultStatus( + arg_vault common.Address, + arg_isTrusted bool, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + bLogger.Debug( + "submitting transaction setVaultStatus", + " params: ", + fmt.Sprint( + arg_vault, + arg_isTrusted, + ), + ) + + b.transactionMutex.Lock() + defer b.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *b.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := b.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := b.contract.SetVaultStatus( + transactorOptions, + arg_vault, + arg_isTrusted, + ) + if err != nil { + return transaction, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "setVaultStatus", + arg_vault, + arg_isTrusted, ) } bLogger.Infof( - "submitted transaction revealDeposit with id: [%s] and nonce [%v]", + "submitted transaction setVaultStatus with id: [%s] and nonce [%v]", transaction.Hash(), transaction.Nonce(), ) @@ -2646,24 +4618,24 @@ func (b *Bridge) RevealDeposit( newTransactorOptions.GasLimit = transactorOptions.GasLimit } - transaction, err := b.contract.RevealDeposit( + transaction, err := b.contract.SetVaultStatus( newTransactorOptions, - arg_fundingTx, - arg_reveal, + arg_vault, + arg_isTrusted, ) if err != nil { return nil, b.errorResolver.ResolveError( err, b.transactorOptions.From, nil, - "revealDeposit", - arg_fundingTx, - arg_reveal, + "setVaultStatus", + arg_vault, + arg_isTrusted, ) } bLogger.Infof( - "submitted transaction revealDeposit with id: [%s] and nonce [%v]", + "submitted transaction setVaultStatus with id: [%s] and nonce [%v]", transaction.Hash(), transaction.Nonce(), ) @@ -2678,9 +4650,9 @@ func (b *Bridge) RevealDeposit( } // Non-mutating call, not a transaction submission. -func (b *Bridge) CallRevealDeposit( - arg_fundingTx abi.BitcoinTxInfo, - arg_reveal abi.DepositDepositRevealInfo, +func (b *Bridge) CallSetVaultStatus( + arg_vault common.Address, + arg_isTrusted bool, blockNumber *big.Int, ) error { var result interface{} = nil @@ -2692,47 +4664,47 @@ func (b *Bridge) CallRevealDeposit( b.caller, b.errorResolver, b.contractAddress, - "revealDeposit", + "setVaultStatus", &result, - arg_fundingTx, - arg_reveal, + arg_vault, + arg_isTrusted, ) return err } -func (b *Bridge) RevealDepositGasEstimate( - arg_fundingTx abi.BitcoinTxInfo, - arg_reveal abi.DepositDepositRevealInfo, +func (b *Bridge) SetVaultStatusGasEstimate( + arg_vault common.Address, + arg_isTrusted bool, ) (uint64, error) { var result uint64 result, err := chainutil.EstimateGas( b.callerOptions.From, b.contractAddress, - "revealDeposit", + "setVaultStatus", b.contractABI, b.transactor, - arg_fundingTx, - arg_reveal, + arg_vault, + arg_isTrusted, ) return result, err } // Transaction submission. -func (b *Bridge) SetSpvMaintainerStatus( - arg_spvMaintainer common.Address, - arg_isTrusted bool, +func (b *Bridge) SetWallet( + arg_walletPubKeyHash [20]byte, + arg_wallet abi.WalletsWallet, transactionOptions ...chainutil.TransactionOptions, ) (*types.Transaction, error) { bLogger.Debug( - "submitting transaction setSpvMaintainerStatus", + "submitting transaction setWallet", " params: ", fmt.Sprint( - arg_spvMaintainer, - arg_isTrusted, + arg_walletPubKeyHash, + arg_wallet, ), ) @@ -2758,24 +4730,24 @@ func (b *Bridge) SetSpvMaintainerStatus( transactorOptions.Nonce = new(big.Int).SetUint64(nonce) - transaction, err := b.contract.SetSpvMaintainerStatus( + transaction, err := b.contract.SetWallet( transactorOptions, - arg_spvMaintainer, - arg_isTrusted, + arg_walletPubKeyHash, + arg_wallet, ) if err != nil { return transaction, b.errorResolver.ResolveError( err, b.transactorOptions.From, nil, - "setSpvMaintainerStatus", - arg_spvMaintainer, - arg_isTrusted, + "setWallet", + arg_walletPubKeyHash, + arg_wallet, ) } bLogger.Infof( - "submitted transaction setSpvMaintainerStatus with id: [%s] and nonce [%v]", + "submitted transaction setWallet with id: [%s] and nonce [%v]", transaction.Hash(), transaction.Nonce(), ) @@ -2794,24 +4766,24 @@ func (b *Bridge) SetSpvMaintainerStatus( newTransactorOptions.GasLimit = transactorOptions.GasLimit } - transaction, err := b.contract.SetSpvMaintainerStatus( + transaction, err := b.contract.SetWallet( newTransactorOptions, - arg_spvMaintainer, - arg_isTrusted, + arg_walletPubKeyHash, + arg_wallet, ) if err != nil { return nil, b.errorResolver.ResolveError( err, b.transactorOptions.From, nil, - "setSpvMaintainerStatus", - arg_spvMaintainer, - arg_isTrusted, + "setWallet", + arg_walletPubKeyHash, + arg_wallet, ) } bLogger.Infof( - "submitted transaction setSpvMaintainerStatus with id: [%s] and nonce [%v]", + "submitted transaction setWallet with id: [%s] and nonce [%v]", transaction.Hash(), transaction.Nonce(), ) @@ -2826,9 +4798,9 @@ func (b *Bridge) SetSpvMaintainerStatus( } // Non-mutating call, not a transaction submission. -func (b *Bridge) CallSetSpvMaintainerStatus( - arg_spvMaintainer common.Address, - arg_isTrusted bool, +func (b *Bridge) CallSetWallet( + arg_walletPubKeyHash [20]byte, + arg_wallet abi.WalletsWallet, blockNumber *big.Int, ) error { var result interface{} = nil @@ -2840,47 +4812,47 @@ func (b *Bridge) CallSetSpvMaintainerStatus( b.caller, b.errorResolver, b.contractAddress, - "setSpvMaintainerStatus", + "setWallet", &result, - arg_spvMaintainer, - arg_isTrusted, + arg_walletPubKeyHash, + arg_wallet, ) return err } -func (b *Bridge) SetSpvMaintainerStatusGasEstimate( - arg_spvMaintainer common.Address, - arg_isTrusted bool, +func (b *Bridge) SetWalletGasEstimate( + arg_walletPubKeyHash [20]byte, + arg_wallet abi.WalletsWallet, ) (uint64, error) { var result uint64 result, err := chainutil.EstimateGas( b.callerOptions.From, b.contractAddress, - "setSpvMaintainerStatus", + "setWallet", b.contractABI, b.transactor, - arg_spvMaintainer, - arg_isTrusted, + arg_walletPubKeyHash, + arg_wallet, ) return result, err } // Transaction submission. -func (b *Bridge) SetVaultStatus( - arg_vault common.Address, - arg_isTrusted bool, +func (b *Bridge) SetWalletMainUtxo( + arg_walletPubKeyHash [20]byte, + arg_utxo abi.BitcoinTxUTXO, transactionOptions ...chainutil.TransactionOptions, ) (*types.Transaction, error) { bLogger.Debug( - "submitting transaction setVaultStatus", + "submitting transaction setWalletMainUtxo", " params: ", fmt.Sprint( - arg_vault, - arg_isTrusted, + arg_walletPubKeyHash, + arg_utxo, ), ) @@ -2906,24 +4878,24 @@ func (b *Bridge) SetVaultStatus( transactorOptions.Nonce = new(big.Int).SetUint64(nonce) - transaction, err := b.contract.SetVaultStatus( + transaction, err := b.contract.SetWalletMainUtxo( transactorOptions, - arg_vault, - arg_isTrusted, + arg_walletPubKeyHash, + arg_utxo, ) if err != nil { return transaction, b.errorResolver.ResolveError( err, b.transactorOptions.From, nil, - "setVaultStatus", - arg_vault, - arg_isTrusted, + "setWalletMainUtxo", + arg_walletPubKeyHash, + arg_utxo, ) } bLogger.Infof( - "submitted transaction setVaultStatus with id: [%s] and nonce [%v]", + "submitted transaction setWalletMainUtxo with id: [%s] and nonce [%v]", transaction.Hash(), transaction.Nonce(), ) @@ -2942,24 +4914,24 @@ func (b *Bridge) SetVaultStatus( newTransactorOptions.GasLimit = transactorOptions.GasLimit } - transaction, err := b.contract.SetVaultStatus( + transaction, err := b.contract.SetWalletMainUtxo( newTransactorOptions, - arg_vault, - arg_isTrusted, + arg_walletPubKeyHash, + arg_utxo, ) if err != nil { return nil, b.errorResolver.ResolveError( err, b.transactorOptions.From, nil, - "setVaultStatus", - arg_vault, - arg_isTrusted, + "setWalletMainUtxo", + arg_walletPubKeyHash, + arg_utxo, ) } bLogger.Infof( - "submitted transaction setVaultStatus with id: [%s] and nonce [%v]", + "submitted transaction setWalletMainUtxo with id: [%s] and nonce [%v]", transaction.Hash(), transaction.Nonce(), ) @@ -2974,9 +4946,9 @@ func (b *Bridge) SetVaultStatus( } // Non-mutating call, not a transaction submission. -func (b *Bridge) CallSetVaultStatus( - arg_vault common.Address, - arg_isTrusted bool, +func (b *Bridge) CallSetWalletMainUtxo( + arg_walletPubKeyHash [20]byte, + arg_utxo abi.BitcoinTxUTXO, blockNumber *big.Int, ) error { var result interface{} = nil @@ -2988,29 +4960,29 @@ func (b *Bridge) CallSetVaultStatus( b.caller, b.errorResolver, b.contractAddress, - "setVaultStatus", + "setWalletMainUtxo", &result, - arg_vault, - arg_isTrusted, + arg_walletPubKeyHash, + arg_utxo, ) return err } -func (b *Bridge) SetVaultStatusGasEstimate( - arg_vault common.Address, - arg_isTrusted bool, +func (b *Bridge) SetWalletMainUtxoGasEstimate( + arg_walletPubKeyHash [20]byte, + arg_utxo abi.BitcoinTxUTXO, ) (uint64, error) { var result uint64 result, err := chainutil.EstimateGas( b.callerOptions.From, b.contractAddress, - "setVaultStatus", + "setWalletMainUtxo", b.contractABI, b.transactor, - arg_vault, - arg_isTrusted, + arg_walletPubKeyHash, + arg_utxo, ) return result, err @@ -4014,6 +5986,154 @@ func (b *Bridge) SubmitRedemptionProofGasEstimate( return result, err } +// Transaction submission. +func (b *Bridge) TimeoutPendingMovedFundsSweepRequest( + arg_walletPubKeyHash [20]byte, + arg_utxo abi.BitcoinTxUTXO, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + bLogger.Debug( + "submitting transaction timeoutPendingMovedFundsSweepRequest", + " params: ", + fmt.Sprint( + arg_walletPubKeyHash, + arg_utxo, + ), + ) + + b.transactionMutex.Lock() + defer b.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *b.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := b.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := b.contract.TimeoutPendingMovedFundsSweepRequest( + transactorOptions, + arg_walletPubKeyHash, + arg_utxo, + ) + if err != nil { + return transaction, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "timeoutPendingMovedFundsSweepRequest", + arg_walletPubKeyHash, + arg_utxo, + ) + } + + bLogger.Infof( + "submitted transaction timeoutPendingMovedFundsSweepRequest with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go b.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := b.contract.TimeoutPendingMovedFundsSweepRequest( + newTransactorOptions, + arg_walletPubKeyHash, + arg_utxo, + ) + if err != nil { + return nil, b.errorResolver.ResolveError( + err, + b.transactorOptions.From, + nil, + "timeoutPendingMovedFundsSweepRequest", + arg_walletPubKeyHash, + arg_utxo, + ) + } + + bLogger.Infof( + "submitted transaction timeoutPendingMovedFundsSweepRequest with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + b.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (b *Bridge) CallTimeoutPendingMovedFundsSweepRequest( + arg_walletPubKeyHash [20]byte, + arg_utxo abi.BitcoinTxUTXO, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + b.transactorOptions.From, + blockNumber, nil, + b.contractABI, + b.caller, + b.errorResolver, + b.contractAddress, + "timeoutPendingMovedFundsSweepRequest", + &result, + arg_walletPubKeyHash, + arg_utxo, + ) + + return err +} + +func (b *Bridge) TimeoutPendingMovedFundsSweepRequestGasEstimate( + arg_walletPubKeyHash [20]byte, + arg_utxo abi.BitcoinTxUTXO, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + b.callerOptions.From, + b.contractAddress, + "timeoutPendingMovedFundsSweepRequest", + b.contractABI, + b.transactor, + arg_walletPubKeyHash, + arg_utxo, + ) + + return result, err +} + // Transaction submission. func (b *Bridge) TransferGovernance( arg_newGovernance common.Address, diff --git a/pkg/chain/ethereum/tbtc/gen/contract/MaintainerProxy.go b/pkg/chain/ethereum/tbtc/gen/contract/MaintainerProxy.go new file mode 100644 index 0000000000..dc29d77ec0 --- /dev/null +++ b/pkg/chain/ethereum/tbtc/gen/contract/MaintainerProxy.go @@ -0,0 +1,5387 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contract + +import ( + "context" + "fmt" + "math/big" + "strings" + "sync" + "time" + + hostchainabi "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/accounts/keystore" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" + + "github.com/ipfs/go-log" + + "github.com/keep-network/keep-common/pkg/chain/ethereum" + chainutil "github.com/keep-network/keep-common/pkg/chain/ethereum/ethutil" + "github.com/keep-network/keep-common/pkg/subscription" + "github.com/keep-network/keep-core/pkg/chain/ethereum/tbtc/gen/abi" +) + +// Create a package-level logger for this contract. The logger exists at +// package level so that the logger is registered at startup and can be +// included or excluded from logging at startup by name. +var mpLogger = log.Logger("keep-contract-MaintainerProxy") + +type MaintainerProxy struct { + contract *abi.MaintainerProxy + contractAddress common.Address + contractABI *hostchainabi.ABI + caller bind.ContractCaller + transactor bind.ContractTransactor + callerOptions *bind.CallOpts + transactorOptions *bind.TransactOpts + errorResolver *chainutil.ErrorResolver + nonceManager *ethereum.NonceManager + miningWaiter *chainutil.MiningWaiter + blockCounter *ethereum.BlockCounter + + transactionMutex *sync.Mutex +} + +func NewMaintainerProxy( + contractAddress common.Address, + chainId *big.Int, + accountKey *keystore.Key, + backend bind.ContractBackend, + nonceManager *ethereum.NonceManager, + miningWaiter *chainutil.MiningWaiter, + blockCounter *ethereum.BlockCounter, + transactionMutex *sync.Mutex, +) (*MaintainerProxy, error) { + callerOptions := &bind.CallOpts{ + From: accountKey.Address, + } + + transactorOptions, err := bind.NewKeyedTransactorWithChainID( + accountKey.PrivateKey, + chainId, + ) + if err != nil { + return nil, fmt.Errorf("failed to instantiate transactor: [%v]", err) + } + + contract, err := abi.NewMaintainerProxy( + contractAddress, + backend, + ) + if err != nil { + return nil, fmt.Errorf( + "failed to instantiate contract at address: %s [%v]", + contractAddress.String(), + err, + ) + } + + contractABI, err := hostchainabi.JSON(strings.NewReader(abi.MaintainerProxyABI)) + if err != nil { + return nil, fmt.Errorf("failed to instantiate ABI: [%v]", err) + } + + return &MaintainerProxy{ + contract: contract, + contractAddress: contractAddress, + contractABI: &contractABI, + caller: backend, + transactor: backend, + callerOptions: callerOptions, + transactorOptions: transactorOptions, + errorResolver: chainutil.NewErrorResolver(backend, &contractABI, &contractAddress), + nonceManager: nonceManager, + miningWaiter: miningWaiter, + blockCounter: blockCounter, + transactionMutex: transactionMutex, + }, nil +} + +// ----- Non-const Methods ------ + +// Transaction submission. +func (mp *MaintainerProxy) AuthorizeSpvMaintainer( + arg_maintainer common.Address, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + mpLogger.Debug( + "submitting transaction authorizeSpvMaintainer", + " params: ", + fmt.Sprint( + arg_maintainer, + ), + ) + + mp.transactionMutex.Lock() + defer mp.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *mp.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := mp.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := mp.contract.AuthorizeSpvMaintainer( + transactorOptions, + arg_maintainer, + ) + if err != nil { + return transaction, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "authorizeSpvMaintainer", + arg_maintainer, + ) + } + + mpLogger.Infof( + "submitted transaction authorizeSpvMaintainer with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go mp.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := mp.contract.AuthorizeSpvMaintainer( + newTransactorOptions, + arg_maintainer, + ) + if err != nil { + return nil, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "authorizeSpvMaintainer", + arg_maintainer, + ) + } + + mpLogger.Infof( + "submitted transaction authorizeSpvMaintainer with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + mp.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (mp *MaintainerProxy) CallAuthorizeSpvMaintainer( + arg_maintainer common.Address, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + mp.transactorOptions.From, + blockNumber, nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "authorizeSpvMaintainer", + &result, + arg_maintainer, + ) + + return err +} + +func (mp *MaintainerProxy) AuthorizeSpvMaintainerGasEstimate( + arg_maintainer common.Address, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + mp.callerOptions.From, + mp.contractAddress, + "authorizeSpvMaintainer", + mp.contractABI, + mp.transactor, + arg_maintainer, + ) + + return result, err +} + +// Transaction submission. +func (mp *MaintainerProxy) AuthorizeWalletMaintainer( + arg_maintainer common.Address, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + mpLogger.Debug( + "submitting transaction authorizeWalletMaintainer", + " params: ", + fmt.Sprint( + arg_maintainer, + ), + ) + + mp.transactionMutex.Lock() + defer mp.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *mp.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := mp.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := mp.contract.AuthorizeWalletMaintainer( + transactorOptions, + arg_maintainer, + ) + if err != nil { + return transaction, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "authorizeWalletMaintainer", + arg_maintainer, + ) + } + + mpLogger.Infof( + "submitted transaction authorizeWalletMaintainer with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go mp.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := mp.contract.AuthorizeWalletMaintainer( + newTransactorOptions, + arg_maintainer, + ) + if err != nil { + return nil, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "authorizeWalletMaintainer", + arg_maintainer, + ) + } + + mpLogger.Infof( + "submitted transaction authorizeWalletMaintainer with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + mp.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (mp *MaintainerProxy) CallAuthorizeWalletMaintainer( + arg_maintainer common.Address, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + mp.transactorOptions.From, + blockNumber, nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "authorizeWalletMaintainer", + &result, + arg_maintainer, + ) + + return err +} + +func (mp *MaintainerProxy) AuthorizeWalletMaintainerGasEstimate( + arg_maintainer common.Address, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + mp.callerOptions.From, + mp.contractAddress, + "authorizeWalletMaintainer", + mp.contractABI, + mp.transactor, + arg_maintainer, + ) + + return result, err +} + +// Transaction submission. +func (mp *MaintainerProxy) DefeatFraudChallenge( + arg_walletPublicKey []byte, + arg_preimage []byte, + arg_witness bool, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + mpLogger.Debug( + "submitting transaction defeatFraudChallenge", + " params: ", + fmt.Sprint( + arg_walletPublicKey, + arg_preimage, + arg_witness, + ), + ) + + mp.transactionMutex.Lock() + defer mp.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *mp.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := mp.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := mp.contract.DefeatFraudChallenge( + transactorOptions, + arg_walletPublicKey, + arg_preimage, + arg_witness, + ) + if err != nil { + return transaction, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "defeatFraudChallenge", + arg_walletPublicKey, + arg_preimage, + arg_witness, + ) + } + + mpLogger.Infof( + "submitted transaction defeatFraudChallenge with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go mp.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := mp.contract.DefeatFraudChallenge( + newTransactorOptions, + arg_walletPublicKey, + arg_preimage, + arg_witness, + ) + if err != nil { + return nil, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "defeatFraudChallenge", + arg_walletPublicKey, + arg_preimage, + arg_witness, + ) + } + + mpLogger.Infof( + "submitted transaction defeatFraudChallenge with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + mp.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (mp *MaintainerProxy) CallDefeatFraudChallenge( + arg_walletPublicKey []byte, + arg_preimage []byte, + arg_witness bool, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + mp.transactorOptions.From, + blockNumber, nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "defeatFraudChallenge", + &result, + arg_walletPublicKey, + arg_preimage, + arg_witness, + ) + + return err +} + +func (mp *MaintainerProxy) DefeatFraudChallengeGasEstimate( + arg_walletPublicKey []byte, + arg_preimage []byte, + arg_witness bool, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + mp.callerOptions.From, + mp.contractAddress, + "defeatFraudChallenge", + mp.contractABI, + mp.transactor, + arg_walletPublicKey, + arg_preimage, + arg_witness, + ) + + return result, err +} + +// Transaction submission. +func (mp *MaintainerProxy) DefeatFraudChallengeWithHeartbeat( + arg_walletPublicKey []byte, + arg_heartbeatMessage []byte, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + mpLogger.Debug( + "submitting transaction defeatFraudChallengeWithHeartbeat", + " params: ", + fmt.Sprint( + arg_walletPublicKey, + arg_heartbeatMessage, + ), + ) + + mp.transactionMutex.Lock() + defer mp.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *mp.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := mp.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := mp.contract.DefeatFraudChallengeWithHeartbeat( + transactorOptions, + arg_walletPublicKey, + arg_heartbeatMessage, + ) + if err != nil { + return transaction, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "defeatFraudChallengeWithHeartbeat", + arg_walletPublicKey, + arg_heartbeatMessage, + ) + } + + mpLogger.Infof( + "submitted transaction defeatFraudChallengeWithHeartbeat with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go mp.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := mp.contract.DefeatFraudChallengeWithHeartbeat( + newTransactorOptions, + arg_walletPublicKey, + arg_heartbeatMessage, + ) + if err != nil { + return nil, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "defeatFraudChallengeWithHeartbeat", + arg_walletPublicKey, + arg_heartbeatMessage, + ) + } + + mpLogger.Infof( + "submitted transaction defeatFraudChallengeWithHeartbeat with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + mp.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (mp *MaintainerProxy) CallDefeatFraudChallengeWithHeartbeat( + arg_walletPublicKey []byte, + arg_heartbeatMessage []byte, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + mp.transactorOptions.From, + blockNumber, nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "defeatFraudChallengeWithHeartbeat", + &result, + arg_walletPublicKey, + arg_heartbeatMessage, + ) + + return err +} + +func (mp *MaintainerProxy) DefeatFraudChallengeWithHeartbeatGasEstimate( + arg_walletPublicKey []byte, + arg_heartbeatMessage []byte, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + mp.callerOptions.From, + mp.contractAddress, + "defeatFraudChallengeWithHeartbeat", + mp.contractABI, + mp.transactor, + arg_walletPublicKey, + arg_heartbeatMessage, + ) + + return result, err +} + +// Transaction submission. +func (mp *MaintainerProxy) NotifyMovingFundsBelowDust( + arg_walletPubKeyHash [20]byte, + arg_mainUtxo abi.BitcoinTxUTXO2, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + mpLogger.Debug( + "submitting transaction notifyMovingFundsBelowDust", + " params: ", + fmt.Sprint( + arg_walletPubKeyHash, + arg_mainUtxo, + ), + ) + + mp.transactionMutex.Lock() + defer mp.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *mp.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := mp.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := mp.contract.NotifyMovingFundsBelowDust( + transactorOptions, + arg_walletPubKeyHash, + arg_mainUtxo, + ) + if err != nil { + return transaction, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "notifyMovingFundsBelowDust", + arg_walletPubKeyHash, + arg_mainUtxo, + ) + } + + mpLogger.Infof( + "submitted transaction notifyMovingFundsBelowDust with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go mp.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := mp.contract.NotifyMovingFundsBelowDust( + newTransactorOptions, + arg_walletPubKeyHash, + arg_mainUtxo, + ) + if err != nil { + return nil, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "notifyMovingFundsBelowDust", + arg_walletPubKeyHash, + arg_mainUtxo, + ) + } + + mpLogger.Infof( + "submitted transaction notifyMovingFundsBelowDust with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + mp.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (mp *MaintainerProxy) CallNotifyMovingFundsBelowDust( + arg_walletPubKeyHash [20]byte, + arg_mainUtxo abi.BitcoinTxUTXO2, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + mp.transactorOptions.From, + blockNumber, nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "notifyMovingFundsBelowDust", + &result, + arg_walletPubKeyHash, + arg_mainUtxo, + ) + + return err +} + +func (mp *MaintainerProxy) NotifyMovingFundsBelowDustGasEstimate( + arg_walletPubKeyHash [20]byte, + arg_mainUtxo abi.BitcoinTxUTXO2, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + mp.callerOptions.From, + mp.contractAddress, + "notifyMovingFundsBelowDust", + mp.contractABI, + mp.transactor, + arg_walletPubKeyHash, + arg_mainUtxo, + ) + + return result, err +} + +// Transaction submission. +func (mp *MaintainerProxy) NotifyWalletCloseable( + arg_walletPubKeyHash [20]byte, + arg_walletMainUtxo abi.BitcoinTxUTXO2, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + mpLogger.Debug( + "submitting transaction notifyWalletCloseable", + " params: ", + fmt.Sprint( + arg_walletPubKeyHash, + arg_walletMainUtxo, + ), + ) + + mp.transactionMutex.Lock() + defer mp.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *mp.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := mp.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := mp.contract.NotifyWalletCloseable( + transactorOptions, + arg_walletPubKeyHash, + arg_walletMainUtxo, + ) + if err != nil { + return transaction, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "notifyWalletCloseable", + arg_walletPubKeyHash, + arg_walletMainUtxo, + ) + } + + mpLogger.Infof( + "submitted transaction notifyWalletCloseable with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go mp.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := mp.contract.NotifyWalletCloseable( + newTransactorOptions, + arg_walletPubKeyHash, + arg_walletMainUtxo, + ) + if err != nil { + return nil, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "notifyWalletCloseable", + arg_walletPubKeyHash, + arg_walletMainUtxo, + ) + } + + mpLogger.Infof( + "submitted transaction notifyWalletCloseable with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + mp.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (mp *MaintainerProxy) CallNotifyWalletCloseable( + arg_walletPubKeyHash [20]byte, + arg_walletMainUtxo abi.BitcoinTxUTXO2, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + mp.transactorOptions.From, + blockNumber, nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "notifyWalletCloseable", + &result, + arg_walletPubKeyHash, + arg_walletMainUtxo, + ) + + return err +} + +func (mp *MaintainerProxy) NotifyWalletCloseableGasEstimate( + arg_walletPubKeyHash [20]byte, + arg_walletMainUtxo abi.BitcoinTxUTXO2, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + mp.callerOptions.From, + mp.contractAddress, + "notifyWalletCloseable", + mp.contractABI, + mp.transactor, + arg_walletPubKeyHash, + arg_walletMainUtxo, + ) + + return result, err +} + +// Transaction submission. +func (mp *MaintainerProxy) NotifyWalletClosingPeriodElapsed( + arg_walletPubKeyHash [20]byte, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + mpLogger.Debug( + "submitting transaction notifyWalletClosingPeriodElapsed", + " params: ", + fmt.Sprint( + arg_walletPubKeyHash, + ), + ) + + mp.transactionMutex.Lock() + defer mp.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *mp.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := mp.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := mp.contract.NotifyWalletClosingPeriodElapsed( + transactorOptions, + arg_walletPubKeyHash, + ) + if err != nil { + return transaction, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "notifyWalletClosingPeriodElapsed", + arg_walletPubKeyHash, + ) + } + + mpLogger.Infof( + "submitted transaction notifyWalletClosingPeriodElapsed with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go mp.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := mp.contract.NotifyWalletClosingPeriodElapsed( + newTransactorOptions, + arg_walletPubKeyHash, + ) + if err != nil { + return nil, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "notifyWalletClosingPeriodElapsed", + arg_walletPubKeyHash, + ) + } + + mpLogger.Infof( + "submitted transaction notifyWalletClosingPeriodElapsed with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + mp.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (mp *MaintainerProxy) CallNotifyWalletClosingPeriodElapsed( + arg_walletPubKeyHash [20]byte, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + mp.transactorOptions.From, + blockNumber, nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "notifyWalletClosingPeriodElapsed", + &result, + arg_walletPubKeyHash, + ) + + return err +} + +func (mp *MaintainerProxy) NotifyWalletClosingPeriodElapsedGasEstimate( + arg_walletPubKeyHash [20]byte, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + mp.callerOptions.From, + mp.contractAddress, + "notifyWalletClosingPeriodElapsed", + mp.contractABI, + mp.transactor, + arg_walletPubKeyHash, + ) + + return result, err +} + +// Transaction submission. +func (mp *MaintainerProxy) RenounceOwnership( + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + mpLogger.Debug( + "submitting transaction renounceOwnership", + ) + + mp.transactionMutex.Lock() + defer mp.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *mp.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := mp.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := mp.contract.RenounceOwnership( + transactorOptions, + ) + if err != nil { + return transaction, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "renounceOwnership", + ) + } + + mpLogger.Infof( + "submitted transaction renounceOwnership with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go mp.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := mp.contract.RenounceOwnership( + newTransactorOptions, + ) + if err != nil { + return nil, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "renounceOwnership", + ) + } + + mpLogger.Infof( + "submitted transaction renounceOwnership with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + mp.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (mp *MaintainerProxy) CallRenounceOwnership( + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + mp.transactorOptions.From, + blockNumber, nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "renounceOwnership", + &result, + ) + + return err +} + +func (mp *MaintainerProxy) RenounceOwnershipGasEstimate() (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + mp.callerOptions.From, + mp.contractAddress, + "renounceOwnership", + mp.contractABI, + mp.transactor, + ) + + return result, err +} + +// Transaction submission. +func (mp *MaintainerProxy) RequestNewWallet( + arg_activeWalletMainUtxo abi.BitcoinTxUTXO2, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + mpLogger.Debug( + "submitting transaction requestNewWallet", + " params: ", + fmt.Sprint( + arg_activeWalletMainUtxo, + ), + ) + + mp.transactionMutex.Lock() + defer mp.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *mp.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := mp.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := mp.contract.RequestNewWallet( + transactorOptions, + arg_activeWalletMainUtxo, + ) + if err != nil { + return transaction, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "requestNewWallet", + arg_activeWalletMainUtxo, + ) + } + + mpLogger.Infof( + "submitted transaction requestNewWallet with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go mp.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := mp.contract.RequestNewWallet( + newTransactorOptions, + arg_activeWalletMainUtxo, + ) + if err != nil { + return nil, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "requestNewWallet", + arg_activeWalletMainUtxo, + ) + } + + mpLogger.Infof( + "submitted transaction requestNewWallet with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + mp.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (mp *MaintainerProxy) CallRequestNewWallet( + arg_activeWalletMainUtxo abi.BitcoinTxUTXO2, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + mp.transactorOptions.From, + blockNumber, nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "requestNewWallet", + &result, + arg_activeWalletMainUtxo, + ) + + return err +} + +func (mp *MaintainerProxy) RequestNewWalletGasEstimate( + arg_activeWalletMainUtxo abi.BitcoinTxUTXO2, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + mp.callerOptions.From, + mp.contractAddress, + "requestNewWallet", + mp.contractABI, + mp.transactor, + arg_activeWalletMainUtxo, + ) + + return result, err +} + +// Transaction submission. +func (mp *MaintainerProxy) ResetMovingFundsTimeout( + arg_walletPubKeyHash [20]byte, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + mpLogger.Debug( + "submitting transaction resetMovingFundsTimeout", + " params: ", + fmt.Sprint( + arg_walletPubKeyHash, + ), + ) + + mp.transactionMutex.Lock() + defer mp.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *mp.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := mp.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := mp.contract.ResetMovingFundsTimeout( + transactorOptions, + arg_walletPubKeyHash, + ) + if err != nil { + return transaction, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "resetMovingFundsTimeout", + arg_walletPubKeyHash, + ) + } + + mpLogger.Infof( + "submitted transaction resetMovingFundsTimeout with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go mp.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := mp.contract.ResetMovingFundsTimeout( + newTransactorOptions, + arg_walletPubKeyHash, + ) + if err != nil { + return nil, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "resetMovingFundsTimeout", + arg_walletPubKeyHash, + ) + } + + mpLogger.Infof( + "submitted transaction resetMovingFundsTimeout with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + mp.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (mp *MaintainerProxy) CallResetMovingFundsTimeout( + arg_walletPubKeyHash [20]byte, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + mp.transactorOptions.From, + blockNumber, nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "resetMovingFundsTimeout", + &result, + arg_walletPubKeyHash, + ) + + return err +} + +func (mp *MaintainerProxy) ResetMovingFundsTimeoutGasEstimate( + arg_walletPubKeyHash [20]byte, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + mp.callerOptions.From, + mp.contractAddress, + "resetMovingFundsTimeout", + mp.contractABI, + mp.transactor, + arg_walletPubKeyHash, + ) + + return result, err +} + +// Transaction submission. +func (mp *MaintainerProxy) SubmitDepositSweepProof( + arg_sweepTx abi.BitcoinTxInfo3, + arg_sweepProof abi.BitcoinTxProof2, + arg_mainUtxo abi.BitcoinTxUTXO2, + arg_vault common.Address, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + mpLogger.Debug( + "submitting transaction submitDepositSweepProof", + " params: ", + fmt.Sprint( + arg_sweepTx, + arg_sweepProof, + arg_mainUtxo, + arg_vault, + ), + ) + + mp.transactionMutex.Lock() + defer mp.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *mp.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := mp.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := mp.contract.SubmitDepositSweepProof( + transactorOptions, + arg_sweepTx, + arg_sweepProof, + arg_mainUtxo, + arg_vault, + ) + if err != nil { + return transaction, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "submitDepositSweepProof", + arg_sweepTx, + arg_sweepProof, + arg_mainUtxo, + arg_vault, + ) + } + + mpLogger.Infof( + "submitted transaction submitDepositSweepProof with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go mp.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := mp.contract.SubmitDepositSweepProof( + newTransactorOptions, + arg_sweepTx, + arg_sweepProof, + arg_mainUtxo, + arg_vault, + ) + if err != nil { + return nil, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "submitDepositSweepProof", + arg_sweepTx, + arg_sweepProof, + arg_mainUtxo, + arg_vault, + ) + } + + mpLogger.Infof( + "submitted transaction submitDepositSweepProof with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + mp.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (mp *MaintainerProxy) CallSubmitDepositSweepProof( + arg_sweepTx abi.BitcoinTxInfo3, + arg_sweepProof abi.BitcoinTxProof2, + arg_mainUtxo abi.BitcoinTxUTXO2, + arg_vault common.Address, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + mp.transactorOptions.From, + blockNumber, nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "submitDepositSweepProof", + &result, + arg_sweepTx, + arg_sweepProof, + arg_mainUtxo, + arg_vault, + ) + + return err +} + +func (mp *MaintainerProxy) SubmitDepositSweepProofGasEstimate( + arg_sweepTx abi.BitcoinTxInfo3, + arg_sweepProof abi.BitcoinTxProof2, + arg_mainUtxo abi.BitcoinTxUTXO2, + arg_vault common.Address, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + mp.callerOptions.From, + mp.contractAddress, + "submitDepositSweepProof", + mp.contractABI, + mp.transactor, + arg_sweepTx, + arg_sweepProof, + arg_mainUtxo, + arg_vault, + ) + + return result, err +} + +// Transaction submission. +func (mp *MaintainerProxy) SubmitMovedFundsSweepProof( + arg_sweepTx abi.BitcoinTxInfo3, + arg_sweepProof abi.BitcoinTxProof2, + arg_mainUtxo abi.BitcoinTxUTXO2, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + mpLogger.Debug( + "submitting transaction submitMovedFundsSweepProof", + " params: ", + fmt.Sprint( + arg_sweepTx, + arg_sweepProof, + arg_mainUtxo, + ), + ) + + mp.transactionMutex.Lock() + defer mp.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *mp.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := mp.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := mp.contract.SubmitMovedFundsSweepProof( + transactorOptions, + arg_sweepTx, + arg_sweepProof, + arg_mainUtxo, + ) + if err != nil { + return transaction, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "submitMovedFundsSweepProof", + arg_sweepTx, + arg_sweepProof, + arg_mainUtxo, + ) + } + + mpLogger.Infof( + "submitted transaction submitMovedFundsSweepProof with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go mp.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := mp.contract.SubmitMovedFundsSweepProof( + newTransactorOptions, + arg_sweepTx, + arg_sweepProof, + arg_mainUtxo, + ) + if err != nil { + return nil, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "submitMovedFundsSweepProof", + arg_sweepTx, + arg_sweepProof, + arg_mainUtxo, + ) + } + + mpLogger.Infof( + "submitted transaction submitMovedFundsSweepProof with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + mp.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (mp *MaintainerProxy) CallSubmitMovedFundsSweepProof( + arg_sweepTx abi.BitcoinTxInfo3, + arg_sweepProof abi.BitcoinTxProof2, + arg_mainUtxo abi.BitcoinTxUTXO2, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + mp.transactorOptions.From, + blockNumber, nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "submitMovedFundsSweepProof", + &result, + arg_sweepTx, + arg_sweepProof, + arg_mainUtxo, + ) + + return err +} + +func (mp *MaintainerProxy) SubmitMovedFundsSweepProofGasEstimate( + arg_sweepTx abi.BitcoinTxInfo3, + arg_sweepProof abi.BitcoinTxProof2, + arg_mainUtxo abi.BitcoinTxUTXO2, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + mp.callerOptions.From, + mp.contractAddress, + "submitMovedFundsSweepProof", + mp.contractABI, + mp.transactor, + arg_sweepTx, + arg_sweepProof, + arg_mainUtxo, + ) + + return result, err +} + +// Transaction submission. +func (mp *MaintainerProxy) SubmitMovingFundsProof( + arg_movingFundsTx abi.BitcoinTxInfo3, + arg_movingFundsProof abi.BitcoinTxProof2, + arg_mainUtxo abi.BitcoinTxUTXO2, + arg_walletPubKeyHash [20]byte, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + mpLogger.Debug( + "submitting transaction submitMovingFundsProof", + " params: ", + fmt.Sprint( + arg_movingFundsTx, + arg_movingFundsProof, + arg_mainUtxo, + arg_walletPubKeyHash, + ), + ) + + mp.transactionMutex.Lock() + defer mp.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *mp.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := mp.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := mp.contract.SubmitMovingFundsProof( + transactorOptions, + arg_movingFundsTx, + arg_movingFundsProof, + arg_mainUtxo, + arg_walletPubKeyHash, + ) + if err != nil { + return transaction, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "submitMovingFundsProof", + arg_movingFundsTx, + arg_movingFundsProof, + arg_mainUtxo, + arg_walletPubKeyHash, + ) + } + + mpLogger.Infof( + "submitted transaction submitMovingFundsProof with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go mp.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := mp.contract.SubmitMovingFundsProof( + newTransactorOptions, + arg_movingFundsTx, + arg_movingFundsProof, + arg_mainUtxo, + arg_walletPubKeyHash, + ) + if err != nil { + return nil, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "submitMovingFundsProof", + arg_movingFundsTx, + arg_movingFundsProof, + arg_mainUtxo, + arg_walletPubKeyHash, + ) + } + + mpLogger.Infof( + "submitted transaction submitMovingFundsProof with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + mp.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (mp *MaintainerProxy) CallSubmitMovingFundsProof( + arg_movingFundsTx abi.BitcoinTxInfo3, + arg_movingFundsProof abi.BitcoinTxProof2, + arg_mainUtxo abi.BitcoinTxUTXO2, + arg_walletPubKeyHash [20]byte, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + mp.transactorOptions.From, + blockNumber, nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "submitMovingFundsProof", + &result, + arg_movingFundsTx, + arg_movingFundsProof, + arg_mainUtxo, + arg_walletPubKeyHash, + ) + + return err +} + +func (mp *MaintainerProxy) SubmitMovingFundsProofGasEstimate( + arg_movingFundsTx abi.BitcoinTxInfo3, + arg_movingFundsProof abi.BitcoinTxProof2, + arg_mainUtxo abi.BitcoinTxUTXO2, + arg_walletPubKeyHash [20]byte, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + mp.callerOptions.From, + mp.contractAddress, + "submitMovingFundsProof", + mp.contractABI, + mp.transactor, + arg_movingFundsTx, + arg_movingFundsProof, + arg_mainUtxo, + arg_walletPubKeyHash, + ) + + return result, err +} + +// Transaction submission. +func (mp *MaintainerProxy) SubmitRedemptionProof( + arg_redemptionTx abi.BitcoinTxInfo3, + arg_redemptionProof abi.BitcoinTxProof2, + arg_mainUtxo abi.BitcoinTxUTXO2, + arg_walletPubKeyHash [20]byte, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + mpLogger.Debug( + "submitting transaction submitRedemptionProof", + " params: ", + fmt.Sprint( + arg_redemptionTx, + arg_redemptionProof, + arg_mainUtxo, + arg_walletPubKeyHash, + ), + ) + + mp.transactionMutex.Lock() + defer mp.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *mp.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := mp.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := mp.contract.SubmitRedemptionProof( + transactorOptions, + arg_redemptionTx, + arg_redemptionProof, + arg_mainUtxo, + arg_walletPubKeyHash, + ) + if err != nil { + return transaction, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "submitRedemptionProof", + arg_redemptionTx, + arg_redemptionProof, + arg_mainUtxo, + arg_walletPubKeyHash, + ) + } + + mpLogger.Infof( + "submitted transaction submitRedemptionProof with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go mp.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := mp.contract.SubmitRedemptionProof( + newTransactorOptions, + arg_redemptionTx, + arg_redemptionProof, + arg_mainUtxo, + arg_walletPubKeyHash, + ) + if err != nil { + return nil, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "submitRedemptionProof", + arg_redemptionTx, + arg_redemptionProof, + arg_mainUtxo, + arg_walletPubKeyHash, + ) + } + + mpLogger.Infof( + "submitted transaction submitRedemptionProof with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + mp.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (mp *MaintainerProxy) CallSubmitRedemptionProof( + arg_redemptionTx abi.BitcoinTxInfo3, + arg_redemptionProof abi.BitcoinTxProof2, + arg_mainUtxo abi.BitcoinTxUTXO2, + arg_walletPubKeyHash [20]byte, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + mp.transactorOptions.From, + blockNumber, nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "submitRedemptionProof", + &result, + arg_redemptionTx, + arg_redemptionProof, + arg_mainUtxo, + arg_walletPubKeyHash, + ) + + return err +} + +func (mp *MaintainerProxy) SubmitRedemptionProofGasEstimate( + arg_redemptionTx abi.BitcoinTxInfo3, + arg_redemptionProof abi.BitcoinTxProof2, + arg_mainUtxo abi.BitcoinTxUTXO2, + arg_walletPubKeyHash [20]byte, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + mp.callerOptions.From, + mp.contractAddress, + "submitRedemptionProof", + mp.contractABI, + mp.transactor, + arg_redemptionTx, + arg_redemptionProof, + arg_mainUtxo, + arg_walletPubKeyHash, + ) + + return result, err +} + +// Transaction submission. +func (mp *MaintainerProxy) TransferOwnership( + arg_newOwner common.Address, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + mpLogger.Debug( + "submitting transaction transferOwnership", + " params: ", + fmt.Sprint( + arg_newOwner, + ), + ) + + mp.transactionMutex.Lock() + defer mp.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *mp.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := mp.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := mp.contract.TransferOwnership( + transactorOptions, + arg_newOwner, + ) + if err != nil { + return transaction, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "transferOwnership", + arg_newOwner, + ) + } + + mpLogger.Infof( + "submitted transaction transferOwnership with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go mp.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := mp.contract.TransferOwnership( + newTransactorOptions, + arg_newOwner, + ) + if err != nil { + return nil, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "transferOwnership", + arg_newOwner, + ) + } + + mpLogger.Infof( + "submitted transaction transferOwnership with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + mp.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (mp *MaintainerProxy) CallTransferOwnership( + arg_newOwner common.Address, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + mp.transactorOptions.From, + blockNumber, nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "transferOwnership", + &result, + arg_newOwner, + ) + + return err +} + +func (mp *MaintainerProxy) TransferOwnershipGasEstimate( + arg_newOwner common.Address, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + mp.callerOptions.From, + mp.contractAddress, + "transferOwnership", + mp.contractABI, + mp.transactor, + arg_newOwner, + ) + + return result, err +} + +// Transaction submission. +func (mp *MaintainerProxy) UnauthorizeSpvMaintainer( + arg_maintainerToUnauthorize common.Address, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + mpLogger.Debug( + "submitting transaction unauthorizeSpvMaintainer", + " params: ", + fmt.Sprint( + arg_maintainerToUnauthorize, + ), + ) + + mp.transactionMutex.Lock() + defer mp.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *mp.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := mp.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := mp.contract.UnauthorizeSpvMaintainer( + transactorOptions, + arg_maintainerToUnauthorize, + ) + if err != nil { + return transaction, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "unauthorizeSpvMaintainer", + arg_maintainerToUnauthorize, + ) + } + + mpLogger.Infof( + "submitted transaction unauthorizeSpvMaintainer with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go mp.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := mp.contract.UnauthorizeSpvMaintainer( + newTransactorOptions, + arg_maintainerToUnauthorize, + ) + if err != nil { + return nil, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "unauthorizeSpvMaintainer", + arg_maintainerToUnauthorize, + ) + } + + mpLogger.Infof( + "submitted transaction unauthorizeSpvMaintainer with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + mp.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (mp *MaintainerProxy) CallUnauthorizeSpvMaintainer( + arg_maintainerToUnauthorize common.Address, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + mp.transactorOptions.From, + blockNumber, nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "unauthorizeSpvMaintainer", + &result, + arg_maintainerToUnauthorize, + ) + + return err +} + +func (mp *MaintainerProxy) UnauthorizeSpvMaintainerGasEstimate( + arg_maintainerToUnauthorize common.Address, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + mp.callerOptions.From, + mp.contractAddress, + "unauthorizeSpvMaintainer", + mp.contractABI, + mp.transactor, + arg_maintainerToUnauthorize, + ) + + return result, err +} + +// Transaction submission. +func (mp *MaintainerProxy) UnauthorizeWalletMaintainer( + arg_maintainerToUnauthorize common.Address, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + mpLogger.Debug( + "submitting transaction unauthorizeWalletMaintainer", + " params: ", + fmt.Sprint( + arg_maintainerToUnauthorize, + ), + ) + + mp.transactionMutex.Lock() + defer mp.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *mp.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := mp.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := mp.contract.UnauthorizeWalletMaintainer( + transactorOptions, + arg_maintainerToUnauthorize, + ) + if err != nil { + return transaction, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "unauthorizeWalletMaintainer", + arg_maintainerToUnauthorize, + ) + } + + mpLogger.Infof( + "submitted transaction unauthorizeWalletMaintainer with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go mp.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := mp.contract.UnauthorizeWalletMaintainer( + newTransactorOptions, + arg_maintainerToUnauthorize, + ) + if err != nil { + return nil, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "unauthorizeWalletMaintainer", + arg_maintainerToUnauthorize, + ) + } + + mpLogger.Infof( + "submitted transaction unauthorizeWalletMaintainer with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + mp.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (mp *MaintainerProxy) CallUnauthorizeWalletMaintainer( + arg_maintainerToUnauthorize common.Address, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + mp.transactorOptions.From, + blockNumber, nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "unauthorizeWalletMaintainer", + &result, + arg_maintainerToUnauthorize, + ) + + return err +} + +func (mp *MaintainerProxy) UnauthorizeWalletMaintainerGasEstimate( + arg_maintainerToUnauthorize common.Address, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + mp.callerOptions.From, + mp.contractAddress, + "unauthorizeWalletMaintainer", + mp.contractABI, + mp.transactor, + arg_maintainerToUnauthorize, + ) + + return result, err +} + +// Transaction submission. +func (mp *MaintainerProxy) UpdateBridge( + arg__bridge common.Address, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + mpLogger.Debug( + "submitting transaction updateBridge", + " params: ", + fmt.Sprint( + arg__bridge, + ), + ) + + mp.transactionMutex.Lock() + defer mp.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *mp.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := mp.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := mp.contract.UpdateBridge( + transactorOptions, + arg__bridge, + ) + if err != nil { + return transaction, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "updateBridge", + arg__bridge, + ) + } + + mpLogger.Infof( + "submitted transaction updateBridge with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go mp.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := mp.contract.UpdateBridge( + newTransactorOptions, + arg__bridge, + ) + if err != nil { + return nil, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "updateBridge", + arg__bridge, + ) + } + + mpLogger.Infof( + "submitted transaction updateBridge with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + mp.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (mp *MaintainerProxy) CallUpdateBridge( + arg__bridge common.Address, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + mp.transactorOptions.From, + blockNumber, nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "updateBridge", + &result, + arg__bridge, + ) + + return err +} + +func (mp *MaintainerProxy) UpdateBridgeGasEstimate( + arg__bridge common.Address, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + mp.callerOptions.From, + mp.contractAddress, + "updateBridge", + mp.contractABI, + mp.transactor, + arg__bridge, + ) + + return result, err +} + +// Transaction submission. +func (mp *MaintainerProxy) UpdateGasOffsetParameters( + arg_newSubmitDepositSweepProofGasOffset *big.Int, + arg_newSubmitRedemptionProofGasOffset *big.Int, + arg_newResetMovingFundsTimeoutGasOffset *big.Int, + arg_newSubmitMovingFundsProofGasOffset *big.Int, + arg_newNotifyMovingFundsBelowDustGasOffset *big.Int, + arg_newSubmitMovedFundsSweepProofGasOffset *big.Int, + arg_newRequestNewWalletGasOffset *big.Int, + arg_newNotifyWalletCloseableGasOffset *big.Int, + arg_newNotifyWalletClosingPeriodElapsedGasOffset *big.Int, + arg_newDefeatFraudChallengeGasOffset *big.Int, + arg_newDefeatFraudChallengeWithHeartbeatGasOffset *big.Int, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + mpLogger.Debug( + "submitting transaction updateGasOffsetParameters", + " params: ", + fmt.Sprint( + arg_newSubmitDepositSweepProofGasOffset, + arg_newSubmitRedemptionProofGasOffset, + arg_newResetMovingFundsTimeoutGasOffset, + arg_newSubmitMovingFundsProofGasOffset, + arg_newNotifyMovingFundsBelowDustGasOffset, + arg_newSubmitMovedFundsSweepProofGasOffset, + arg_newRequestNewWalletGasOffset, + arg_newNotifyWalletCloseableGasOffset, + arg_newNotifyWalletClosingPeriodElapsedGasOffset, + arg_newDefeatFraudChallengeGasOffset, + arg_newDefeatFraudChallengeWithHeartbeatGasOffset, + ), + ) + + mp.transactionMutex.Lock() + defer mp.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *mp.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := mp.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := mp.contract.UpdateGasOffsetParameters( + transactorOptions, + arg_newSubmitDepositSweepProofGasOffset, + arg_newSubmitRedemptionProofGasOffset, + arg_newResetMovingFundsTimeoutGasOffset, + arg_newSubmitMovingFundsProofGasOffset, + arg_newNotifyMovingFundsBelowDustGasOffset, + arg_newSubmitMovedFundsSweepProofGasOffset, + arg_newRequestNewWalletGasOffset, + arg_newNotifyWalletCloseableGasOffset, + arg_newNotifyWalletClosingPeriodElapsedGasOffset, + arg_newDefeatFraudChallengeGasOffset, + arg_newDefeatFraudChallengeWithHeartbeatGasOffset, + ) + if err != nil { + return transaction, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "updateGasOffsetParameters", + arg_newSubmitDepositSweepProofGasOffset, + arg_newSubmitRedemptionProofGasOffset, + arg_newResetMovingFundsTimeoutGasOffset, + arg_newSubmitMovingFundsProofGasOffset, + arg_newNotifyMovingFundsBelowDustGasOffset, + arg_newSubmitMovedFundsSweepProofGasOffset, + arg_newRequestNewWalletGasOffset, + arg_newNotifyWalletCloseableGasOffset, + arg_newNotifyWalletClosingPeriodElapsedGasOffset, + arg_newDefeatFraudChallengeGasOffset, + arg_newDefeatFraudChallengeWithHeartbeatGasOffset, + ) + } + + mpLogger.Infof( + "submitted transaction updateGasOffsetParameters with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go mp.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := mp.contract.UpdateGasOffsetParameters( + newTransactorOptions, + arg_newSubmitDepositSweepProofGasOffset, + arg_newSubmitRedemptionProofGasOffset, + arg_newResetMovingFundsTimeoutGasOffset, + arg_newSubmitMovingFundsProofGasOffset, + arg_newNotifyMovingFundsBelowDustGasOffset, + arg_newSubmitMovedFundsSweepProofGasOffset, + arg_newRequestNewWalletGasOffset, + arg_newNotifyWalletCloseableGasOffset, + arg_newNotifyWalletClosingPeriodElapsedGasOffset, + arg_newDefeatFraudChallengeGasOffset, + arg_newDefeatFraudChallengeWithHeartbeatGasOffset, + ) + if err != nil { + return nil, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "updateGasOffsetParameters", + arg_newSubmitDepositSweepProofGasOffset, + arg_newSubmitRedemptionProofGasOffset, + arg_newResetMovingFundsTimeoutGasOffset, + arg_newSubmitMovingFundsProofGasOffset, + arg_newNotifyMovingFundsBelowDustGasOffset, + arg_newSubmitMovedFundsSweepProofGasOffset, + arg_newRequestNewWalletGasOffset, + arg_newNotifyWalletCloseableGasOffset, + arg_newNotifyWalletClosingPeriodElapsedGasOffset, + arg_newDefeatFraudChallengeGasOffset, + arg_newDefeatFraudChallengeWithHeartbeatGasOffset, + ) + } + + mpLogger.Infof( + "submitted transaction updateGasOffsetParameters with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + mp.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (mp *MaintainerProxy) CallUpdateGasOffsetParameters( + arg_newSubmitDepositSweepProofGasOffset *big.Int, + arg_newSubmitRedemptionProofGasOffset *big.Int, + arg_newResetMovingFundsTimeoutGasOffset *big.Int, + arg_newSubmitMovingFundsProofGasOffset *big.Int, + arg_newNotifyMovingFundsBelowDustGasOffset *big.Int, + arg_newSubmitMovedFundsSweepProofGasOffset *big.Int, + arg_newRequestNewWalletGasOffset *big.Int, + arg_newNotifyWalletCloseableGasOffset *big.Int, + arg_newNotifyWalletClosingPeriodElapsedGasOffset *big.Int, + arg_newDefeatFraudChallengeGasOffset *big.Int, + arg_newDefeatFraudChallengeWithHeartbeatGasOffset *big.Int, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + mp.transactorOptions.From, + blockNumber, nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "updateGasOffsetParameters", + &result, + arg_newSubmitDepositSweepProofGasOffset, + arg_newSubmitRedemptionProofGasOffset, + arg_newResetMovingFundsTimeoutGasOffset, + arg_newSubmitMovingFundsProofGasOffset, + arg_newNotifyMovingFundsBelowDustGasOffset, + arg_newSubmitMovedFundsSweepProofGasOffset, + arg_newRequestNewWalletGasOffset, + arg_newNotifyWalletCloseableGasOffset, + arg_newNotifyWalletClosingPeriodElapsedGasOffset, + arg_newDefeatFraudChallengeGasOffset, + arg_newDefeatFraudChallengeWithHeartbeatGasOffset, + ) + + return err +} + +func (mp *MaintainerProxy) UpdateGasOffsetParametersGasEstimate( + arg_newSubmitDepositSweepProofGasOffset *big.Int, + arg_newSubmitRedemptionProofGasOffset *big.Int, + arg_newResetMovingFundsTimeoutGasOffset *big.Int, + arg_newSubmitMovingFundsProofGasOffset *big.Int, + arg_newNotifyMovingFundsBelowDustGasOffset *big.Int, + arg_newSubmitMovedFundsSweepProofGasOffset *big.Int, + arg_newRequestNewWalletGasOffset *big.Int, + arg_newNotifyWalletCloseableGasOffset *big.Int, + arg_newNotifyWalletClosingPeriodElapsedGasOffset *big.Int, + arg_newDefeatFraudChallengeGasOffset *big.Int, + arg_newDefeatFraudChallengeWithHeartbeatGasOffset *big.Int, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + mp.callerOptions.From, + mp.contractAddress, + "updateGasOffsetParameters", + mp.contractABI, + mp.transactor, + arg_newSubmitDepositSweepProofGasOffset, + arg_newSubmitRedemptionProofGasOffset, + arg_newResetMovingFundsTimeoutGasOffset, + arg_newSubmitMovingFundsProofGasOffset, + arg_newNotifyMovingFundsBelowDustGasOffset, + arg_newSubmitMovedFundsSweepProofGasOffset, + arg_newRequestNewWalletGasOffset, + arg_newNotifyWalletCloseableGasOffset, + arg_newNotifyWalletClosingPeriodElapsedGasOffset, + arg_newDefeatFraudChallengeGasOffset, + arg_newDefeatFraudChallengeWithHeartbeatGasOffset, + ) + + return result, err +} + +// Transaction submission. +func (mp *MaintainerProxy) UpdateReimbursementPool( + arg__reimbursementPool common.Address, + + transactionOptions ...chainutil.TransactionOptions, +) (*types.Transaction, error) { + mpLogger.Debug( + "submitting transaction updateReimbursementPool", + " params: ", + fmt.Sprint( + arg__reimbursementPool, + ), + ) + + mp.transactionMutex.Lock() + defer mp.transactionMutex.Unlock() + + // create a copy + transactorOptions := new(bind.TransactOpts) + *transactorOptions = *mp.transactorOptions + + if len(transactionOptions) > 1 { + return nil, fmt.Errorf( + "could not process multiple transaction options sets", + ) + } else if len(transactionOptions) > 0 { + transactionOptions[0].Apply(transactorOptions) + } + + nonce, err := mp.nonceManager.CurrentNonce() + if err != nil { + return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) + } + + transactorOptions.Nonce = new(big.Int).SetUint64(nonce) + + transaction, err := mp.contract.UpdateReimbursementPool( + transactorOptions, + arg__reimbursementPool, + ) + if err != nil { + return transaction, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "updateReimbursementPool", + arg__reimbursementPool, + ) + } + + mpLogger.Infof( + "submitted transaction updateReimbursementPool with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + go mp.miningWaiter.ForceMining( + transaction, + transactorOptions, + func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { + // If original transactor options has a non-zero gas limit, that + // means the client code set it on their own. In that case, we + // should rewrite the gas limit from the original transaction + // for each resubmission. If the gas limit is not set by the client + // code, let the the submitter re-estimate the gas limit on each + // resubmission. + if transactorOptions.GasLimit != 0 { + newTransactorOptions.GasLimit = transactorOptions.GasLimit + } + + transaction, err := mp.contract.UpdateReimbursementPool( + newTransactorOptions, + arg__reimbursementPool, + ) + if err != nil { + return nil, mp.errorResolver.ResolveError( + err, + mp.transactorOptions.From, + nil, + "updateReimbursementPool", + arg__reimbursementPool, + ) + } + + mpLogger.Infof( + "submitted transaction updateReimbursementPool with id: [%s] and nonce [%v]", + transaction.Hash(), + transaction.Nonce(), + ) + + return transaction, nil + }, + ) + + mp.nonceManager.IncrementNonce() + + return transaction, err +} + +// Non-mutating call, not a transaction submission. +func (mp *MaintainerProxy) CallUpdateReimbursementPool( + arg__reimbursementPool common.Address, + blockNumber *big.Int, +) error { + var result interface{} = nil + + err := chainutil.CallAtBlock( + mp.transactorOptions.From, + blockNumber, nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "updateReimbursementPool", + &result, + arg__reimbursementPool, + ) + + return err +} + +func (mp *MaintainerProxy) UpdateReimbursementPoolGasEstimate( + arg__reimbursementPool common.Address, +) (uint64, error) { + var result uint64 + + result, err := chainutil.EstimateGas( + mp.callerOptions.From, + mp.contractAddress, + "updateReimbursementPool", + mp.contractABI, + mp.transactor, + arg__reimbursementPool, + ) + + return result, err +} + +// ----- Const Methods ------ + +func (mp *MaintainerProxy) AllSpvMaintainers() ([]common.Address, error) { + result, err := mp.contract.AllSpvMaintainers( + mp.callerOptions, + ) + + if err != nil { + return result, mp.errorResolver.ResolveError( + err, + mp.callerOptions.From, + nil, + "allSpvMaintainers", + ) + } + + return result, err +} + +func (mp *MaintainerProxy) AllSpvMaintainersAtBlock( + blockNumber *big.Int, +) ([]common.Address, error) { + var result []common.Address + + err := chainutil.CallAtBlock( + mp.callerOptions.From, + blockNumber, + nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "allSpvMaintainers", + &result, + ) + + return result, err +} + +func (mp *MaintainerProxy) AllWalletMaintainers() ([]common.Address, error) { + result, err := mp.contract.AllWalletMaintainers( + mp.callerOptions, + ) + + if err != nil { + return result, mp.errorResolver.ResolveError( + err, + mp.callerOptions.From, + nil, + "allWalletMaintainers", + ) + } + + return result, err +} + +func (mp *MaintainerProxy) AllWalletMaintainersAtBlock( + blockNumber *big.Int, +) ([]common.Address, error) { + var result []common.Address + + err := chainutil.CallAtBlock( + mp.callerOptions.From, + blockNumber, + nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "allWalletMaintainers", + &result, + ) + + return result, err +} + +func (mp *MaintainerProxy) Bridge() (common.Address, error) { + result, err := mp.contract.Bridge( + mp.callerOptions, + ) + + if err != nil { + return result, mp.errorResolver.ResolveError( + err, + mp.callerOptions.From, + nil, + "bridge", + ) + } + + return result, err +} + +func (mp *MaintainerProxy) BridgeAtBlock( + blockNumber *big.Int, +) (common.Address, error) { + var result common.Address + + err := chainutil.CallAtBlock( + mp.callerOptions.From, + blockNumber, + nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "bridge", + &result, + ) + + return result, err +} + +func (mp *MaintainerProxy) DefeatFraudChallengeGasOffset() (*big.Int, error) { + result, err := mp.contract.DefeatFraudChallengeGasOffset( + mp.callerOptions, + ) + + if err != nil { + return result, mp.errorResolver.ResolveError( + err, + mp.callerOptions.From, + nil, + "defeatFraudChallengeGasOffset", + ) + } + + return result, err +} + +func (mp *MaintainerProxy) DefeatFraudChallengeGasOffsetAtBlock( + blockNumber *big.Int, +) (*big.Int, error) { + var result *big.Int + + err := chainutil.CallAtBlock( + mp.callerOptions.From, + blockNumber, + nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "defeatFraudChallengeGasOffset", + &result, + ) + + return result, err +} + +func (mp *MaintainerProxy) DefeatFraudChallengeWithHeartbeatGasOffset() (*big.Int, error) { + result, err := mp.contract.DefeatFraudChallengeWithHeartbeatGasOffset( + mp.callerOptions, + ) + + if err != nil { + return result, mp.errorResolver.ResolveError( + err, + mp.callerOptions.From, + nil, + "defeatFraudChallengeWithHeartbeatGasOffset", + ) + } + + return result, err +} + +func (mp *MaintainerProxy) DefeatFraudChallengeWithHeartbeatGasOffsetAtBlock( + blockNumber *big.Int, +) (*big.Int, error) { + var result *big.Int + + err := chainutil.CallAtBlock( + mp.callerOptions.From, + blockNumber, + nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "defeatFraudChallengeWithHeartbeatGasOffset", + &result, + ) + + return result, err +} + +func (mp *MaintainerProxy) IsSpvMaintainer( + arg0 common.Address, +) (*big.Int, error) { + result, err := mp.contract.IsSpvMaintainer( + mp.callerOptions, + arg0, + ) + + if err != nil { + return result, mp.errorResolver.ResolveError( + err, + mp.callerOptions.From, + nil, + "isSpvMaintainer", + arg0, + ) + } + + return result, err +} + +func (mp *MaintainerProxy) IsSpvMaintainerAtBlock( + arg0 common.Address, + blockNumber *big.Int, +) (*big.Int, error) { + var result *big.Int + + err := chainutil.CallAtBlock( + mp.callerOptions.From, + blockNumber, + nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "isSpvMaintainer", + &result, + arg0, + ) + + return result, err +} + +func (mp *MaintainerProxy) IsWalletMaintainer( + arg0 common.Address, +) (*big.Int, error) { + result, err := mp.contract.IsWalletMaintainer( + mp.callerOptions, + arg0, + ) + + if err != nil { + return result, mp.errorResolver.ResolveError( + err, + mp.callerOptions.From, + nil, + "isWalletMaintainer", + arg0, + ) + } + + return result, err +} + +func (mp *MaintainerProxy) IsWalletMaintainerAtBlock( + arg0 common.Address, + blockNumber *big.Int, +) (*big.Int, error) { + var result *big.Int + + err := chainutil.CallAtBlock( + mp.callerOptions.From, + blockNumber, + nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "isWalletMaintainer", + &result, + arg0, + ) + + return result, err +} + +func (mp *MaintainerProxy) NotifyMovingFundsBelowDustGasOffset() (*big.Int, error) { + result, err := mp.contract.NotifyMovingFundsBelowDustGasOffset( + mp.callerOptions, + ) + + if err != nil { + return result, mp.errorResolver.ResolveError( + err, + mp.callerOptions.From, + nil, + "notifyMovingFundsBelowDustGasOffset", + ) + } + + return result, err +} + +func (mp *MaintainerProxy) NotifyMovingFundsBelowDustGasOffsetAtBlock( + blockNumber *big.Int, +) (*big.Int, error) { + var result *big.Int + + err := chainutil.CallAtBlock( + mp.callerOptions.From, + blockNumber, + nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "notifyMovingFundsBelowDustGasOffset", + &result, + ) + + return result, err +} + +func (mp *MaintainerProxy) NotifyWalletCloseableGasOffset() (*big.Int, error) { + result, err := mp.contract.NotifyWalletCloseableGasOffset( + mp.callerOptions, + ) + + if err != nil { + return result, mp.errorResolver.ResolveError( + err, + mp.callerOptions.From, + nil, + "notifyWalletCloseableGasOffset", + ) + } + + return result, err +} + +func (mp *MaintainerProxy) NotifyWalletCloseableGasOffsetAtBlock( + blockNumber *big.Int, +) (*big.Int, error) { + var result *big.Int + + err := chainutil.CallAtBlock( + mp.callerOptions.From, + blockNumber, + nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "notifyWalletCloseableGasOffset", + &result, + ) + + return result, err +} + +func (mp *MaintainerProxy) NotifyWalletClosingPeriodElapsedGasOffset() (*big.Int, error) { + result, err := mp.contract.NotifyWalletClosingPeriodElapsedGasOffset( + mp.callerOptions, + ) + + if err != nil { + return result, mp.errorResolver.ResolveError( + err, + mp.callerOptions.From, + nil, + "notifyWalletClosingPeriodElapsedGasOffset", + ) + } + + return result, err +} + +func (mp *MaintainerProxy) NotifyWalletClosingPeriodElapsedGasOffsetAtBlock( + blockNumber *big.Int, +) (*big.Int, error) { + var result *big.Int + + err := chainutil.CallAtBlock( + mp.callerOptions.From, + blockNumber, + nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "notifyWalletClosingPeriodElapsedGasOffset", + &result, + ) + + return result, err +} + +func (mp *MaintainerProxy) Owner() (common.Address, error) { + result, err := mp.contract.Owner( + mp.callerOptions, + ) + + if err != nil { + return result, mp.errorResolver.ResolveError( + err, + mp.callerOptions.From, + nil, + "owner", + ) + } + + return result, err +} + +func (mp *MaintainerProxy) OwnerAtBlock( + blockNumber *big.Int, +) (common.Address, error) { + var result common.Address + + err := chainutil.CallAtBlock( + mp.callerOptions.From, + blockNumber, + nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "owner", + &result, + ) + + return result, err +} + +func (mp *MaintainerProxy) ReimbursementPool() (common.Address, error) { + result, err := mp.contract.ReimbursementPool( + mp.callerOptions, + ) + + if err != nil { + return result, mp.errorResolver.ResolveError( + err, + mp.callerOptions.From, + nil, + "reimbursementPool", + ) + } + + return result, err +} + +func (mp *MaintainerProxy) ReimbursementPoolAtBlock( + blockNumber *big.Int, +) (common.Address, error) { + var result common.Address + + err := chainutil.CallAtBlock( + mp.callerOptions.From, + blockNumber, + nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "reimbursementPool", + &result, + ) + + return result, err +} + +func (mp *MaintainerProxy) RequestNewWalletGasOffset() (*big.Int, error) { + result, err := mp.contract.RequestNewWalletGasOffset( + mp.callerOptions, + ) + + if err != nil { + return result, mp.errorResolver.ResolveError( + err, + mp.callerOptions.From, + nil, + "requestNewWalletGasOffset", + ) + } + + return result, err +} + +func (mp *MaintainerProxy) RequestNewWalletGasOffsetAtBlock( + blockNumber *big.Int, +) (*big.Int, error) { + var result *big.Int + + err := chainutil.CallAtBlock( + mp.callerOptions.From, + blockNumber, + nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "requestNewWalletGasOffset", + &result, + ) + + return result, err +} + +func (mp *MaintainerProxy) ResetMovingFundsTimeoutGasOffset() (*big.Int, error) { + result, err := mp.contract.ResetMovingFundsTimeoutGasOffset( + mp.callerOptions, + ) + + if err != nil { + return result, mp.errorResolver.ResolveError( + err, + mp.callerOptions.From, + nil, + "resetMovingFundsTimeoutGasOffset", + ) + } + + return result, err +} + +func (mp *MaintainerProxy) ResetMovingFundsTimeoutGasOffsetAtBlock( + blockNumber *big.Int, +) (*big.Int, error) { + var result *big.Int + + err := chainutil.CallAtBlock( + mp.callerOptions.From, + blockNumber, + nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "resetMovingFundsTimeoutGasOffset", + &result, + ) + + return result, err +} + +func (mp *MaintainerProxy) SpvMaintainers( + arg0 *big.Int, +) (common.Address, error) { + result, err := mp.contract.SpvMaintainers( + mp.callerOptions, + arg0, + ) + + if err != nil { + return result, mp.errorResolver.ResolveError( + err, + mp.callerOptions.From, + nil, + "spvMaintainers", + arg0, + ) + } + + return result, err +} + +func (mp *MaintainerProxy) SpvMaintainersAtBlock( + arg0 *big.Int, + blockNumber *big.Int, +) (common.Address, error) { + var result common.Address + + err := chainutil.CallAtBlock( + mp.callerOptions.From, + blockNumber, + nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "spvMaintainers", + &result, + arg0, + ) + + return result, err +} + +func (mp *MaintainerProxy) SubmitDepositSweepProofGasOffset() (*big.Int, error) { + result, err := mp.contract.SubmitDepositSweepProofGasOffset( + mp.callerOptions, + ) + + if err != nil { + return result, mp.errorResolver.ResolveError( + err, + mp.callerOptions.From, + nil, + "submitDepositSweepProofGasOffset", + ) + } + + return result, err +} + +func (mp *MaintainerProxy) SubmitDepositSweepProofGasOffsetAtBlock( + blockNumber *big.Int, +) (*big.Int, error) { + var result *big.Int + + err := chainutil.CallAtBlock( + mp.callerOptions.From, + blockNumber, + nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "submitDepositSweepProofGasOffset", + &result, + ) + + return result, err +} + +func (mp *MaintainerProxy) SubmitMovedFundsSweepProofGasOffset() (*big.Int, error) { + result, err := mp.contract.SubmitMovedFundsSweepProofGasOffset( + mp.callerOptions, + ) + + if err != nil { + return result, mp.errorResolver.ResolveError( + err, + mp.callerOptions.From, + nil, + "submitMovedFundsSweepProofGasOffset", + ) + } + + return result, err +} + +func (mp *MaintainerProxy) SubmitMovedFundsSweepProofGasOffsetAtBlock( + blockNumber *big.Int, +) (*big.Int, error) { + var result *big.Int + + err := chainutil.CallAtBlock( + mp.callerOptions.From, + blockNumber, + nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "submitMovedFundsSweepProofGasOffset", + &result, + ) + + return result, err +} + +func (mp *MaintainerProxy) SubmitMovingFundsProofGasOffset() (*big.Int, error) { + result, err := mp.contract.SubmitMovingFundsProofGasOffset( + mp.callerOptions, + ) + + if err != nil { + return result, mp.errorResolver.ResolveError( + err, + mp.callerOptions.From, + nil, + "submitMovingFundsProofGasOffset", + ) + } + + return result, err +} + +func (mp *MaintainerProxy) SubmitMovingFundsProofGasOffsetAtBlock( + blockNumber *big.Int, +) (*big.Int, error) { + var result *big.Int + + err := chainutil.CallAtBlock( + mp.callerOptions.From, + blockNumber, + nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "submitMovingFundsProofGasOffset", + &result, + ) + + return result, err +} + +func (mp *MaintainerProxy) SubmitRedemptionProofGasOffset() (*big.Int, error) { + result, err := mp.contract.SubmitRedemptionProofGasOffset( + mp.callerOptions, + ) + + if err != nil { + return result, mp.errorResolver.ResolveError( + err, + mp.callerOptions.From, + nil, + "submitRedemptionProofGasOffset", + ) + } + + return result, err +} + +func (mp *MaintainerProxy) SubmitRedemptionProofGasOffsetAtBlock( + blockNumber *big.Int, +) (*big.Int, error) { + var result *big.Int + + err := chainutil.CallAtBlock( + mp.callerOptions.From, + blockNumber, + nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "submitRedemptionProofGasOffset", + &result, + ) + + return result, err +} + +func (mp *MaintainerProxy) WalletMaintainers( + arg0 *big.Int, +) (common.Address, error) { + result, err := mp.contract.WalletMaintainers( + mp.callerOptions, + arg0, + ) + + if err != nil { + return result, mp.errorResolver.ResolveError( + err, + mp.callerOptions.From, + nil, + "walletMaintainers", + arg0, + ) + } + + return result, err +} + +func (mp *MaintainerProxy) WalletMaintainersAtBlock( + arg0 *big.Int, + blockNumber *big.Int, +) (common.Address, error) { + var result common.Address + + err := chainutil.CallAtBlock( + mp.callerOptions.From, + blockNumber, + nil, + mp.contractABI, + mp.caller, + mp.errorResolver, + mp.contractAddress, + "walletMaintainers", + &result, + arg0, + ) + + return result, err +} + +// ------ Events ------- + +func (mp *MaintainerProxy) BridgeUpdatedEvent( + opts *ethereum.SubscribeOpts, +) *MpBridgeUpdatedSubscription { + if opts == nil { + opts = new(ethereum.SubscribeOpts) + } + if opts.Tick == 0 { + opts.Tick = chainutil.DefaultSubscribeOptsTick + } + if opts.PastBlocks == 0 { + opts.PastBlocks = chainutil.DefaultSubscribeOptsPastBlocks + } + + return &MpBridgeUpdatedSubscription{ + mp, + opts, + } +} + +type MpBridgeUpdatedSubscription struct { + contract *MaintainerProxy + opts *ethereum.SubscribeOpts +} + +type maintainerProxyBridgeUpdatedFunc func( + NewBridge common.Address, + blockNumber uint64, +) + +func (bus *MpBridgeUpdatedSubscription) OnEvent( + handler maintainerProxyBridgeUpdatedFunc, +) subscription.EventSubscription { + eventChan := make(chan *abi.MaintainerProxyBridgeUpdated) + ctx, cancelCtx := context.WithCancel(context.Background()) + + go func() { + for { + select { + case <-ctx.Done(): + return + case event := <-eventChan: + handler( + event.NewBridge, + event.Raw.BlockNumber, + ) + } + } + }() + + sub := bus.Pipe(eventChan) + return subscription.NewEventSubscription(func() { + sub.Unsubscribe() + cancelCtx() + }) +} + +func (bus *MpBridgeUpdatedSubscription) Pipe( + sink chan *abi.MaintainerProxyBridgeUpdated, +) subscription.EventSubscription { + ctx, cancelCtx := context.WithCancel(context.Background()) + go func() { + ticker := time.NewTicker(bus.opts.Tick) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + lastBlock, err := bus.contract.blockCounter.CurrentBlock() + if err != nil { + mpLogger.Errorf( + "subscription failed to pull events: [%v]", + err, + ) + } + fromBlock := lastBlock - bus.opts.PastBlocks + + mpLogger.Infof( + "subscription monitoring fetching past BridgeUpdated events "+ + "starting from block [%v]", + fromBlock, + ) + events, err := bus.contract.PastBridgeUpdatedEvents( + fromBlock, + nil, + ) + if err != nil { + mpLogger.Errorf( + "subscription failed to pull events: [%v]", + err, + ) + continue + } + mpLogger.Infof( + "subscription monitoring fetched [%v] past BridgeUpdated events", + len(events), + ) + + for _, event := range events { + sink <- event + } + } + } + }() + + sub := bus.contract.watchBridgeUpdated( + sink, + ) + + return subscription.NewEventSubscription(func() { + sub.Unsubscribe() + cancelCtx() + }) +} + +func (mp *MaintainerProxy) watchBridgeUpdated( + sink chan *abi.MaintainerProxyBridgeUpdated, +) event.Subscription { + subscribeFn := func(ctx context.Context) (event.Subscription, error) { + return mp.contract.WatchBridgeUpdated( + &bind.WatchOpts{Context: ctx}, + sink, + ) + } + + thresholdViolatedFn := func(elapsed time.Duration) { + mpLogger.Warnf( + "subscription to event BridgeUpdated had to be "+ + "retried [%s] since the last attempt; please inspect "+ + "host chain connectivity", + elapsed, + ) + } + + subscriptionFailedFn := func(err error) { + mpLogger.Errorf( + "subscription to event BridgeUpdated failed "+ + "with error: [%v]; resubscription attempt will be "+ + "performed", + err, + ) + } + + return chainutil.WithResubscription( + chainutil.SubscriptionBackoffMax, + subscribeFn, + chainutil.SubscriptionAlertThreshold, + thresholdViolatedFn, + subscriptionFailedFn, + ) +} + +func (mp *MaintainerProxy) PastBridgeUpdatedEvents( + startBlock uint64, + endBlock *uint64, +) ([]*abi.MaintainerProxyBridgeUpdated, error) { + iterator, err := mp.contract.FilterBridgeUpdated( + &bind.FilterOpts{ + Start: startBlock, + End: endBlock, + }, + ) + if err != nil { + return nil, fmt.Errorf( + "error retrieving past BridgeUpdated events: [%v]", + err, + ) + } + + events := make([]*abi.MaintainerProxyBridgeUpdated, 0) + + for iterator.Next() { + event := iterator.Event + events = append(events, event) + } + + return events, nil +} + +func (mp *MaintainerProxy) GasOffsetParametersUpdatedEvent( + opts *ethereum.SubscribeOpts, +) *MpGasOffsetParametersUpdatedSubscription { + if opts == nil { + opts = new(ethereum.SubscribeOpts) + } + if opts.Tick == 0 { + opts.Tick = chainutil.DefaultSubscribeOptsTick + } + if opts.PastBlocks == 0 { + opts.PastBlocks = chainutil.DefaultSubscribeOptsPastBlocks + } + + return &MpGasOffsetParametersUpdatedSubscription{ + mp, + opts, + } +} + +type MpGasOffsetParametersUpdatedSubscription struct { + contract *MaintainerProxy + opts *ethereum.SubscribeOpts +} + +type maintainerProxyGasOffsetParametersUpdatedFunc func( + SubmitDepositSweepProofGasOffset *big.Int, + SubmitRedemptionProofGasOffset *big.Int, + ResetMovingFundsTimeoutGasOffset *big.Int, + SubmitMovingFundsProofGasOffset *big.Int, + NotifyMovingFundsBelowDustGasOffset *big.Int, + SubmitMovedFundsSweepProofGasOffset *big.Int, + RequestNewWalletGasOffset *big.Int, + NotifyWalletCloseableGasOffset *big.Int, + NotifyWalletClosingPeriodElapsedGasOffset *big.Int, + DefeatFraudChallengeGasOffset *big.Int, + DefeatFraudChallengeWithHeartbeatGasOffset *big.Int, + blockNumber uint64, +) + +func (gopus *MpGasOffsetParametersUpdatedSubscription) OnEvent( + handler maintainerProxyGasOffsetParametersUpdatedFunc, +) subscription.EventSubscription { + eventChan := make(chan *abi.MaintainerProxyGasOffsetParametersUpdated) + ctx, cancelCtx := context.WithCancel(context.Background()) + + go func() { + for { + select { + case <-ctx.Done(): + return + case event := <-eventChan: + handler( + event.SubmitDepositSweepProofGasOffset, + event.SubmitRedemptionProofGasOffset, + event.ResetMovingFundsTimeoutGasOffset, + event.SubmitMovingFundsProofGasOffset, + event.NotifyMovingFundsBelowDustGasOffset, + event.SubmitMovedFundsSweepProofGasOffset, + event.RequestNewWalletGasOffset, + event.NotifyWalletCloseableGasOffset, + event.NotifyWalletClosingPeriodElapsedGasOffset, + event.DefeatFraudChallengeGasOffset, + event.DefeatFraudChallengeWithHeartbeatGasOffset, + event.Raw.BlockNumber, + ) + } + } + }() + + sub := gopus.Pipe(eventChan) + return subscription.NewEventSubscription(func() { + sub.Unsubscribe() + cancelCtx() + }) +} + +func (gopus *MpGasOffsetParametersUpdatedSubscription) Pipe( + sink chan *abi.MaintainerProxyGasOffsetParametersUpdated, +) subscription.EventSubscription { + ctx, cancelCtx := context.WithCancel(context.Background()) + go func() { + ticker := time.NewTicker(gopus.opts.Tick) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + lastBlock, err := gopus.contract.blockCounter.CurrentBlock() + if err != nil { + mpLogger.Errorf( + "subscription failed to pull events: [%v]", + err, + ) + } + fromBlock := lastBlock - gopus.opts.PastBlocks + + mpLogger.Infof( + "subscription monitoring fetching past GasOffsetParametersUpdated events "+ + "starting from block [%v]", + fromBlock, + ) + events, err := gopus.contract.PastGasOffsetParametersUpdatedEvents( + fromBlock, + nil, + ) + if err != nil { + mpLogger.Errorf( + "subscription failed to pull events: [%v]", + err, + ) + continue + } + mpLogger.Infof( + "subscription monitoring fetched [%v] past GasOffsetParametersUpdated events", + len(events), + ) + + for _, event := range events { + sink <- event + } + } + } + }() + + sub := gopus.contract.watchGasOffsetParametersUpdated( + sink, + ) + + return subscription.NewEventSubscription(func() { + sub.Unsubscribe() + cancelCtx() + }) +} + +func (mp *MaintainerProxy) watchGasOffsetParametersUpdated( + sink chan *abi.MaintainerProxyGasOffsetParametersUpdated, +) event.Subscription { + subscribeFn := func(ctx context.Context) (event.Subscription, error) { + return mp.contract.WatchGasOffsetParametersUpdated( + &bind.WatchOpts{Context: ctx}, + sink, + ) + } + + thresholdViolatedFn := func(elapsed time.Duration) { + mpLogger.Warnf( + "subscription to event GasOffsetParametersUpdated had to be "+ + "retried [%s] since the last attempt; please inspect "+ + "host chain connectivity", + elapsed, + ) + } + + subscriptionFailedFn := func(err error) { + mpLogger.Errorf( + "subscription to event GasOffsetParametersUpdated failed "+ + "with error: [%v]; resubscription attempt will be "+ + "performed", + err, + ) + } + + return chainutil.WithResubscription( + chainutil.SubscriptionBackoffMax, + subscribeFn, + chainutil.SubscriptionAlertThreshold, + thresholdViolatedFn, + subscriptionFailedFn, + ) +} + +func (mp *MaintainerProxy) PastGasOffsetParametersUpdatedEvents( + startBlock uint64, + endBlock *uint64, +) ([]*abi.MaintainerProxyGasOffsetParametersUpdated, error) { + iterator, err := mp.contract.FilterGasOffsetParametersUpdated( + &bind.FilterOpts{ + Start: startBlock, + End: endBlock, + }, + ) + if err != nil { + return nil, fmt.Errorf( + "error retrieving past GasOffsetParametersUpdated events: [%v]", + err, + ) + } + + events := make([]*abi.MaintainerProxyGasOffsetParametersUpdated, 0) + + for iterator.Next() { + event := iterator.Event + events = append(events, event) + } + + return events, nil +} + +func (mp *MaintainerProxy) OwnershipTransferredEvent( + opts *ethereum.SubscribeOpts, + previousOwnerFilter []common.Address, + newOwnerFilter []common.Address, +) *MpOwnershipTransferredSubscription { + if opts == nil { + opts = new(ethereum.SubscribeOpts) + } + if opts.Tick == 0 { + opts.Tick = chainutil.DefaultSubscribeOptsTick + } + if opts.PastBlocks == 0 { + opts.PastBlocks = chainutil.DefaultSubscribeOptsPastBlocks + } + + return &MpOwnershipTransferredSubscription{ + mp, + opts, + previousOwnerFilter, + newOwnerFilter, + } +} + +type MpOwnershipTransferredSubscription struct { + contract *MaintainerProxy + opts *ethereum.SubscribeOpts + previousOwnerFilter []common.Address + newOwnerFilter []common.Address +} + +type maintainerProxyOwnershipTransferredFunc func( + PreviousOwner common.Address, + NewOwner common.Address, + blockNumber uint64, +) + +func (ots *MpOwnershipTransferredSubscription) OnEvent( + handler maintainerProxyOwnershipTransferredFunc, +) subscription.EventSubscription { + eventChan := make(chan *abi.MaintainerProxyOwnershipTransferred) + ctx, cancelCtx := context.WithCancel(context.Background()) + + go func() { + for { + select { + case <-ctx.Done(): + return + case event := <-eventChan: + handler( + event.PreviousOwner, + event.NewOwner, + event.Raw.BlockNumber, + ) + } + } + }() + + sub := ots.Pipe(eventChan) + return subscription.NewEventSubscription(func() { + sub.Unsubscribe() + cancelCtx() + }) +} + +func (ots *MpOwnershipTransferredSubscription) Pipe( + sink chan *abi.MaintainerProxyOwnershipTransferred, +) subscription.EventSubscription { + ctx, cancelCtx := context.WithCancel(context.Background()) + go func() { + ticker := time.NewTicker(ots.opts.Tick) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + lastBlock, err := ots.contract.blockCounter.CurrentBlock() + if err != nil { + mpLogger.Errorf( + "subscription failed to pull events: [%v]", + err, + ) + } + fromBlock := lastBlock - ots.opts.PastBlocks + + mpLogger.Infof( + "subscription monitoring fetching past OwnershipTransferred events "+ + "starting from block [%v]", + fromBlock, + ) + events, err := ots.contract.PastOwnershipTransferredEvents( + fromBlock, + nil, + ots.previousOwnerFilter, + ots.newOwnerFilter, + ) + if err != nil { + mpLogger.Errorf( + "subscription failed to pull events: [%v]", + err, + ) + continue + } + mpLogger.Infof( + "subscription monitoring fetched [%v] past OwnershipTransferred events", + len(events), + ) + + for _, event := range events { + sink <- event + } + } + } + }() + + sub := ots.contract.watchOwnershipTransferred( + sink, + ots.previousOwnerFilter, + ots.newOwnerFilter, + ) + + return subscription.NewEventSubscription(func() { + sub.Unsubscribe() + cancelCtx() + }) +} + +func (mp *MaintainerProxy) watchOwnershipTransferred( + sink chan *abi.MaintainerProxyOwnershipTransferred, + previousOwnerFilter []common.Address, + newOwnerFilter []common.Address, +) event.Subscription { + subscribeFn := func(ctx context.Context) (event.Subscription, error) { + return mp.contract.WatchOwnershipTransferred( + &bind.WatchOpts{Context: ctx}, + sink, + previousOwnerFilter, + newOwnerFilter, + ) + } + + thresholdViolatedFn := func(elapsed time.Duration) { + mpLogger.Warnf( + "subscription to event OwnershipTransferred had to be "+ + "retried [%s] since the last attempt; please inspect "+ + "host chain connectivity", + elapsed, + ) + } + + subscriptionFailedFn := func(err error) { + mpLogger.Errorf( + "subscription to event OwnershipTransferred failed "+ + "with error: [%v]; resubscription attempt will be "+ + "performed", + err, + ) + } + + return chainutil.WithResubscription( + chainutil.SubscriptionBackoffMax, + subscribeFn, + chainutil.SubscriptionAlertThreshold, + thresholdViolatedFn, + subscriptionFailedFn, + ) +} + +func (mp *MaintainerProxy) PastOwnershipTransferredEvents( + startBlock uint64, + endBlock *uint64, + previousOwnerFilter []common.Address, + newOwnerFilter []common.Address, +) ([]*abi.MaintainerProxyOwnershipTransferred, error) { + iterator, err := mp.contract.FilterOwnershipTransferred( + &bind.FilterOpts{ + Start: startBlock, + End: endBlock, + }, + previousOwnerFilter, + newOwnerFilter, + ) + if err != nil { + return nil, fmt.Errorf( + "error retrieving past OwnershipTransferred events: [%v]", + err, + ) + } + + events := make([]*abi.MaintainerProxyOwnershipTransferred, 0) + + for iterator.Next() { + event := iterator.Event + events = append(events, event) + } + + return events, nil +} + +func (mp *MaintainerProxy) ReimbursementPoolUpdatedEvent( + opts *ethereum.SubscribeOpts, +) *MpReimbursementPoolUpdatedSubscription { + if opts == nil { + opts = new(ethereum.SubscribeOpts) + } + if opts.Tick == 0 { + opts.Tick = chainutil.DefaultSubscribeOptsTick + } + if opts.PastBlocks == 0 { + opts.PastBlocks = chainutil.DefaultSubscribeOptsPastBlocks + } + + return &MpReimbursementPoolUpdatedSubscription{ + mp, + opts, + } +} + +type MpReimbursementPoolUpdatedSubscription struct { + contract *MaintainerProxy + opts *ethereum.SubscribeOpts +} + +type maintainerProxyReimbursementPoolUpdatedFunc func( + NewReimbursementPool common.Address, + blockNumber uint64, +) + +func (rpus *MpReimbursementPoolUpdatedSubscription) OnEvent( + handler maintainerProxyReimbursementPoolUpdatedFunc, +) subscription.EventSubscription { + eventChan := make(chan *abi.MaintainerProxyReimbursementPoolUpdated) + ctx, cancelCtx := context.WithCancel(context.Background()) + + go func() { + for { + select { + case <-ctx.Done(): + return + case event := <-eventChan: + handler( + event.NewReimbursementPool, + event.Raw.BlockNumber, + ) + } + } + }() + + sub := rpus.Pipe(eventChan) + return subscription.NewEventSubscription(func() { + sub.Unsubscribe() + cancelCtx() + }) +} + +func (rpus *MpReimbursementPoolUpdatedSubscription) Pipe( + sink chan *abi.MaintainerProxyReimbursementPoolUpdated, +) subscription.EventSubscription { + ctx, cancelCtx := context.WithCancel(context.Background()) + go func() { + ticker := time.NewTicker(rpus.opts.Tick) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + lastBlock, err := rpus.contract.blockCounter.CurrentBlock() + if err != nil { + mpLogger.Errorf( + "subscription failed to pull events: [%v]", + err, + ) + } + fromBlock := lastBlock - rpus.opts.PastBlocks + + mpLogger.Infof( + "subscription monitoring fetching past ReimbursementPoolUpdated events "+ + "starting from block [%v]", + fromBlock, + ) + events, err := rpus.contract.PastReimbursementPoolUpdatedEvents( + fromBlock, + nil, + ) + if err != nil { + mpLogger.Errorf( + "subscription failed to pull events: [%v]", + err, + ) + continue + } + mpLogger.Infof( + "subscription monitoring fetched [%v] past ReimbursementPoolUpdated events", + len(events), + ) + + for _, event := range events { + sink <- event + } + } + } + }() + + sub := rpus.contract.watchReimbursementPoolUpdated( + sink, + ) + + return subscription.NewEventSubscription(func() { + sub.Unsubscribe() + cancelCtx() + }) +} + +func (mp *MaintainerProxy) watchReimbursementPoolUpdated( + sink chan *abi.MaintainerProxyReimbursementPoolUpdated, +) event.Subscription { + subscribeFn := func(ctx context.Context) (event.Subscription, error) { + return mp.contract.WatchReimbursementPoolUpdated( + &bind.WatchOpts{Context: ctx}, + sink, + ) + } + + thresholdViolatedFn := func(elapsed time.Duration) { + mpLogger.Warnf( + "subscription to event ReimbursementPoolUpdated had to be "+ + "retried [%s] since the last attempt; please inspect "+ + "host chain connectivity", + elapsed, + ) + } + + subscriptionFailedFn := func(err error) { + mpLogger.Errorf( + "subscription to event ReimbursementPoolUpdated failed "+ + "with error: [%v]; resubscription attempt will be "+ + "performed", + err, + ) + } + + return chainutil.WithResubscription( + chainutil.SubscriptionBackoffMax, + subscribeFn, + chainutil.SubscriptionAlertThreshold, + thresholdViolatedFn, + subscriptionFailedFn, + ) +} + +func (mp *MaintainerProxy) PastReimbursementPoolUpdatedEvents( + startBlock uint64, + endBlock *uint64, +) ([]*abi.MaintainerProxyReimbursementPoolUpdated, error) { + iterator, err := mp.contract.FilterReimbursementPoolUpdated( + &bind.FilterOpts{ + Start: startBlock, + End: endBlock, + }, + ) + if err != nil { + return nil, fmt.Errorf( + "error retrieving past ReimbursementPoolUpdated events: [%v]", + err, + ) + } + + events := make([]*abi.MaintainerProxyReimbursementPoolUpdated, 0) + + for iterator.Next() { + event := iterator.Event + events = append(events, event) + } + + return events, nil +} + +func (mp *MaintainerProxy) SpvMaintainerAuthorizedEvent( + opts *ethereum.SubscribeOpts, + maintainerFilter []common.Address, +) *MpSpvMaintainerAuthorizedSubscription { + if opts == nil { + opts = new(ethereum.SubscribeOpts) + } + if opts.Tick == 0 { + opts.Tick = chainutil.DefaultSubscribeOptsTick + } + if opts.PastBlocks == 0 { + opts.PastBlocks = chainutil.DefaultSubscribeOptsPastBlocks + } + + return &MpSpvMaintainerAuthorizedSubscription{ + mp, + opts, + maintainerFilter, + } +} + +type MpSpvMaintainerAuthorizedSubscription struct { + contract *MaintainerProxy + opts *ethereum.SubscribeOpts + maintainerFilter []common.Address +} + +type maintainerProxySpvMaintainerAuthorizedFunc func( + Maintainer common.Address, + blockNumber uint64, +) + +func (smas *MpSpvMaintainerAuthorizedSubscription) OnEvent( + handler maintainerProxySpvMaintainerAuthorizedFunc, +) subscription.EventSubscription { + eventChan := make(chan *abi.MaintainerProxySpvMaintainerAuthorized) + ctx, cancelCtx := context.WithCancel(context.Background()) + + go func() { + for { + select { + case <-ctx.Done(): + return + case event := <-eventChan: + handler( + event.Maintainer, + event.Raw.BlockNumber, + ) + } + } + }() + + sub := smas.Pipe(eventChan) + return subscription.NewEventSubscription(func() { + sub.Unsubscribe() + cancelCtx() + }) +} + +func (smas *MpSpvMaintainerAuthorizedSubscription) Pipe( + sink chan *abi.MaintainerProxySpvMaintainerAuthorized, +) subscription.EventSubscription { + ctx, cancelCtx := context.WithCancel(context.Background()) + go func() { + ticker := time.NewTicker(smas.opts.Tick) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + lastBlock, err := smas.contract.blockCounter.CurrentBlock() + if err != nil { + mpLogger.Errorf( + "subscription failed to pull events: [%v]", + err, + ) + } + fromBlock := lastBlock - smas.opts.PastBlocks + + mpLogger.Infof( + "subscription monitoring fetching past SpvMaintainerAuthorized events "+ + "starting from block [%v]", + fromBlock, + ) + events, err := smas.contract.PastSpvMaintainerAuthorizedEvents( + fromBlock, + nil, + smas.maintainerFilter, + ) + if err != nil { + mpLogger.Errorf( + "subscription failed to pull events: [%v]", + err, + ) + continue + } + mpLogger.Infof( + "subscription monitoring fetched [%v] past SpvMaintainerAuthorized events", + len(events), + ) + + for _, event := range events { + sink <- event + } + } + } + }() + + sub := smas.contract.watchSpvMaintainerAuthorized( + sink, + smas.maintainerFilter, + ) + + return subscription.NewEventSubscription(func() { + sub.Unsubscribe() + cancelCtx() + }) +} + +func (mp *MaintainerProxy) watchSpvMaintainerAuthorized( + sink chan *abi.MaintainerProxySpvMaintainerAuthorized, + maintainerFilter []common.Address, +) event.Subscription { + subscribeFn := func(ctx context.Context) (event.Subscription, error) { + return mp.contract.WatchSpvMaintainerAuthorized( + &bind.WatchOpts{Context: ctx}, + sink, + maintainerFilter, + ) + } + + thresholdViolatedFn := func(elapsed time.Duration) { + mpLogger.Warnf( + "subscription to event SpvMaintainerAuthorized had to be "+ + "retried [%s] since the last attempt; please inspect "+ + "host chain connectivity", + elapsed, + ) + } + + subscriptionFailedFn := func(err error) { + mpLogger.Errorf( + "subscription to event SpvMaintainerAuthorized failed "+ + "with error: [%v]; resubscription attempt will be "+ + "performed", + err, + ) + } + + return chainutil.WithResubscription( + chainutil.SubscriptionBackoffMax, + subscribeFn, + chainutil.SubscriptionAlertThreshold, + thresholdViolatedFn, + subscriptionFailedFn, + ) +} + +func (mp *MaintainerProxy) PastSpvMaintainerAuthorizedEvents( + startBlock uint64, + endBlock *uint64, + maintainerFilter []common.Address, +) ([]*abi.MaintainerProxySpvMaintainerAuthorized, error) { + iterator, err := mp.contract.FilterSpvMaintainerAuthorized( + &bind.FilterOpts{ + Start: startBlock, + End: endBlock, + }, + maintainerFilter, + ) + if err != nil { + return nil, fmt.Errorf( + "error retrieving past SpvMaintainerAuthorized events: [%v]", + err, + ) + } + + events := make([]*abi.MaintainerProxySpvMaintainerAuthorized, 0) + + for iterator.Next() { + event := iterator.Event + events = append(events, event) + } + + return events, nil +} + +func (mp *MaintainerProxy) SpvMaintainerUnauthorizedEvent( + opts *ethereum.SubscribeOpts, + maintainerFilter []common.Address, +) *MpSpvMaintainerUnauthorizedSubscription { + if opts == nil { + opts = new(ethereum.SubscribeOpts) + } + if opts.Tick == 0 { + opts.Tick = chainutil.DefaultSubscribeOptsTick + } + if opts.PastBlocks == 0 { + opts.PastBlocks = chainutil.DefaultSubscribeOptsPastBlocks + } + + return &MpSpvMaintainerUnauthorizedSubscription{ + mp, + opts, + maintainerFilter, + } +} + +type MpSpvMaintainerUnauthorizedSubscription struct { + contract *MaintainerProxy + opts *ethereum.SubscribeOpts + maintainerFilter []common.Address +} + +type maintainerProxySpvMaintainerUnauthorizedFunc func( + Maintainer common.Address, + blockNumber uint64, +) + +func (smus *MpSpvMaintainerUnauthorizedSubscription) OnEvent( + handler maintainerProxySpvMaintainerUnauthorizedFunc, +) subscription.EventSubscription { + eventChan := make(chan *abi.MaintainerProxySpvMaintainerUnauthorized) + ctx, cancelCtx := context.WithCancel(context.Background()) + + go func() { + for { + select { + case <-ctx.Done(): + return + case event := <-eventChan: + handler( + event.Maintainer, + event.Raw.BlockNumber, + ) + } + } + }() + + sub := smus.Pipe(eventChan) + return subscription.NewEventSubscription(func() { + sub.Unsubscribe() + cancelCtx() + }) +} + +func (smus *MpSpvMaintainerUnauthorizedSubscription) Pipe( + sink chan *abi.MaintainerProxySpvMaintainerUnauthorized, +) subscription.EventSubscription { + ctx, cancelCtx := context.WithCancel(context.Background()) + go func() { + ticker := time.NewTicker(smus.opts.Tick) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + lastBlock, err := smus.contract.blockCounter.CurrentBlock() + if err != nil { + mpLogger.Errorf( + "subscription failed to pull events: [%v]", + err, + ) + } + fromBlock := lastBlock - smus.opts.PastBlocks + + mpLogger.Infof( + "subscription monitoring fetching past SpvMaintainerUnauthorized events "+ + "starting from block [%v]", + fromBlock, + ) + events, err := smus.contract.PastSpvMaintainerUnauthorizedEvents( + fromBlock, + nil, + smus.maintainerFilter, + ) + if err != nil { + mpLogger.Errorf( + "subscription failed to pull events: [%v]", + err, + ) + continue + } + mpLogger.Infof( + "subscription monitoring fetched [%v] past SpvMaintainerUnauthorized events", + len(events), + ) + + for _, event := range events { + sink <- event + } + } + } + }() + + sub := smus.contract.watchSpvMaintainerUnauthorized( + sink, + smus.maintainerFilter, + ) + + return subscription.NewEventSubscription(func() { + sub.Unsubscribe() + cancelCtx() + }) +} + +func (mp *MaintainerProxy) watchSpvMaintainerUnauthorized( + sink chan *abi.MaintainerProxySpvMaintainerUnauthorized, + maintainerFilter []common.Address, +) event.Subscription { + subscribeFn := func(ctx context.Context) (event.Subscription, error) { + return mp.contract.WatchSpvMaintainerUnauthorized( + &bind.WatchOpts{Context: ctx}, + sink, + maintainerFilter, + ) + } + + thresholdViolatedFn := func(elapsed time.Duration) { + mpLogger.Warnf( + "subscription to event SpvMaintainerUnauthorized had to be "+ + "retried [%s] since the last attempt; please inspect "+ + "host chain connectivity", + elapsed, + ) + } + + subscriptionFailedFn := func(err error) { + mpLogger.Errorf( + "subscription to event SpvMaintainerUnauthorized failed "+ + "with error: [%v]; resubscription attempt will be "+ + "performed", + err, + ) + } + + return chainutil.WithResubscription( + chainutil.SubscriptionBackoffMax, + subscribeFn, + chainutil.SubscriptionAlertThreshold, + thresholdViolatedFn, + subscriptionFailedFn, + ) +} + +func (mp *MaintainerProxy) PastSpvMaintainerUnauthorizedEvents( + startBlock uint64, + endBlock *uint64, + maintainerFilter []common.Address, +) ([]*abi.MaintainerProxySpvMaintainerUnauthorized, error) { + iterator, err := mp.contract.FilterSpvMaintainerUnauthorized( + &bind.FilterOpts{ + Start: startBlock, + End: endBlock, + }, + maintainerFilter, + ) + if err != nil { + return nil, fmt.Errorf( + "error retrieving past SpvMaintainerUnauthorized events: [%v]", + err, + ) + } + + events := make([]*abi.MaintainerProxySpvMaintainerUnauthorized, 0) + + for iterator.Next() { + event := iterator.Event + events = append(events, event) + } + + return events, nil +} + +func (mp *MaintainerProxy) WalletMaintainerAuthorizedEvent( + opts *ethereum.SubscribeOpts, + maintainerFilter []common.Address, +) *MpWalletMaintainerAuthorizedSubscription { + if opts == nil { + opts = new(ethereum.SubscribeOpts) + } + if opts.Tick == 0 { + opts.Tick = chainutil.DefaultSubscribeOptsTick + } + if opts.PastBlocks == 0 { + opts.PastBlocks = chainutil.DefaultSubscribeOptsPastBlocks + } + + return &MpWalletMaintainerAuthorizedSubscription{ + mp, + opts, + maintainerFilter, + } +} + +type MpWalletMaintainerAuthorizedSubscription struct { + contract *MaintainerProxy + opts *ethereum.SubscribeOpts + maintainerFilter []common.Address +} + +type maintainerProxyWalletMaintainerAuthorizedFunc func( + Maintainer common.Address, + blockNumber uint64, +) + +func (wmas *MpWalletMaintainerAuthorizedSubscription) OnEvent( + handler maintainerProxyWalletMaintainerAuthorizedFunc, +) subscription.EventSubscription { + eventChan := make(chan *abi.MaintainerProxyWalletMaintainerAuthorized) + ctx, cancelCtx := context.WithCancel(context.Background()) + + go func() { + for { + select { + case <-ctx.Done(): + return + case event := <-eventChan: + handler( + event.Maintainer, + event.Raw.BlockNumber, + ) + } + } + }() + + sub := wmas.Pipe(eventChan) + return subscription.NewEventSubscription(func() { + sub.Unsubscribe() + cancelCtx() + }) +} + +func (wmas *MpWalletMaintainerAuthorizedSubscription) Pipe( + sink chan *abi.MaintainerProxyWalletMaintainerAuthorized, +) subscription.EventSubscription { + ctx, cancelCtx := context.WithCancel(context.Background()) + go func() { + ticker := time.NewTicker(wmas.opts.Tick) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + lastBlock, err := wmas.contract.blockCounter.CurrentBlock() + if err != nil { + mpLogger.Errorf( + "subscription failed to pull events: [%v]", + err, + ) + } + fromBlock := lastBlock - wmas.opts.PastBlocks + + mpLogger.Infof( + "subscription monitoring fetching past WalletMaintainerAuthorized events "+ + "starting from block [%v]", + fromBlock, + ) + events, err := wmas.contract.PastWalletMaintainerAuthorizedEvents( + fromBlock, + nil, + wmas.maintainerFilter, + ) + if err != nil { + mpLogger.Errorf( + "subscription failed to pull events: [%v]", + err, + ) + continue + } + mpLogger.Infof( + "subscription monitoring fetched [%v] past WalletMaintainerAuthorized events", + len(events), + ) + + for _, event := range events { + sink <- event + } + } + } + }() + + sub := wmas.contract.watchWalletMaintainerAuthorized( + sink, + wmas.maintainerFilter, + ) + + return subscription.NewEventSubscription(func() { + sub.Unsubscribe() + cancelCtx() + }) +} + +func (mp *MaintainerProxy) watchWalletMaintainerAuthorized( + sink chan *abi.MaintainerProxyWalletMaintainerAuthorized, + maintainerFilter []common.Address, +) event.Subscription { + subscribeFn := func(ctx context.Context) (event.Subscription, error) { + return mp.contract.WatchWalletMaintainerAuthorized( + &bind.WatchOpts{Context: ctx}, + sink, + maintainerFilter, + ) + } + + thresholdViolatedFn := func(elapsed time.Duration) { + mpLogger.Warnf( + "subscription to event WalletMaintainerAuthorized had to be "+ + "retried [%s] since the last attempt; please inspect "+ + "host chain connectivity", + elapsed, + ) + } + + subscriptionFailedFn := func(err error) { + mpLogger.Errorf( + "subscription to event WalletMaintainerAuthorized failed "+ + "with error: [%v]; resubscription attempt will be "+ + "performed", + err, + ) + } + + return chainutil.WithResubscription( + chainutil.SubscriptionBackoffMax, + subscribeFn, + chainutil.SubscriptionAlertThreshold, + thresholdViolatedFn, + subscriptionFailedFn, + ) +} + +func (mp *MaintainerProxy) PastWalletMaintainerAuthorizedEvents( + startBlock uint64, + endBlock *uint64, + maintainerFilter []common.Address, +) ([]*abi.MaintainerProxyWalletMaintainerAuthorized, error) { + iterator, err := mp.contract.FilterWalletMaintainerAuthorized( + &bind.FilterOpts{ + Start: startBlock, + End: endBlock, + }, + maintainerFilter, + ) + if err != nil { + return nil, fmt.Errorf( + "error retrieving past WalletMaintainerAuthorized events: [%v]", + err, + ) + } + + events := make([]*abi.MaintainerProxyWalletMaintainerAuthorized, 0) + + for iterator.Next() { + event := iterator.Event + events = append(events, event) + } + + return events, nil +} + +func (mp *MaintainerProxy) WalletMaintainerUnauthorizedEvent( + opts *ethereum.SubscribeOpts, + maintainerFilter []common.Address, +) *MpWalletMaintainerUnauthorizedSubscription { + if opts == nil { + opts = new(ethereum.SubscribeOpts) + } + if opts.Tick == 0 { + opts.Tick = chainutil.DefaultSubscribeOptsTick + } + if opts.PastBlocks == 0 { + opts.PastBlocks = chainutil.DefaultSubscribeOptsPastBlocks + } + + return &MpWalletMaintainerUnauthorizedSubscription{ + mp, + opts, + maintainerFilter, + } +} + +type MpWalletMaintainerUnauthorizedSubscription struct { + contract *MaintainerProxy + opts *ethereum.SubscribeOpts + maintainerFilter []common.Address +} + +type maintainerProxyWalletMaintainerUnauthorizedFunc func( + Maintainer common.Address, + blockNumber uint64, +) + +func (wmus *MpWalletMaintainerUnauthorizedSubscription) OnEvent( + handler maintainerProxyWalletMaintainerUnauthorizedFunc, +) subscription.EventSubscription { + eventChan := make(chan *abi.MaintainerProxyWalletMaintainerUnauthorized) + ctx, cancelCtx := context.WithCancel(context.Background()) + + go func() { + for { + select { + case <-ctx.Done(): + return + case event := <-eventChan: + handler( + event.Maintainer, + event.Raw.BlockNumber, + ) + } + } + }() + + sub := wmus.Pipe(eventChan) + return subscription.NewEventSubscription(func() { + sub.Unsubscribe() + cancelCtx() + }) +} + +func (wmus *MpWalletMaintainerUnauthorizedSubscription) Pipe( + sink chan *abi.MaintainerProxyWalletMaintainerUnauthorized, +) subscription.EventSubscription { + ctx, cancelCtx := context.WithCancel(context.Background()) + go func() { + ticker := time.NewTicker(wmus.opts.Tick) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + lastBlock, err := wmus.contract.blockCounter.CurrentBlock() + if err != nil { + mpLogger.Errorf( + "subscription failed to pull events: [%v]", + err, + ) + } + fromBlock := lastBlock - wmus.opts.PastBlocks + + mpLogger.Infof( + "subscription monitoring fetching past WalletMaintainerUnauthorized events "+ + "starting from block [%v]", + fromBlock, + ) + events, err := wmus.contract.PastWalletMaintainerUnauthorizedEvents( + fromBlock, + nil, + wmus.maintainerFilter, + ) + if err != nil { + mpLogger.Errorf( + "subscription failed to pull events: [%v]", + err, + ) + continue + } + mpLogger.Infof( + "subscription monitoring fetched [%v] past WalletMaintainerUnauthorized events", + len(events), + ) + + for _, event := range events { + sink <- event + } + } + } + }() + + sub := wmus.contract.watchWalletMaintainerUnauthorized( + sink, + wmus.maintainerFilter, + ) + + return subscription.NewEventSubscription(func() { + sub.Unsubscribe() + cancelCtx() + }) +} + +func (mp *MaintainerProxy) watchWalletMaintainerUnauthorized( + sink chan *abi.MaintainerProxyWalletMaintainerUnauthorized, + maintainerFilter []common.Address, +) event.Subscription { + subscribeFn := func(ctx context.Context) (event.Subscription, error) { + return mp.contract.WatchWalletMaintainerUnauthorized( + &bind.WatchOpts{Context: ctx}, + sink, + maintainerFilter, + ) + } + + thresholdViolatedFn := func(elapsed time.Duration) { + mpLogger.Warnf( + "subscription to event WalletMaintainerUnauthorized had to be "+ + "retried [%s] since the last attempt; please inspect "+ + "host chain connectivity", + elapsed, + ) + } + + subscriptionFailedFn := func(err error) { + mpLogger.Errorf( + "subscription to event WalletMaintainerUnauthorized failed "+ + "with error: [%v]; resubscription attempt will be "+ + "performed", + err, + ) + } + + return chainutil.WithResubscription( + chainutil.SubscriptionBackoffMax, + subscribeFn, + chainutil.SubscriptionAlertThreshold, + thresholdViolatedFn, + subscriptionFailedFn, + ) +} + +func (mp *MaintainerProxy) PastWalletMaintainerUnauthorizedEvents( + startBlock uint64, + endBlock *uint64, + maintainerFilter []common.Address, +) ([]*abi.MaintainerProxyWalletMaintainerUnauthorized, error) { + iterator, err := mp.contract.FilterWalletMaintainerUnauthorized( + &bind.FilterOpts{ + Start: startBlock, + End: endBlock, + }, + maintainerFilter, + ) + if err != nil { + return nil, fmt.Errorf( + "error retrieving past WalletMaintainerUnauthorized events: [%v]", + err, + ) + } + + events := make([]*abi.MaintainerProxyWalletMaintainerUnauthorized, 0) + + for iterator.Next() { + event := iterator.Event + events = append(events, event) + } + + return events, nil +} diff --git a/pkg/chain/ethereum/tbtc/gen/gen.go b/pkg/chain/ethereum/tbtc/gen/gen.go index 1d6ae779c7..50638c85bb 100644 --- a/pkg/chain/ethereum/tbtc/gen/gen.go +++ b/pkg/chain/ethereum/tbtc/gen/gen.go @@ -14,6 +14,15 @@ var ( // BridgeAddress is a Bridge contract's address read from the NPM package. BridgeAddress string = strings.TrimSpace(bridgeAddressFileContent) + //go:embed _address/MaintainerProxy + maintainerProxyAddressFileContent string + + // MaintainerProxyAddress is a MaintainerProxy contract's address read from + // the NPM package. + maintainerProxyAddress string = strings.TrimSpace( + maintainerProxyAddressFileContent, + ) + //go:embed _address/LightRelay lightRelayAddressFileContent string diff --git a/pkg/chain/ethereum/threshold/gen/abi/TokenStaking.go b/pkg/chain/ethereum/threshold/gen/abi/TokenStaking.go index 5ded783bbb..c26bc59b38 100644 --- a/pkg/chain/ethereum/threshold/gen/abi/TokenStaking.go +++ b/pkg/chain/ethereum/threshold/gen/abi/TokenStaking.go @@ -36,7 +36,7 @@ type CheckpointsCheckpoint struct { // TokenStakingMetaData contains all meta data concerning the TokenStaking contract. var TokenStakingMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"contractT\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"contractIKeepTokenStaking\",\"name\":\"_keepStakingContract\",\"type\":\"address\"},{\"internalType\":\"contractINuCypherStakingEscrow\",\"name\":\"_nucypherStakingContract\",\"type\":\"address\"},{\"internalType\":\"contractVendingMachine\",\"name\":\"_keepVendingMachine\",\"type\":\"address\"},{\"internalType\":\"contractVendingMachine\",\"name\":\"_nucypherVendingMachine\",\"type\":\"address\"},{\"internalType\":\"contractKeepStake\",\"name\":\"_keepStake\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"enumTokenStaking.ApplicationStatus\",\"name\":\"newStatus\",\"type\":\"uint8\"}],\"name\":\"ApplicationStatusChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ceiling\",\"type\":\"uint256\"}],\"name\":\"AuthorizationCeilingSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"fromAmount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"toAmount\",\"type\":\"uint96\"}],\"name\":\"AuthorizationDecreaseApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"fromAmount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"toAmount\",\"type\":\"uint96\"}],\"name\":\"AuthorizationDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"fromAmount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"toAmount\",\"type\":\"uint96\"}],\"name\":\"AuthorizationIncreased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"fromAmount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"toAmount\",\"type\":\"uint96\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"successfulCall\",\"type\":\"bool\"}],\"name\":\"AuthorizationInvoluntaryDecreased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromDelegate\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toDelegate\",\"type\":\"address\"}],\"name\":\"DelegateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"DelegateVotesChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldGovernance\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newGovernance\",\"type\":\"address\"}],\"name\":\"GovernanceTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"MinimumStakeAmountSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"reward\",\"type\":\"uint96\"}],\"name\":\"NotificationRewardPushed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"reward\",\"type\":\"uint96\"}],\"name\":\"NotificationRewardSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"NotificationRewardWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"notifier\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"NotifierRewarded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnerRefreshed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"panicButton\",\"type\":\"address\"}],\"name\":\"PanicButtonSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tAmount\",\"type\":\"uint256\"}],\"name\":\"SlashingProcessed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"penalty\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"rewardMultiplier\",\"type\":\"uint256\"}],\"name\":\"StakeDiscrepancyPenaltySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enumIStaking.StakeType\",\"name\":\"stakeType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"authorizer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"Staked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"discrepancy\",\"type\":\"bool\"}],\"name\":\"TokensSeized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"ToppedUp\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"Unstaked\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"applicationInfo\",\"outputs\":[{\"internalType\":\"enumTokenStaking.ApplicationStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"panicButton\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"applications\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"}],\"name\":\"approveApplication\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"approveAuthorizationDecrease\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"authorizationCeiling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"}],\"name\":\"authorizedStake\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"pos\",\"type\":\"uint32\"}],\"name\":\"checkpoints\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fromBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"votes\",\"type\":\"uint96\"}],\"internalType\":\"structCheckpoints.Checkpoint\",\"name\":\"checkpoint\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"delegateVoting\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"}],\"name\":\"disableApplication\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"}],\"name\":\"forceDecreaseAuthorization\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getApplicationsLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"}],\"name\":\"getAvailableToAuthorize\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"availableTValue\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"enumIStaking.StakeType\",\"name\":\"stakeTypes\",\"type\":\"uint8\"}],\"name\":\"getMinStaked\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPastTotalSupply\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPastVotes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSlashingQueueLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"getStartStakingTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getVotes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governance\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"increaseAuthorization\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minTStakeAmount\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"notificationReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"notifiersTreasury\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"notifyKeepStakeDiscrepancy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"notifyNuStakeDiscrepancy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"numCheckpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"}],\"name\":\"pauseApplication\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"name\":\"processSlashing\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"reward\",\"type\":\"uint96\"}],\"name\":\"pushNotificationReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"refreshKeepStakeOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"requestAuthorizationDecrease\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"requestAuthorizationDecrease\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"rolesOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"addresspayable\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"authorizer\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"rewardMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"notifier\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"_stakingProviders\",\"type\":\"address[]\"}],\"name\":\"seize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"ceiling\",\"type\":\"uint256\"}],\"name\":\"setAuthorizationCeiling\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"setMinimumStakeAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"reward\",\"type\":\"uint96\"}],\"name\":\"setNotificationReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"panicButton\",\"type\":\"address\"}],\"name\":\"setPanicButton\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"penalty\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"rewardMultiplier\",\"type\":\"uint256\"}],\"name\":\"setStakeDiscrepancyPenalty\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"address[]\",\"name\":\"_stakingProviders\",\"type\":\"address[]\"}],\"name\":\"slash\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"slashingQueue\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"slashingQueueIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"addresspayable\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"authorizer\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"stake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stakeDiscrepancyPenalty\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stakeDiscrepancyRewardMultiplier\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"stakeKeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"addresspayable\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"authorizer\",\"type\":\"address\"}],\"name\":\"stakeNu\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"stakedNu\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nuAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"stakes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"tStake\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"keepInTStake\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"nuInTStake\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"topUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"topUpKeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"topUpNu\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newGuvnor\",\"type\":\"address\"}],\"name\":\"transferGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"unstakeAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"unstakeKeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"unstakeNu\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"unstakeT\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"withdrawNotificationReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + ABI: "[{\"inputs\":[{\"internalType\":\"contractT\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"contractIKeepTokenStaking\",\"name\":\"_keepStakingContract\",\"type\":\"address\"},{\"internalType\":\"contractINuCypherStakingEscrow\",\"name\":\"_nucypherStakingContract\",\"type\":\"address\"},{\"internalType\":\"contractVendingMachine\",\"name\":\"_keepVendingMachine\",\"type\":\"address\"},{\"internalType\":\"contractVendingMachine\",\"name\":\"_nucypherVendingMachine\",\"type\":\"address\"},{\"internalType\":\"contractKeepStake\",\"name\":\"_keepStake\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"enumTokenStaking.ApplicationStatus\",\"name\":\"newStatus\",\"type\":\"uint8\"}],\"name\":\"ApplicationStatusChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ceiling\",\"type\":\"uint256\"}],\"name\":\"AuthorizationCeilingSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"fromAmount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"toAmount\",\"type\":\"uint96\"}],\"name\":\"AuthorizationDecreaseApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"fromAmount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"toAmount\",\"type\":\"uint96\"}],\"name\":\"AuthorizationDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"fromAmount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"toAmount\",\"type\":\"uint96\"}],\"name\":\"AuthorizationIncreased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"fromAmount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"toAmount\",\"type\":\"uint96\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"successfulCall\",\"type\":\"bool\"}],\"name\":\"AuthorizationInvoluntaryDecreased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromDelegate\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toDelegate\",\"type\":\"address\"}],\"name\":\"DelegateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"DelegateVotesChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldGovernance\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newGovernance\",\"type\":\"address\"}],\"name\":\"GovernanceTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"MinimumStakeAmountSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"reward\",\"type\":\"uint96\"}],\"name\":\"NotificationRewardPushed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"reward\",\"type\":\"uint96\"}],\"name\":\"NotificationRewardSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"NotificationRewardWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"notifier\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"NotifierRewarded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnerRefreshed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"panicButton\",\"type\":\"address\"}],\"name\":\"PanicButtonSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tAmount\",\"type\":\"uint256\"}],\"name\":\"SlashingProcessed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"penalty\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"rewardMultiplier\",\"type\":\"uint256\"}],\"name\":\"StakeDiscrepancyPenaltySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enumIStaking.StakeType\",\"name\":\"stakeType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"authorizer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"Staked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"discrepancy\",\"type\":\"bool\"}],\"name\":\"TokensSeized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"ToppedUp\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"Unstaked\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"applicationInfo\",\"outputs\":[{\"internalType\":\"enumTokenStaking.ApplicationStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"panicButton\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"applications\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"}],\"name\":\"approveApplication\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"approveAuthorizationDecrease\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"authorizationCeiling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"}],\"name\":\"authorizedStake\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"pos\",\"type\":\"uint32\"}],\"name\":\"checkpoints\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fromBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"votes\",\"type\":\"uint96\"}],\"internalType\":\"structCheckpoints.Checkpoint\",\"name\":\"checkpoint\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"delegateVoting\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"}],\"name\":\"disableApplication\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"}],\"name\":\"forceDecreaseAuthorization\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getApplicationsLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"}],\"name\":\"getAvailableToAuthorize\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"availableTValue\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"enumIStaking.StakeType\",\"name\":\"stakeTypes\",\"type\":\"uint8\"}],\"name\":\"getMinStaked\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPastTotalSupply\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPastVotes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSlashingQueueLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"getStartStakingTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getVotes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governance\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"increaseAuthorization\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minTStakeAmount\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"notificationReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"notifiersTreasury\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"notifyKeepStakeDiscrepancy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"notifyNuStakeDiscrepancy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"numCheckpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"}],\"name\":\"pauseApplication\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"name\":\"processSlashing\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"reward\",\"type\":\"uint96\"}],\"name\":\"pushNotificationReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"requestAuthorizationDecrease\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"requestAuthorizationDecrease\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"rolesOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"addresspayable\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"authorizer\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"rewardMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"notifier\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"_stakingProviders\",\"type\":\"address[]\"}],\"name\":\"seize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"ceiling\",\"type\":\"uint256\"}],\"name\":\"setAuthorizationCeiling\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"setMinimumStakeAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"reward\",\"type\":\"uint96\"}],\"name\":\"setNotificationReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"application\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"panicButton\",\"type\":\"address\"}],\"name\":\"setPanicButton\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"penalty\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"rewardMultiplier\",\"type\":\"uint256\"}],\"name\":\"setStakeDiscrepancyPenalty\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"address[]\",\"name\":\"_stakingProviders\",\"type\":\"address[]\"}],\"name\":\"slash\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"slashingQueue\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"slashingQueueIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"addresspayable\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"authorizer\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"stake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stakeDiscrepancyPenalty\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stakeDiscrepancyRewardMultiplier\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"stakeKeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"addresspayable\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"authorizer\",\"type\":\"address\"}],\"name\":\"stakeNu\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"stakedNu\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nuAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"stakes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"tStake\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"keepInTStake\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"nuInTStake\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"topUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"topUpKeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"topUpNu\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newGuvnor\",\"type\":\"address\"}],\"name\":\"transferGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"unstakeAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"}],\"name\":\"unstakeKeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"unstakeNu\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakingProvider\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"unstakeT\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"withdrawNotificationReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } // TokenStakingABI is the input ABI used to generate the binding from. @@ -1309,27 +1309,6 @@ func (_TokenStaking *TokenStakingTransactorSession) PushNotificationReward(rewar return _TokenStaking.Contract.PushNotificationReward(&_TokenStaking.TransactOpts, reward) } -// RefreshKeepStakeOwner is a paid mutator transaction binding the contract method 0xaf5f24ad. -// -// Solidity: function refreshKeepStakeOwner(address stakingProvider) returns() -func (_TokenStaking *TokenStakingTransactor) RefreshKeepStakeOwner(opts *bind.TransactOpts, stakingProvider common.Address) (*types.Transaction, error) { - return _TokenStaking.contract.Transact(opts, "refreshKeepStakeOwner", stakingProvider) -} - -// RefreshKeepStakeOwner is a paid mutator transaction binding the contract method 0xaf5f24ad. -// -// Solidity: function refreshKeepStakeOwner(address stakingProvider) returns() -func (_TokenStaking *TokenStakingSession) RefreshKeepStakeOwner(stakingProvider common.Address) (*types.Transaction, error) { - return _TokenStaking.Contract.RefreshKeepStakeOwner(&_TokenStaking.TransactOpts, stakingProvider) -} - -// RefreshKeepStakeOwner is a paid mutator transaction binding the contract method 0xaf5f24ad. -// -// Solidity: function refreshKeepStakeOwner(address stakingProvider) returns() -func (_TokenStaking *TokenStakingTransactorSession) RefreshKeepStakeOwner(stakingProvider common.Address) (*types.Transaction, error) { - return _TokenStaking.Contract.RefreshKeepStakeOwner(&_TokenStaking.TransactOpts, stakingProvider) -} - // RequestAuthorizationDecrease is a paid mutator transaction binding the contract method 0x5f2d5030. // // Solidity: function requestAuthorizationDecrease(address stakingProvider, address application, uint96 amount) returns() diff --git a/pkg/chain/ethereum/threshold/gen/cmd/TokenStaking.go b/pkg/chain/ethereum/threshold/gen/cmd/TokenStaking.go index 43f3eda9e0..95af3c9c0b 100644 --- a/pkg/chain/ethereum/threshold/gen/cmd/TokenStaking.go +++ b/pkg/chain/ethereum/threshold/gen/cmd/TokenStaking.go @@ -88,7 +88,6 @@ func init() { tsPauseApplicationCommand(), tsProcessSlashingCommand(), tsPushNotificationRewardCommand(), - tsRefreshKeepStakeOwnerCommand(), tsRequestAuthorizationDecreaseCommand(), tsRequestAuthorizationDecrease0Command(), tsSetAuthorizationCeilingCommand(), @@ -1991,71 +1990,6 @@ func tsPushNotificationReward(c *cobra.Command, args []string) error { return nil } -func tsRefreshKeepStakeOwnerCommand() *cobra.Command { - c := &cobra.Command{ - Use: "refresh-keep-stake-owner [arg_stakingProvider]", - Short: "Calls the nonpayable method refreshKeepStakeOwner on the TokenStaking contract.", - Args: cmd.ArgCountChecker(1), - RunE: tsRefreshKeepStakeOwner, - SilenceUsage: true, - DisableFlagsInUseLine: true, - } - - c.PreRunE = cmd.NonConstArgsChecker - cmd.InitNonConstFlags(c) - - return c -} - -func tsRefreshKeepStakeOwner(c *cobra.Command, args []string) error { - contract, err := initializeTokenStaking(c) - if err != nil { - return err - } - - arg_stakingProvider, err := chainutil.AddressFromHex(args[0]) - if err != nil { - return fmt.Errorf( - "couldn't parse parameter arg_stakingProvider, a address, from passed value %v", - args[0], - ) - } - - var ( - transaction *types.Transaction - ) - - if shouldSubmit, _ := c.Flags().GetBool(cmd.SubmitFlag); shouldSubmit { - // Do a regular submission. Take payable into account. - transaction, err = contract.RefreshKeepStakeOwner( - arg_stakingProvider, - ) - if err != nil { - return err - } - - cmd.PrintOutput(transaction.Hash()) - } else { - // Do a call. - err = contract.CallRefreshKeepStakeOwner( - arg_stakingProvider, - cmd.BlockFlagValue.Int, - ) - if err != nil { - return err - } - - cmd.PrintOutput("success") - - cmd.PrintOutput( - "the transaction was not submitted to the chain; " + - "please add the `--submit` flag", - ) - } - - return nil -} - func tsRequestAuthorizationDecreaseCommand() *cobra.Command { c := &cobra.Command{ Use: "request-authorization-decrease [arg_stakingProvider] [arg_application] [arg_amount]", diff --git a/pkg/chain/ethereum/threshold/gen/contract/TokenStaking.go b/pkg/chain/ethereum/threshold/gen/contract/TokenStaking.go index 633094047c..040c4ca3ca 100644 --- a/pkg/chain/ethereum/threshold/gen/contract/TokenStaking.go +++ b/pkg/chain/ethereum/threshold/gen/contract/TokenStaking.go @@ -1786,144 +1786,6 @@ func (ts *TokenStaking) PushNotificationRewardGasEstimate( return result, err } -// Transaction submission. -func (ts *TokenStaking) RefreshKeepStakeOwner( - arg_stakingProvider common.Address, - - transactionOptions ...chainutil.TransactionOptions, -) (*types.Transaction, error) { - tsLogger.Debug( - "submitting transaction refreshKeepStakeOwner", - " params: ", - fmt.Sprint( - arg_stakingProvider, - ), - ) - - ts.transactionMutex.Lock() - defer ts.transactionMutex.Unlock() - - // create a copy - transactorOptions := new(bind.TransactOpts) - *transactorOptions = *ts.transactorOptions - - if len(transactionOptions) > 1 { - return nil, fmt.Errorf( - "could not process multiple transaction options sets", - ) - } else if len(transactionOptions) > 0 { - transactionOptions[0].Apply(transactorOptions) - } - - nonce, err := ts.nonceManager.CurrentNonce() - if err != nil { - return nil, fmt.Errorf("failed to retrieve account nonce: %v", err) - } - - transactorOptions.Nonce = new(big.Int).SetUint64(nonce) - - transaction, err := ts.contract.RefreshKeepStakeOwner( - transactorOptions, - arg_stakingProvider, - ) - if err != nil { - return transaction, ts.errorResolver.ResolveError( - err, - ts.transactorOptions.From, - nil, - "refreshKeepStakeOwner", - arg_stakingProvider, - ) - } - - tsLogger.Infof( - "submitted transaction refreshKeepStakeOwner with id: [%s] and nonce [%v]", - transaction.Hash(), - transaction.Nonce(), - ) - - go ts.miningWaiter.ForceMining( - transaction, - transactorOptions, - func(newTransactorOptions *bind.TransactOpts) (*types.Transaction, error) { - // If original transactor options has a non-zero gas limit, that - // means the client code set it on their own. In that case, we - // should rewrite the gas limit from the original transaction - // for each resubmission. If the gas limit is not set by the client - // code, let the the submitter re-estimate the gas limit on each - // resubmission. - if transactorOptions.GasLimit != 0 { - newTransactorOptions.GasLimit = transactorOptions.GasLimit - } - - transaction, err := ts.contract.RefreshKeepStakeOwner( - newTransactorOptions, - arg_stakingProvider, - ) - if err != nil { - return nil, ts.errorResolver.ResolveError( - err, - ts.transactorOptions.From, - nil, - "refreshKeepStakeOwner", - arg_stakingProvider, - ) - } - - tsLogger.Infof( - "submitted transaction refreshKeepStakeOwner with id: [%s] and nonce [%v]", - transaction.Hash(), - transaction.Nonce(), - ) - - return transaction, nil - }, - ) - - ts.nonceManager.IncrementNonce() - - return transaction, err -} - -// Non-mutating call, not a transaction submission. -func (ts *TokenStaking) CallRefreshKeepStakeOwner( - arg_stakingProvider common.Address, - blockNumber *big.Int, -) error { - var result interface{} = nil - - err := chainutil.CallAtBlock( - ts.transactorOptions.From, - blockNumber, nil, - ts.contractABI, - ts.caller, - ts.errorResolver, - ts.contractAddress, - "refreshKeepStakeOwner", - &result, - arg_stakingProvider, - ) - - return err -} - -func (ts *TokenStaking) RefreshKeepStakeOwnerGasEstimate( - arg_stakingProvider common.Address, -) (uint64, error) { - var result uint64 - - result, err := chainutil.EstimateGas( - ts.callerOptions.From, - ts.contractAddress, - "refreshKeepStakeOwner", - ts.contractABI, - ts.transactor, - arg_stakingProvider, - ) - - return result, err -} - // Transaction submission. func (ts *TokenStaking) RequestAuthorizationDecrease( arg_stakingProvider common.Address,