From 3761496d50e3411701b1247ce465e183d706904f Mon Sep 17 00:00:00 2001 From: owen-eth Date: Tue, 9 Dec 2025 17:07:46 -0500 Subject: [PATCH 1/6] updates for new upgrade flow --- contracts-abi/abi/VanillaRegistry.abi | 121 +- contracts-abi/abi/VanillaRegistryV2.abi | 1454 ++++++ .../VanillaRegistry/VanillaRegistry.go | 365 +- .../VanillaRegistryV2/VanillaRegistryV2.go | 4308 +++++++++++++++++ contracts-abi/script.sh | 4 + contracts/.solhintignore | 1 + .../contracts/interfaces/IVanillaRegistry.sol | 12 +- .../interfaces/IVanillaRegistryV2.sol | 162 + .../validator-registry/VanillaRegistry.sol | 58 +- .../VanillaRegistryStorage.sol | 7 +- .../VanillaRegistryStorageV2.sol | 34 + .../validator-registry/VanillaRegistryV2.sol | 438 ++ .../validator-registry/DeployForMockL1.s.sol | 10 +- .../ValidatorOptInRouterTest.sol | 17 +- ...stryTest.sol => VanillaRegistryV2Test.sol} | 82 +- .../rewards/RewardManagerTest.sol | 16 +- 16 files changed, 6489 insertions(+), 600 deletions(-) create mode 100644 contracts-abi/abi/VanillaRegistryV2.abi create mode 100644 contracts-abi/clients/VanillaRegistryV2/VanillaRegistryV2.go create mode 100644 contracts/contracts/interfaces/IVanillaRegistryV2.sol create mode 100644 contracts/contracts/validator-registry/VanillaRegistryStorageV2.sol create mode 100644 contracts/contracts/validator-registry/VanillaRegistryV2.sol rename contracts/test/validator-registry/{VanillaRegistryTest.sol => VanillaRegistryV2Test.sol} (91%) diff --git a/contracts-abi/abi/VanillaRegistry.abi b/contracts-abi/abi/VanillaRegistry.abi index 340d65a9b..208370b00 100644 --- a/contracts-abi/abi/VanillaRegistry.abi +++ b/contracts-abi/abi/VanillaRegistry.abi @@ -379,19 +379,6 @@ ], "stateMutability": "view" }, - { - "type": "function", - "name": "removeWhitelistedStakers", - "inputs": [ - { - "name": "stakers", - "type": "address[]", - "internalType": "address[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, { "type": "function", "name": "renounceOwnership", @@ -646,38 +633,6 @@ "outputs": [], "stateMutability": "payable" }, - { - "type": "function", - "name": "whitelistStakers", - "inputs": [ - { - "name": "stakers", - "type": "address[]", - "internalType": "address[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "whitelistedStakers", - "inputs": [ - { - "name": "staker", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "whitelisted", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, { "type": "function", "name": "withdraw", @@ -986,44 +941,6 @@ ], "anonymous": false }, - { - "type": "event", - "name": "StakerRemovedFromWhitelist", - "inputs": [ - { - "name": "msgSender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "staker", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "StakerWhitelisted", - "inputs": [ - { - "name": "msgSender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "staker", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, { "type": "event", "name": "TotalStakeWithdrawn", @@ -1208,6 +1125,11 @@ "name": "InvalidReceive", "inputs": [] }, + { + "type": "error", + "name": "MinStakeMustBePositive", + "inputs": [] + }, { "type": "error", "name": "MustUnstakeToWithdraw", @@ -1266,17 +1188,6 @@ } ] }, - { - "type": "error", - "name": "SenderIsNotWhitelistedStaker", - "inputs": [ - { - "name": "sender", - "type": "address", - "internalType": "address" - } - ] - }, { "type": "error", "name": "SenderIsNotWithdrawalAddress", @@ -1339,28 +1250,6 @@ } ] }, - { - "type": "error", - "name": "StakerAlreadyWhitelisted", - "inputs": [ - { - "name": "staker", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "StakerNotWhitelisted", - "inputs": [ - { - "name": "staker", - "type": "address", - "internalType": "address" - } - ] - }, { "type": "error", "name": "TransferToRecipientFailed", diff --git a/contracts-abi/abi/VanillaRegistryV2.abi b/contracts-abi/abi/VanillaRegistryV2.abi new file mode 100644 index 000000000..47c5f260f --- /dev/null +++ b/contracts-abi/abi/VanillaRegistryV2.abi @@ -0,0 +1,1454 @@ +[ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "fallback", + "stateMutability": "payable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "UPGRADE_INTERFACE_VERSION", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "acceptOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "addStake", + "inputs": [ + { + "name": "blsPubKeys", + "type": "bytes[]", + "internalType": "bytes[]" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "claimForceWithdrawnFunds", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "delegateStake", + "inputs": [ + { + "name": "blsPubKeys", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "withdrawalAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "forceWithdrawalAsOwner", + "inputs": [ + { + "name": "blsPubKeys", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "withdrawalAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "forceWithdrawnFunds", + "inputs": [ + { + "name": "withdrawalAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "amountToClaim", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAccumulatedSlashingFunds", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBlocksTillWithdrawAllowed", + "inputs": [ + { + "name": "valBLSPubKey", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getStakedAmount", + "inputs": [ + { + "name": "valBLSPubKey", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getStakedValidator", + "inputs": [ + { + "name": "valBLSPubKey", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct IVanillaRegistryV2.StakedValidator", + "components": [ + { + "name": "exists", + "type": "bool", + "internalType": "bool" + }, + { + "name": "withdrawalAddress", + "type": "address", + "internalType": "address" + }, + { + "name": "balance", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "unstakeOccurrence", + "type": "tuple", + "internalType": "struct BlockHeightOccurrence.Occurrence", + "components": [ + { + "name": "exists", + "type": "bool", + "internalType": "bool" + }, + { + "name": "blockHeight", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "_minStake", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_slashOracle", + "type": "address", + "internalType": "address" + }, + { + "name": "_slashReceiver", + "type": "address", + "internalType": "address" + }, + { + "name": "_unstakePeriodBlocks", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_slashingPayoutPeriodBlocks", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_owner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isSlashingPayoutDue", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isUnstaking", + "inputs": [ + { + "name": "valBLSPubKey", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isValidatorOptedIn", + "inputs": [ + { + "name": "valBLSPubKey", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "manuallyTransferSlashingFunds", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "minStake", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pendingOwner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "proxiableUUID", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "removeWhitelistedStakers", + "inputs": [ + { + "name": "stakers", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setMinStake", + "inputs": [ + { + "name": "newMinStake", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setSlashOracle", + "inputs": [ + { + "name": "newSlashOracle", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setSlashReceiver", + "inputs": [ + { + "name": "newSlashReceiver", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setSlashingPayoutPeriodBlocks", + "inputs": [ + { + "name": "newSlashingPayoutPeriodBlocks", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setUnstakePeriodBlocks", + "inputs": [ + { + "name": "newUnstakePeriodBlocks", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "slash", + "inputs": [ + { + "name": "blsPubKeys", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "payoutIfDue", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "slashOracle", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "slashingFundsTracker", + "inputs": [], + "outputs": [ + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "accumulatedAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "lastPayoutBlock", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "payoutPeriodBlocks", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "stake", + "inputs": [ + { + "name": "blsPubKeys", + "type": "bytes[]", + "internalType": "bytes[]" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "stakedValidators", + "inputs": [ + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "exists", + "type": "bool", + "internalType": "bool" + }, + { + "name": "withdrawalAddress", + "type": "address", + "internalType": "address" + }, + { + "name": "balance", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "unstakeOccurrence", + "type": "tuple", + "internalType": "struct BlockHeightOccurrence.Occurrence", + "components": [ + { + "name": "exists", + "type": "bool", + "internalType": "bool" + }, + { + "name": "blockHeight", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "unstake", + "inputs": [ + { + "name": "blsPubKeys", + "type": "bytes[]", + "internalType": "bytes[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "unstakePeriodBlocks", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "upgradeToAndCall", + "inputs": [ + { + "name": "newImplementation", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "whitelistStakers", + "inputs": [ + { + "name": "stakers", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "whitelistedStakers", + "inputs": [ + { + "name": "staker", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "whitelisted", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "withdraw", + "inputs": [ + { + "name": "blsPubKeys", + "type": "bytes[]", + "internalType": "bytes[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "FeeTransfer", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "recipient", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "MinStakeSet", + "inputs": [ + { + "name": "msgSender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newMinStake", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipTransferStarted", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SlashOracleSet", + "inputs": [ + { + "name": "msgSender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newSlashOracle", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SlashReceiverSet", + "inputs": [ + { + "name": "msgSender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newSlashReceiver", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Slashed", + "inputs": [ + { + "name": "msgSender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "slashReceiver", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "withdrawalAddress", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "valBLSPubKey", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SlashingPayoutPeriodBlocksSet", + "inputs": [ + { + "name": "msgSender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newSlashingPayoutPeriodBlocks", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "StakeAdded", + "inputs": [ + { + "name": "msgSender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "withdrawalAddress", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "valBLSPubKey", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "newBalance", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "StakeWithdrawn", + "inputs": [ + { + "name": "msgSender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "withdrawalAddress", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "valBLSPubKey", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Staked", + "inputs": [ + { + "name": "msgSender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "withdrawalAddress", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "valBLSPubKey", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "StakerRemovedFromWhitelist", + "inputs": [ + { + "name": "msgSender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "staker", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "StakerWhitelisted", + "inputs": [ + { + "name": "msgSender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "staker", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TotalStakeWithdrawn", + "inputs": [ + { + "name": "msgSender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "withdrawalAddress", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "totalAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "UnstakePeriodBlocksSet", + "inputs": [ + { + "name": "msgSender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newUnstakePeriodBlocks", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unstaked", + "inputs": [ + { + "name": "msgSender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "withdrawalAddress", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "valBLSPubKey", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Upgraded", + "inputs": [ + { + "name": "implementation", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "AddressEmptyCode", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "AtLeastOneRecipientRequired", + "inputs": [] + }, + { + "type": "error", + "name": "ERC1967InvalidImplementation", + "inputs": [ + { + "name": "implementation", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ERC1967NonPayable", + "inputs": [] + }, + { + "type": "error", + "name": "EnforcedPause", + "inputs": [] + }, + { + "type": "error", + "name": "ExpectedPause", + "inputs": [] + }, + { + "type": "error", + "name": "FailedInnerCall", + "inputs": [] + }, + { + "type": "error", + "name": "FeeRecipientIsZero", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidBLSPubKeyLength", + "inputs": [ + { + "name": "expected", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actual", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "InvalidFallback", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidInitialization", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidReceive", + "inputs": [] + }, + { + "type": "error", + "name": "MustUnstakeToWithdraw", + "inputs": [] + }, + { + "type": "error", + "name": "NoFundsToWithdraw", + "inputs": [] + }, + { + "type": "error", + "name": "NotInitializing", + "inputs": [] + }, + { + "type": "error", + "name": "OwnableInvalidOwner", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "OwnableUnauthorizedAccount", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "PayoutPeriodMustBePositive", + "inputs": [] + }, + { + "type": "error", + "name": "SenderIsNotSlashOracle", + "inputs": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "slashOracle", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SenderIsNotWhitelistedStaker", + "inputs": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SenderIsNotWithdrawalAddress", + "inputs": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "withdrawalAddress", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SlashAmountMustBeLessThanMinStake", + "inputs": [] + }, + { + "type": "error", + "name": "SlashAmountMustBePositive", + "inputs": [] + }, + { + "type": "error", + "name": "SlashOracleMustBeSet", + "inputs": [] + }, + { + "type": "error", + "name": "SlashReceiverMustBeSet", + "inputs": [] + }, + { + "type": "error", + "name": "SlashingPayoutPeriodMustBePositive", + "inputs": [] + }, + { + "type": "error", + "name": "SlashingTransferFailed", + "inputs": [] + }, + { + "type": "error", + "name": "StakeTooLowForNumberOfKeys", + "inputs": [ + { + "name": "msgValue", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "required", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "StakerAlreadyWhitelisted", + "inputs": [ + { + "name": "staker", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "StakerNotWhitelisted", + "inputs": [ + { + "name": "staker", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "TransferToRecipientFailed", + "inputs": [] + }, + { + "type": "error", + "name": "UUPSUnauthorizedCallContext", + "inputs": [] + }, + { + "type": "error", + "name": "UUPSUnsupportedProxiableUUID", + "inputs": [ + { + "name": "slot", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "UnstakePeriodMustBePositive", + "inputs": [] + }, + { + "type": "error", + "name": "ValidatorCannotBeUnstaking", + "inputs": [ + { + "name": "valBLSPubKey", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "type": "error", + "name": "ValidatorRecordMustExist", + "inputs": [ + { + "name": "valBLSPubKey", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "type": "error", + "name": "ValidatorRecordMustNotExist", + "inputs": [ + { + "name": "valBLSPubKey", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "type": "error", + "name": "WithdrawalAddressMismatch", + "inputs": [ + { + "name": "actualWithdrawalAddress", + "type": "address", + "internalType": "address" + }, + { + "name": "expectedWithdrawalAddress", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "WithdrawalAddressMustBeSet", + "inputs": [] + }, + { + "type": "error", + "name": "WithdrawalFailed", + "inputs": [] + }, + { + "type": "error", + "name": "WithdrawingTooSoon", + "inputs": [] + } +] diff --git a/contracts-abi/clients/VanillaRegistry/VanillaRegistry.go b/contracts-abi/clients/VanillaRegistry/VanillaRegistry.go index 5a77053a7..677f6d9b3 100644 --- a/contracts-abi/clients/VanillaRegistry/VanillaRegistry.go +++ b/contracts-abi/clients/VanillaRegistry/VanillaRegistry.go @@ -45,7 +45,7 @@ type IVanillaRegistryStakedValidator struct { // VanillaregistryMetaData contains all meta data concerning the Vanillaregistry contract. var VanillaregistryMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"fallback\",\"stateMutability\":\"payable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"UPGRADE_INTERFACE_VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"addStake\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"claimForceWithdrawnFunds\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegateStake\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"forceWithdrawalAsOwner\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"forceWithdrawnFunds\",\"inputs\":[{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"amountToClaim\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAccumulatedSlashingFunds\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBlocksTillWithdrawAllowed\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStakedAmount\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStakedValidator\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIVanillaRegistry.StakedValidator\",\"components\":[{\"name\":\"exists\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"balance\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"unstakeOccurrence\",\"type\":\"tuple\",\"internalType\":\"structBlockHeightOccurrence.Occurrence\",\"components\":[{\"name\":\"exists\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"blockHeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_minStake\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_slashOracle\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_slashReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_unstakePeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_slashingPayoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isSlashingPayoutDue\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isUnstaking\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isValidatorOptedIn\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"manuallyTransferSlashingFunds\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"minStake\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proxiableUUID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"removeWhitelistedStakers\",\"inputs\":[{\"name\":\"stakers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setMinStake\",\"inputs\":[{\"name\":\"newMinStake\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setSlashOracle\",\"inputs\":[{\"name\":\"newSlashOracle\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setSlashReceiver\",\"inputs\":[{\"name\":\"newSlashReceiver\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setSlashingPayoutPeriodBlocks\",\"inputs\":[{\"name\":\"newSlashingPayoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setUnstakePeriodBlocks\",\"inputs\":[{\"name\":\"newUnstakePeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slash\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"payoutIfDue\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slashOracle\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"slashingFundsTracker\",\"inputs\":[],\"outputs\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"accumulatedAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"lastPayoutBlock\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"payoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stake\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"stakedValidators\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"exists\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"balance\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"unstakeOccurrence\",\"type\":\"tuple\",\"internalType\":\"structBlockHeightOccurrence.Occurrence\",\"components\":[{\"name\":\"exists\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"blockHeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unstake\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unstakePeriodBlocks\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"upgradeToAndCall\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"whitelistStakers\",\"inputs\":[{\"name\":\"stakers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"whitelistedStakers\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"whitelisted\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdraw\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"FeeTransfer\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"recipient\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MinStakeSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newMinStake\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlashOracleSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newSlashOracle\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlashReceiverSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newSlashReceiver\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Slashed\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"slashReceiver\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlashingPayoutPeriodBlocksSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newSlashingPayoutPeriodBlocks\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakeAdded\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newBalance\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakeWithdrawn\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Staked\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakerRemovedFromWhitelist\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakerWhitelisted\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TotalStakeWithdrawn\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"totalAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"UnstakePeriodBlocksSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newUnstakePeriodBlocks\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unstaked\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AddressEmptyCode\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"AtLeastOneRecipientRequired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ERC1967InvalidImplementation\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967NonPayable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"EnforcedPause\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ExpectedPause\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FailedInnerCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FeeRecipientIsZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidBLSPubKeyLength\",\"inputs\":[{\"name\":\"expected\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"actual\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"InvalidFallback\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidReceive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"MustUnstakeToWithdraw\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoFundsToWithdraw\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"PayoutPeriodMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SenderIsNotSlashOracle\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"slashOracle\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"SenderIsNotWhitelistedStaker\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"SenderIsNotWithdrawalAddress\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"SlashAmountMustBeLessThanMinStake\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashAmountMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashOracleMustBeSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashReceiverMustBeSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashingPayoutPeriodMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashingTransferFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StakeTooLowForNumberOfKeys\",\"inputs\":[{\"name\":\"msgValue\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"required\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"StakerAlreadyWhitelisted\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"StakerNotWhitelisted\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"TransferToRecipientFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnauthorizedCallContext\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnsupportedProxiableUUID\",\"inputs\":[{\"name\":\"slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"UnstakePeriodMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ValidatorCannotBeUnstaking\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ValidatorRecordMustExist\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ValidatorRecordMustNotExist\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"WithdrawalAddressMismatch\",\"inputs\":[{\"name\":\"actualWithdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"expectedWithdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"WithdrawalAddressMustBeSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WithdrawalFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WithdrawingTooSoon\",\"inputs\":[]}]", + ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"fallback\",\"stateMutability\":\"payable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"UPGRADE_INTERFACE_VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"addStake\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"claimForceWithdrawnFunds\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegateStake\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"forceWithdrawalAsOwner\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"forceWithdrawnFunds\",\"inputs\":[{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"amountToClaim\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAccumulatedSlashingFunds\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBlocksTillWithdrawAllowed\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStakedAmount\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStakedValidator\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIVanillaRegistry.StakedValidator\",\"components\":[{\"name\":\"exists\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"balance\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"unstakeOccurrence\",\"type\":\"tuple\",\"internalType\":\"structBlockHeightOccurrence.Occurrence\",\"components\":[{\"name\":\"exists\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"blockHeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_minStake\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_slashOracle\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_slashReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_unstakePeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_slashingPayoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isSlashingPayoutDue\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isUnstaking\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isValidatorOptedIn\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"manuallyTransferSlashingFunds\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"minStake\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proxiableUUID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setMinStake\",\"inputs\":[{\"name\":\"newMinStake\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setSlashOracle\",\"inputs\":[{\"name\":\"newSlashOracle\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setSlashReceiver\",\"inputs\":[{\"name\":\"newSlashReceiver\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setSlashingPayoutPeriodBlocks\",\"inputs\":[{\"name\":\"newSlashingPayoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setUnstakePeriodBlocks\",\"inputs\":[{\"name\":\"newUnstakePeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slash\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"payoutIfDue\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slashOracle\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"slashingFundsTracker\",\"inputs\":[],\"outputs\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"accumulatedAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"lastPayoutBlock\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"payoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stake\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"stakedValidators\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"exists\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"balance\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"unstakeOccurrence\",\"type\":\"tuple\",\"internalType\":\"structBlockHeightOccurrence.Occurrence\",\"components\":[{\"name\":\"exists\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"blockHeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unstake\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unstakePeriodBlocks\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"upgradeToAndCall\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"withdraw\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"FeeTransfer\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"recipient\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MinStakeSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newMinStake\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlashOracleSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newSlashOracle\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlashReceiverSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newSlashReceiver\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Slashed\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"slashReceiver\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlashingPayoutPeriodBlocksSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newSlashingPayoutPeriodBlocks\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakeAdded\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newBalance\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakeWithdrawn\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Staked\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TotalStakeWithdrawn\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"totalAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"UnstakePeriodBlocksSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newUnstakePeriodBlocks\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unstaked\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AddressEmptyCode\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"AtLeastOneRecipientRequired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ERC1967InvalidImplementation\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967NonPayable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"EnforcedPause\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ExpectedPause\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FailedInnerCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FeeRecipientIsZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidBLSPubKeyLength\",\"inputs\":[{\"name\":\"expected\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"actual\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"InvalidFallback\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidReceive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"MinStakeMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"MustUnstakeToWithdraw\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoFundsToWithdraw\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"PayoutPeriodMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SenderIsNotSlashOracle\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"slashOracle\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"SenderIsNotWithdrawalAddress\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"SlashAmountMustBeLessThanMinStake\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashAmountMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashOracleMustBeSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashReceiverMustBeSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashingPayoutPeriodMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashingTransferFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StakeTooLowForNumberOfKeys\",\"inputs\":[{\"name\":\"msgValue\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"required\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"TransferToRecipientFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnauthorizedCallContext\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnsupportedProxiableUUID\",\"inputs\":[{\"name\":\"slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"UnstakePeriodMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ValidatorCannotBeUnstaking\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ValidatorRecordMustExist\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ValidatorRecordMustNotExist\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"WithdrawalAddressMismatch\",\"inputs\":[{\"name\":\"actualWithdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"expectedWithdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"WithdrawalAddressMustBeSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WithdrawalFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WithdrawingTooSoon\",\"inputs\":[]}]", } // VanillaregistryABI is the input ABI used to generate the binding from. @@ -800,37 +800,6 @@ func (_Vanillaregistry *VanillaregistryCallerSession) UnstakePeriodBlocks() (*bi return _Vanillaregistry.Contract.UnstakePeriodBlocks(&_Vanillaregistry.CallOpts) } -// WhitelistedStakers is a free data retrieval call binding the contract method 0xfdaf17f0. -// -// Solidity: function whitelistedStakers(address staker) view returns(bool whitelisted) -func (_Vanillaregistry *VanillaregistryCaller) WhitelistedStakers(opts *bind.CallOpts, staker common.Address) (bool, error) { - var out []interface{} - err := _Vanillaregistry.contract.Call(opts, &out, "whitelistedStakers", staker) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// WhitelistedStakers is a free data retrieval call binding the contract method 0xfdaf17f0. -// -// Solidity: function whitelistedStakers(address staker) view returns(bool whitelisted) -func (_Vanillaregistry *VanillaregistrySession) WhitelistedStakers(staker common.Address) (bool, error) { - return _Vanillaregistry.Contract.WhitelistedStakers(&_Vanillaregistry.CallOpts, staker) -} - -// WhitelistedStakers is a free data retrieval call binding the contract method 0xfdaf17f0. -// -// Solidity: function whitelistedStakers(address staker) view returns(bool whitelisted) -func (_Vanillaregistry *VanillaregistryCallerSession) WhitelistedStakers(staker common.Address) (bool, error) { - return _Vanillaregistry.Contract.WhitelistedStakers(&_Vanillaregistry.CallOpts, staker) -} - // AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. // // Solidity: function acceptOwnership() returns() @@ -999,27 +968,6 @@ func (_Vanillaregistry *VanillaregistryTransactorSession) Pause() (*types.Transa return _Vanillaregistry.Contract.Pause(&_Vanillaregistry.TransactOpts) } -// RemoveWhitelistedStakers is a paid mutator transaction binding the contract method 0x5158c9fa. -// -// Solidity: function removeWhitelistedStakers(address[] stakers) returns() -func (_Vanillaregistry *VanillaregistryTransactor) RemoveWhitelistedStakers(opts *bind.TransactOpts, stakers []common.Address) (*types.Transaction, error) { - return _Vanillaregistry.contract.Transact(opts, "removeWhitelistedStakers", stakers) -} - -// RemoveWhitelistedStakers is a paid mutator transaction binding the contract method 0x5158c9fa. -// -// Solidity: function removeWhitelistedStakers(address[] stakers) returns() -func (_Vanillaregistry *VanillaregistrySession) RemoveWhitelistedStakers(stakers []common.Address) (*types.Transaction, error) { - return _Vanillaregistry.Contract.RemoveWhitelistedStakers(&_Vanillaregistry.TransactOpts, stakers) -} - -// RemoveWhitelistedStakers is a paid mutator transaction binding the contract method 0x5158c9fa. -// -// Solidity: function removeWhitelistedStakers(address[] stakers) returns() -func (_Vanillaregistry *VanillaregistryTransactorSession) RemoveWhitelistedStakers(stakers []common.Address) (*types.Transaction, error) { - return _Vanillaregistry.Contract.RemoveWhitelistedStakers(&_Vanillaregistry.TransactOpts, stakers) -} - // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. // // Solidity: function renounceOwnership() returns() @@ -1272,27 +1220,6 @@ func (_Vanillaregistry *VanillaregistryTransactorSession) UpgradeToAndCall(newIm return _Vanillaregistry.Contract.UpgradeToAndCall(&_Vanillaregistry.TransactOpts, newImplementation, data) } -// WhitelistStakers is a paid mutator transaction binding the contract method 0x95ebffdb. -// -// Solidity: function whitelistStakers(address[] stakers) returns() -func (_Vanillaregistry *VanillaregistryTransactor) WhitelistStakers(opts *bind.TransactOpts, stakers []common.Address) (*types.Transaction, error) { - return _Vanillaregistry.contract.Transact(opts, "whitelistStakers", stakers) -} - -// WhitelistStakers is a paid mutator transaction binding the contract method 0x95ebffdb. -// -// Solidity: function whitelistStakers(address[] stakers) returns() -func (_Vanillaregistry *VanillaregistrySession) WhitelistStakers(stakers []common.Address) (*types.Transaction, error) { - return _Vanillaregistry.Contract.WhitelistStakers(&_Vanillaregistry.TransactOpts, stakers) -} - -// WhitelistStakers is a paid mutator transaction binding the contract method 0x95ebffdb. -// -// Solidity: function whitelistStakers(address[] stakers) returns() -func (_Vanillaregistry *VanillaregistryTransactorSession) WhitelistStakers(stakers []common.Address) (*types.Transaction, error) { - return _Vanillaregistry.Contract.WhitelistStakers(&_Vanillaregistry.TransactOpts, stakers) -} - // Withdraw is a paid mutator transaction binding the contract method 0xdcb1edcb. // // Solidity: function withdraw(bytes[] blsPubKeys) returns() @@ -3285,296 +3212,6 @@ func (_Vanillaregistry *VanillaregistryFilterer) ParseStaked(log types.Log) (*Va return event, nil } -// VanillaregistryStakerRemovedFromWhitelistIterator is returned from FilterStakerRemovedFromWhitelist and is used to iterate over the raw logs and unpacked data for StakerRemovedFromWhitelist events raised by the Vanillaregistry contract. -type VanillaregistryStakerRemovedFromWhitelistIterator struct { - Event *VanillaregistryStakerRemovedFromWhitelist // 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 *VanillaregistryStakerRemovedFromWhitelistIterator) 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(VanillaregistryStakerRemovedFromWhitelist) - 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(VanillaregistryStakerRemovedFromWhitelist) - 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 *VanillaregistryStakerRemovedFromWhitelistIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *VanillaregistryStakerRemovedFromWhitelistIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// VanillaregistryStakerRemovedFromWhitelist represents a StakerRemovedFromWhitelist event raised by the Vanillaregistry contract. -type VanillaregistryStakerRemovedFromWhitelist struct { - MsgSender common.Address - Staker common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterStakerRemovedFromWhitelist is a free log retrieval operation binding the contract event 0x79fccea9ca325c6c715589de68546a63a35425178d1a8b1436bef7f7a76087a4. -// -// Solidity: event StakerRemovedFromWhitelist(address indexed msgSender, address staker) -func (_Vanillaregistry *VanillaregistryFilterer) FilterStakerRemovedFromWhitelist(opts *bind.FilterOpts, msgSender []common.Address) (*VanillaregistryStakerRemovedFromWhitelistIterator, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - - logs, sub, err := _Vanillaregistry.contract.FilterLogs(opts, "StakerRemovedFromWhitelist", msgSenderRule) - if err != nil { - return nil, err - } - return &VanillaregistryStakerRemovedFromWhitelistIterator{contract: _Vanillaregistry.contract, event: "StakerRemovedFromWhitelist", logs: logs, sub: sub}, nil -} - -// WatchStakerRemovedFromWhitelist is a free log subscription operation binding the contract event 0x79fccea9ca325c6c715589de68546a63a35425178d1a8b1436bef7f7a76087a4. -// -// Solidity: event StakerRemovedFromWhitelist(address indexed msgSender, address staker) -func (_Vanillaregistry *VanillaregistryFilterer) WatchStakerRemovedFromWhitelist(opts *bind.WatchOpts, sink chan<- *VanillaregistryStakerRemovedFromWhitelist, msgSender []common.Address) (event.Subscription, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - - logs, sub, err := _Vanillaregistry.contract.WatchLogs(opts, "StakerRemovedFromWhitelist", msgSenderRule) - 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(VanillaregistryStakerRemovedFromWhitelist) - if err := _Vanillaregistry.contract.UnpackLog(event, "StakerRemovedFromWhitelist", 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 -} - -// ParseStakerRemovedFromWhitelist is a log parse operation binding the contract event 0x79fccea9ca325c6c715589de68546a63a35425178d1a8b1436bef7f7a76087a4. -// -// Solidity: event StakerRemovedFromWhitelist(address indexed msgSender, address staker) -func (_Vanillaregistry *VanillaregistryFilterer) ParseStakerRemovedFromWhitelist(log types.Log) (*VanillaregistryStakerRemovedFromWhitelist, error) { - event := new(VanillaregistryStakerRemovedFromWhitelist) - if err := _Vanillaregistry.contract.UnpackLog(event, "StakerRemovedFromWhitelist", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// VanillaregistryStakerWhitelistedIterator is returned from FilterStakerWhitelisted and is used to iterate over the raw logs and unpacked data for StakerWhitelisted events raised by the Vanillaregistry contract. -type VanillaregistryStakerWhitelistedIterator struct { - Event *VanillaregistryStakerWhitelisted // 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 *VanillaregistryStakerWhitelistedIterator) 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(VanillaregistryStakerWhitelisted) - 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(VanillaregistryStakerWhitelisted) - 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 *VanillaregistryStakerWhitelistedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *VanillaregistryStakerWhitelistedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// VanillaregistryStakerWhitelisted represents a StakerWhitelisted event raised by the Vanillaregistry contract. -type VanillaregistryStakerWhitelisted struct { - MsgSender common.Address - Staker common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterStakerWhitelisted is a free log retrieval operation binding the contract event 0xc94be990bcb425c41f84d9928ad9082894fb4f1f1d2508bc088d3a6a3e4059db. -// -// Solidity: event StakerWhitelisted(address indexed msgSender, address staker) -func (_Vanillaregistry *VanillaregistryFilterer) FilterStakerWhitelisted(opts *bind.FilterOpts, msgSender []common.Address) (*VanillaregistryStakerWhitelistedIterator, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - - logs, sub, err := _Vanillaregistry.contract.FilterLogs(opts, "StakerWhitelisted", msgSenderRule) - if err != nil { - return nil, err - } - return &VanillaregistryStakerWhitelistedIterator{contract: _Vanillaregistry.contract, event: "StakerWhitelisted", logs: logs, sub: sub}, nil -} - -// WatchStakerWhitelisted is a free log subscription operation binding the contract event 0xc94be990bcb425c41f84d9928ad9082894fb4f1f1d2508bc088d3a6a3e4059db. -// -// Solidity: event StakerWhitelisted(address indexed msgSender, address staker) -func (_Vanillaregistry *VanillaregistryFilterer) WatchStakerWhitelisted(opts *bind.WatchOpts, sink chan<- *VanillaregistryStakerWhitelisted, msgSender []common.Address) (event.Subscription, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - - logs, sub, err := _Vanillaregistry.contract.WatchLogs(opts, "StakerWhitelisted", msgSenderRule) - 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(VanillaregistryStakerWhitelisted) - if err := _Vanillaregistry.contract.UnpackLog(event, "StakerWhitelisted", 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 -} - -// ParseStakerWhitelisted is a log parse operation binding the contract event 0xc94be990bcb425c41f84d9928ad9082894fb4f1f1d2508bc088d3a6a3e4059db. -// -// Solidity: event StakerWhitelisted(address indexed msgSender, address staker) -func (_Vanillaregistry *VanillaregistryFilterer) ParseStakerWhitelisted(log types.Log) (*VanillaregistryStakerWhitelisted, error) { - event := new(VanillaregistryStakerWhitelisted) - if err := _Vanillaregistry.contract.UnpackLog(event, "StakerWhitelisted", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - // VanillaregistryTotalStakeWithdrawnIterator is returned from FilterTotalStakeWithdrawn and is used to iterate over the raw logs and unpacked data for TotalStakeWithdrawn events raised by the Vanillaregistry contract. type VanillaregistryTotalStakeWithdrawnIterator struct { Event *VanillaregistryTotalStakeWithdrawn // Event containing the contract specifics and raw log diff --git a/contracts-abi/clients/VanillaRegistryV2/VanillaRegistryV2.go b/contracts-abi/clients/VanillaRegistryV2/VanillaRegistryV2.go new file mode 100644 index 000000000..9651792f9 --- /dev/null +++ b/contracts-abi/clients/VanillaRegistryV2/VanillaRegistryV2.go @@ -0,0 +1,4308 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package vanillaregistryv2 + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// BlockHeightOccurrenceOccurrence is an auto generated low-level Go binding around an user-defined struct. +type BlockHeightOccurrenceOccurrence struct { + Exists bool + BlockHeight *big.Int +} + +// IVanillaRegistryV2StakedValidator is an auto generated low-level Go binding around an user-defined struct. +type IVanillaRegistryV2StakedValidator struct { + Exists bool + WithdrawalAddress common.Address + Balance *big.Int + UnstakeOccurrence BlockHeightOccurrenceOccurrence +} + +// Vanillaregistryv2MetaData contains all meta data concerning the Vanillaregistryv2 contract. +var Vanillaregistryv2MetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"fallback\",\"stateMutability\":\"payable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"UPGRADE_INTERFACE_VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"addStake\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"claimForceWithdrawnFunds\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegateStake\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"forceWithdrawalAsOwner\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"forceWithdrawnFunds\",\"inputs\":[{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"amountToClaim\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAccumulatedSlashingFunds\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBlocksTillWithdrawAllowed\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStakedAmount\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStakedValidator\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIVanillaRegistryV2.StakedValidator\",\"components\":[{\"name\":\"exists\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"balance\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"unstakeOccurrence\",\"type\":\"tuple\",\"internalType\":\"structBlockHeightOccurrence.Occurrence\",\"components\":[{\"name\":\"exists\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"blockHeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_minStake\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_slashOracle\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_slashReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_unstakePeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_slashingPayoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isSlashingPayoutDue\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isUnstaking\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isValidatorOptedIn\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"manuallyTransferSlashingFunds\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"minStake\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proxiableUUID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"removeWhitelistedStakers\",\"inputs\":[{\"name\":\"stakers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setMinStake\",\"inputs\":[{\"name\":\"newMinStake\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setSlashOracle\",\"inputs\":[{\"name\":\"newSlashOracle\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setSlashReceiver\",\"inputs\":[{\"name\":\"newSlashReceiver\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setSlashingPayoutPeriodBlocks\",\"inputs\":[{\"name\":\"newSlashingPayoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setUnstakePeriodBlocks\",\"inputs\":[{\"name\":\"newUnstakePeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slash\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"payoutIfDue\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slashOracle\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"slashingFundsTracker\",\"inputs\":[],\"outputs\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"accumulatedAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"lastPayoutBlock\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"payoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stake\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"stakedValidators\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"exists\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"balance\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"unstakeOccurrence\",\"type\":\"tuple\",\"internalType\":\"structBlockHeightOccurrence.Occurrence\",\"components\":[{\"name\":\"exists\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"blockHeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unstake\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unstakePeriodBlocks\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"upgradeToAndCall\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"whitelistStakers\",\"inputs\":[{\"name\":\"stakers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"whitelistedStakers\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"whitelisted\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdraw\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"FeeTransfer\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"recipient\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MinStakeSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newMinStake\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlashOracleSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newSlashOracle\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlashReceiverSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newSlashReceiver\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Slashed\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"slashReceiver\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlashingPayoutPeriodBlocksSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newSlashingPayoutPeriodBlocks\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakeAdded\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newBalance\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakeWithdrawn\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Staked\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakerRemovedFromWhitelist\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakerWhitelisted\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TotalStakeWithdrawn\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"totalAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"UnstakePeriodBlocksSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newUnstakePeriodBlocks\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unstaked\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AddressEmptyCode\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"AtLeastOneRecipientRequired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ERC1967InvalidImplementation\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967NonPayable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"EnforcedPause\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ExpectedPause\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FailedInnerCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FeeRecipientIsZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidBLSPubKeyLength\",\"inputs\":[{\"name\":\"expected\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"actual\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"InvalidFallback\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidReceive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"MustUnstakeToWithdraw\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoFundsToWithdraw\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"PayoutPeriodMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SenderIsNotSlashOracle\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"slashOracle\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"SenderIsNotWhitelistedStaker\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"SenderIsNotWithdrawalAddress\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"SlashAmountMustBeLessThanMinStake\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashAmountMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashOracleMustBeSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashReceiverMustBeSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashingPayoutPeriodMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashingTransferFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StakeTooLowForNumberOfKeys\",\"inputs\":[{\"name\":\"msgValue\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"required\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"StakerAlreadyWhitelisted\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"StakerNotWhitelisted\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"TransferToRecipientFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnauthorizedCallContext\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnsupportedProxiableUUID\",\"inputs\":[{\"name\":\"slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"UnstakePeriodMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ValidatorCannotBeUnstaking\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ValidatorRecordMustExist\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ValidatorRecordMustNotExist\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"WithdrawalAddressMismatch\",\"inputs\":[{\"name\":\"actualWithdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"expectedWithdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"WithdrawalAddressMustBeSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WithdrawalFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WithdrawingTooSoon\",\"inputs\":[]}]", +} + +// Vanillaregistryv2ABI is the input ABI used to generate the binding from. +// Deprecated: Use Vanillaregistryv2MetaData.ABI instead. +var Vanillaregistryv2ABI = Vanillaregistryv2MetaData.ABI + +// Vanillaregistryv2 is an auto generated Go binding around an Ethereum contract. +type Vanillaregistryv2 struct { + Vanillaregistryv2Caller // Read-only binding to the contract + Vanillaregistryv2Transactor // Write-only binding to the contract + Vanillaregistryv2Filterer // Log filterer for contract events +} + +// Vanillaregistryv2Caller is an auto generated read-only Go binding around an Ethereum contract. +type Vanillaregistryv2Caller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// Vanillaregistryv2Transactor is an auto generated write-only Go binding around an Ethereum contract. +type Vanillaregistryv2Transactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// Vanillaregistryv2Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type Vanillaregistryv2Filterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// Vanillaregistryv2Session is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type Vanillaregistryv2Session struct { + Contract *Vanillaregistryv2 // 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 +} + +// Vanillaregistryv2CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type Vanillaregistryv2CallerSession struct { + Contract *Vanillaregistryv2Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// Vanillaregistryv2TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type Vanillaregistryv2TransactorSession struct { + Contract *Vanillaregistryv2Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// Vanillaregistryv2Raw is an auto generated low-level Go binding around an Ethereum contract. +type Vanillaregistryv2Raw struct { + Contract *Vanillaregistryv2 // Generic contract binding to access the raw methods on +} + +// Vanillaregistryv2CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type Vanillaregistryv2CallerRaw struct { + Contract *Vanillaregistryv2Caller // Generic read-only contract binding to access the raw methods on +} + +// Vanillaregistryv2TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type Vanillaregistryv2TransactorRaw struct { + Contract *Vanillaregistryv2Transactor // Generic write-only contract binding to access the raw methods on +} + +// NewVanillaregistryv2 creates a new instance of Vanillaregistryv2, bound to a specific deployed contract. +func NewVanillaregistryv2(address common.Address, backend bind.ContractBackend) (*Vanillaregistryv2, error) { + contract, err := bindVanillaregistryv2(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Vanillaregistryv2{Vanillaregistryv2Caller: Vanillaregistryv2Caller{contract: contract}, Vanillaregistryv2Transactor: Vanillaregistryv2Transactor{contract: contract}, Vanillaregistryv2Filterer: Vanillaregistryv2Filterer{contract: contract}}, nil +} + +// NewVanillaregistryv2Caller creates a new read-only instance of Vanillaregistryv2, bound to a specific deployed contract. +func NewVanillaregistryv2Caller(address common.Address, caller bind.ContractCaller) (*Vanillaregistryv2Caller, error) { + contract, err := bindVanillaregistryv2(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &Vanillaregistryv2Caller{contract: contract}, nil +} + +// NewVanillaregistryv2Transactor creates a new write-only instance of Vanillaregistryv2, bound to a specific deployed contract. +func NewVanillaregistryv2Transactor(address common.Address, transactor bind.ContractTransactor) (*Vanillaregistryv2Transactor, error) { + contract, err := bindVanillaregistryv2(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &Vanillaregistryv2Transactor{contract: contract}, nil +} + +// NewVanillaregistryv2Filterer creates a new log filterer instance of Vanillaregistryv2, bound to a specific deployed contract. +func NewVanillaregistryv2Filterer(address common.Address, filterer bind.ContractFilterer) (*Vanillaregistryv2Filterer, error) { + contract, err := bindVanillaregistryv2(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &Vanillaregistryv2Filterer{contract: contract}, nil +} + +// bindVanillaregistryv2 binds a generic wrapper to an already deployed contract. +func bindVanillaregistryv2(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := Vanillaregistryv2MetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Vanillaregistryv2 *Vanillaregistryv2Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Vanillaregistryv2.Contract.Vanillaregistryv2Caller.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 (_Vanillaregistryv2 *Vanillaregistryv2Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.Vanillaregistryv2Transactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Vanillaregistryv2 *Vanillaregistryv2Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.Vanillaregistryv2Transactor.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 (_Vanillaregistryv2 *Vanillaregistryv2CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Vanillaregistryv2.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 (_Vanillaregistryv2 *Vanillaregistryv2TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Vanillaregistryv2 *Vanillaregistryv2TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.contract.Transact(opts, method, params...) +} + +// UPGRADEINTERFACEVERSION is a free data retrieval call binding the contract method 0xad3cb1cc. +// +// Solidity: function UPGRADE_INTERFACE_VERSION() view returns(string) +func (_Vanillaregistryv2 *Vanillaregistryv2Caller) UPGRADEINTERFACEVERSION(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _Vanillaregistryv2.contract.Call(opts, &out, "UPGRADE_INTERFACE_VERSION") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// UPGRADEINTERFACEVERSION is a free data retrieval call binding the contract method 0xad3cb1cc. +// +// Solidity: function UPGRADE_INTERFACE_VERSION() view returns(string) +func (_Vanillaregistryv2 *Vanillaregistryv2Session) UPGRADEINTERFACEVERSION() (string, error) { + return _Vanillaregistryv2.Contract.UPGRADEINTERFACEVERSION(&_Vanillaregistryv2.CallOpts) +} + +// UPGRADEINTERFACEVERSION is a free data retrieval call binding the contract method 0xad3cb1cc. +// +// Solidity: function UPGRADE_INTERFACE_VERSION() view returns(string) +func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) UPGRADEINTERFACEVERSION() (string, error) { + return _Vanillaregistryv2.Contract.UPGRADEINTERFACEVERSION(&_Vanillaregistryv2.CallOpts) +} + +// ForceWithdrawnFunds is a free data retrieval call binding the contract method 0x3de24562. +// +// Solidity: function forceWithdrawnFunds(address withdrawalAddress) view returns(uint256 amountToClaim) +func (_Vanillaregistryv2 *Vanillaregistryv2Caller) ForceWithdrawnFunds(opts *bind.CallOpts, withdrawalAddress common.Address) (*big.Int, error) { + var out []interface{} + err := _Vanillaregistryv2.contract.Call(opts, &out, "forceWithdrawnFunds", withdrawalAddress) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// ForceWithdrawnFunds is a free data retrieval call binding the contract method 0x3de24562. +// +// Solidity: function forceWithdrawnFunds(address withdrawalAddress) view returns(uint256 amountToClaim) +func (_Vanillaregistryv2 *Vanillaregistryv2Session) ForceWithdrawnFunds(withdrawalAddress common.Address) (*big.Int, error) { + return _Vanillaregistryv2.Contract.ForceWithdrawnFunds(&_Vanillaregistryv2.CallOpts, withdrawalAddress) +} + +// ForceWithdrawnFunds is a free data retrieval call binding the contract method 0x3de24562. +// +// Solidity: function forceWithdrawnFunds(address withdrawalAddress) view returns(uint256 amountToClaim) +func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) ForceWithdrawnFunds(withdrawalAddress common.Address) (*big.Int, error) { + return _Vanillaregistryv2.Contract.ForceWithdrawnFunds(&_Vanillaregistryv2.CallOpts, withdrawalAddress) +} + +// GetAccumulatedSlashingFunds is a free data retrieval call binding the contract method 0x5ddae85d. +// +// Solidity: function getAccumulatedSlashingFunds() view returns(uint256) +func (_Vanillaregistryv2 *Vanillaregistryv2Caller) GetAccumulatedSlashingFunds(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Vanillaregistryv2.contract.Call(opts, &out, "getAccumulatedSlashingFunds") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetAccumulatedSlashingFunds is a free data retrieval call binding the contract method 0x5ddae85d. +// +// Solidity: function getAccumulatedSlashingFunds() view returns(uint256) +func (_Vanillaregistryv2 *Vanillaregistryv2Session) GetAccumulatedSlashingFunds() (*big.Int, error) { + return _Vanillaregistryv2.Contract.GetAccumulatedSlashingFunds(&_Vanillaregistryv2.CallOpts) +} + +// GetAccumulatedSlashingFunds is a free data retrieval call binding the contract method 0x5ddae85d. +// +// Solidity: function getAccumulatedSlashingFunds() view returns(uint256) +func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) GetAccumulatedSlashingFunds() (*big.Int, error) { + return _Vanillaregistryv2.Contract.GetAccumulatedSlashingFunds(&_Vanillaregistryv2.CallOpts) +} + +// GetBlocksTillWithdrawAllowed is a free data retrieval call binding the contract method 0x14699cb9. +// +// Solidity: function getBlocksTillWithdrawAllowed(bytes valBLSPubKey) view returns(uint256) +func (_Vanillaregistryv2 *Vanillaregistryv2Caller) GetBlocksTillWithdrawAllowed(opts *bind.CallOpts, valBLSPubKey []byte) (*big.Int, error) { + var out []interface{} + err := _Vanillaregistryv2.contract.Call(opts, &out, "getBlocksTillWithdrawAllowed", valBLSPubKey) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetBlocksTillWithdrawAllowed is a free data retrieval call binding the contract method 0x14699cb9. +// +// Solidity: function getBlocksTillWithdrawAllowed(bytes valBLSPubKey) view returns(uint256) +func (_Vanillaregistryv2 *Vanillaregistryv2Session) GetBlocksTillWithdrawAllowed(valBLSPubKey []byte) (*big.Int, error) { + return _Vanillaregistryv2.Contract.GetBlocksTillWithdrawAllowed(&_Vanillaregistryv2.CallOpts, valBLSPubKey) +} + +// GetBlocksTillWithdrawAllowed is a free data retrieval call binding the contract method 0x14699cb9. +// +// Solidity: function getBlocksTillWithdrawAllowed(bytes valBLSPubKey) view returns(uint256) +func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) GetBlocksTillWithdrawAllowed(valBLSPubKey []byte) (*big.Int, error) { + return _Vanillaregistryv2.Contract.GetBlocksTillWithdrawAllowed(&_Vanillaregistryv2.CallOpts, valBLSPubKey) +} + +// GetStakedAmount is a free data retrieval call binding the contract method 0xb2a453e6. +// +// Solidity: function getStakedAmount(bytes valBLSPubKey) view returns(uint256) +func (_Vanillaregistryv2 *Vanillaregistryv2Caller) GetStakedAmount(opts *bind.CallOpts, valBLSPubKey []byte) (*big.Int, error) { + var out []interface{} + err := _Vanillaregistryv2.contract.Call(opts, &out, "getStakedAmount", valBLSPubKey) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetStakedAmount is a free data retrieval call binding the contract method 0xb2a453e6. +// +// Solidity: function getStakedAmount(bytes valBLSPubKey) view returns(uint256) +func (_Vanillaregistryv2 *Vanillaregistryv2Session) GetStakedAmount(valBLSPubKey []byte) (*big.Int, error) { + return _Vanillaregistryv2.Contract.GetStakedAmount(&_Vanillaregistryv2.CallOpts, valBLSPubKey) +} + +// GetStakedAmount is a free data retrieval call binding the contract method 0xb2a453e6. +// +// Solidity: function getStakedAmount(bytes valBLSPubKey) view returns(uint256) +func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) GetStakedAmount(valBLSPubKey []byte) (*big.Int, error) { + return _Vanillaregistryv2.Contract.GetStakedAmount(&_Vanillaregistryv2.CallOpts, valBLSPubKey) +} + +// GetStakedValidator is a free data retrieval call binding the contract method 0x1fc7c7c8. +// +// Solidity: function getStakedValidator(bytes valBLSPubKey) view returns((bool,address,uint256,(bool,uint256))) +func (_Vanillaregistryv2 *Vanillaregistryv2Caller) GetStakedValidator(opts *bind.CallOpts, valBLSPubKey []byte) (IVanillaRegistryV2StakedValidator, error) { + var out []interface{} + err := _Vanillaregistryv2.contract.Call(opts, &out, "getStakedValidator", valBLSPubKey) + + if err != nil { + return *new(IVanillaRegistryV2StakedValidator), err + } + + out0 := *abi.ConvertType(out[0], new(IVanillaRegistryV2StakedValidator)).(*IVanillaRegistryV2StakedValidator) + + return out0, err + +} + +// GetStakedValidator is a free data retrieval call binding the contract method 0x1fc7c7c8. +// +// Solidity: function getStakedValidator(bytes valBLSPubKey) view returns((bool,address,uint256,(bool,uint256))) +func (_Vanillaregistryv2 *Vanillaregistryv2Session) GetStakedValidator(valBLSPubKey []byte) (IVanillaRegistryV2StakedValidator, error) { + return _Vanillaregistryv2.Contract.GetStakedValidator(&_Vanillaregistryv2.CallOpts, valBLSPubKey) +} + +// GetStakedValidator is a free data retrieval call binding the contract method 0x1fc7c7c8. +// +// Solidity: function getStakedValidator(bytes valBLSPubKey) view returns((bool,address,uint256,(bool,uint256))) +func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) GetStakedValidator(valBLSPubKey []byte) (IVanillaRegistryV2StakedValidator, error) { + return _Vanillaregistryv2.Contract.GetStakedValidator(&_Vanillaregistryv2.CallOpts, valBLSPubKey) +} + +// IsSlashingPayoutDue is a free data retrieval call binding the contract method 0x35fe201b. +// +// Solidity: function isSlashingPayoutDue() view returns(bool) +func (_Vanillaregistryv2 *Vanillaregistryv2Caller) IsSlashingPayoutDue(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _Vanillaregistryv2.contract.Call(opts, &out, "isSlashingPayoutDue") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsSlashingPayoutDue is a free data retrieval call binding the contract method 0x35fe201b. +// +// Solidity: function isSlashingPayoutDue() view returns(bool) +func (_Vanillaregistryv2 *Vanillaregistryv2Session) IsSlashingPayoutDue() (bool, error) { + return _Vanillaregistryv2.Contract.IsSlashingPayoutDue(&_Vanillaregistryv2.CallOpts) +} + +// IsSlashingPayoutDue is a free data retrieval call binding the contract method 0x35fe201b. +// +// Solidity: function isSlashingPayoutDue() view returns(bool) +func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) IsSlashingPayoutDue() (bool, error) { + return _Vanillaregistryv2.Contract.IsSlashingPayoutDue(&_Vanillaregistryv2.CallOpts) +} + +// IsUnstaking is a free data retrieval call binding the contract method 0x388a7968. +// +// Solidity: function isUnstaking(bytes valBLSPubKey) view returns(bool) +func (_Vanillaregistryv2 *Vanillaregistryv2Caller) IsUnstaking(opts *bind.CallOpts, valBLSPubKey []byte) (bool, error) { + var out []interface{} + err := _Vanillaregistryv2.contract.Call(opts, &out, "isUnstaking", valBLSPubKey) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsUnstaking is a free data retrieval call binding the contract method 0x388a7968. +// +// Solidity: function isUnstaking(bytes valBLSPubKey) view returns(bool) +func (_Vanillaregistryv2 *Vanillaregistryv2Session) IsUnstaking(valBLSPubKey []byte) (bool, error) { + return _Vanillaregistryv2.Contract.IsUnstaking(&_Vanillaregistryv2.CallOpts, valBLSPubKey) +} + +// IsUnstaking is a free data retrieval call binding the contract method 0x388a7968. +// +// Solidity: function isUnstaking(bytes valBLSPubKey) view returns(bool) +func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) IsUnstaking(valBLSPubKey []byte) (bool, error) { + return _Vanillaregistryv2.Contract.IsUnstaking(&_Vanillaregistryv2.CallOpts, valBLSPubKey) +} + +// IsValidatorOptedIn is a free data retrieval call binding the contract method 0x470b690f. +// +// Solidity: function isValidatorOptedIn(bytes valBLSPubKey) view returns(bool) +func (_Vanillaregistryv2 *Vanillaregistryv2Caller) IsValidatorOptedIn(opts *bind.CallOpts, valBLSPubKey []byte) (bool, error) { + var out []interface{} + err := _Vanillaregistryv2.contract.Call(opts, &out, "isValidatorOptedIn", valBLSPubKey) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsValidatorOptedIn is a free data retrieval call binding the contract method 0x470b690f. +// +// Solidity: function isValidatorOptedIn(bytes valBLSPubKey) view returns(bool) +func (_Vanillaregistryv2 *Vanillaregistryv2Session) IsValidatorOptedIn(valBLSPubKey []byte) (bool, error) { + return _Vanillaregistryv2.Contract.IsValidatorOptedIn(&_Vanillaregistryv2.CallOpts, valBLSPubKey) +} + +// IsValidatorOptedIn is a free data retrieval call binding the contract method 0x470b690f. +// +// Solidity: function isValidatorOptedIn(bytes valBLSPubKey) view returns(bool) +func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) IsValidatorOptedIn(valBLSPubKey []byte) (bool, error) { + return _Vanillaregistryv2.Contract.IsValidatorOptedIn(&_Vanillaregistryv2.CallOpts, valBLSPubKey) +} + +// MinStake is a free data retrieval call binding the contract method 0x375b3c0a. +// +// Solidity: function minStake() view returns(uint256) +func (_Vanillaregistryv2 *Vanillaregistryv2Caller) MinStake(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Vanillaregistryv2.contract.Call(opts, &out, "minStake") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MinStake is a free data retrieval call binding the contract method 0x375b3c0a. +// +// Solidity: function minStake() view returns(uint256) +func (_Vanillaregistryv2 *Vanillaregistryv2Session) MinStake() (*big.Int, error) { + return _Vanillaregistryv2.Contract.MinStake(&_Vanillaregistryv2.CallOpts) +} + +// MinStake is a free data retrieval call binding the contract method 0x375b3c0a. +// +// Solidity: function minStake() view returns(uint256) +func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) MinStake() (*big.Int, error) { + return _Vanillaregistryv2.Contract.MinStake(&_Vanillaregistryv2.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Vanillaregistryv2 *Vanillaregistryv2Caller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Vanillaregistryv2.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 (_Vanillaregistryv2 *Vanillaregistryv2Session) Owner() (common.Address, error) { + return _Vanillaregistryv2.Contract.Owner(&_Vanillaregistryv2.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) Owner() (common.Address, error) { + return _Vanillaregistryv2.Contract.Owner(&_Vanillaregistryv2.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_Vanillaregistryv2 *Vanillaregistryv2Caller) Paused(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _Vanillaregistryv2.contract.Call(opts, &out, "paused") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_Vanillaregistryv2 *Vanillaregistryv2Session) Paused() (bool, error) { + return _Vanillaregistryv2.Contract.Paused(&_Vanillaregistryv2.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) Paused() (bool, error) { + return _Vanillaregistryv2.Contract.Paused(&_Vanillaregistryv2.CallOpts) +} + +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_Vanillaregistryv2 *Vanillaregistryv2Caller) PendingOwner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Vanillaregistryv2.contract.Call(opts, &out, "pendingOwner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_Vanillaregistryv2 *Vanillaregistryv2Session) PendingOwner() (common.Address, error) { + return _Vanillaregistryv2.Contract.PendingOwner(&_Vanillaregistryv2.CallOpts) +} + +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) PendingOwner() (common.Address, error) { + return _Vanillaregistryv2.Contract.PendingOwner(&_Vanillaregistryv2.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_Vanillaregistryv2 *Vanillaregistryv2Caller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _Vanillaregistryv2.contract.Call(opts, &out, "proxiableUUID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_Vanillaregistryv2 *Vanillaregistryv2Session) ProxiableUUID() ([32]byte, error) { + return _Vanillaregistryv2.Contract.ProxiableUUID(&_Vanillaregistryv2.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) ProxiableUUID() ([32]byte, error) { + return _Vanillaregistryv2.Contract.ProxiableUUID(&_Vanillaregistryv2.CallOpts) +} + +// SlashOracle is a free data retrieval call binding the contract method 0x38063b54. +// +// Solidity: function slashOracle() view returns(address) +func (_Vanillaregistryv2 *Vanillaregistryv2Caller) SlashOracle(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Vanillaregistryv2.contract.Call(opts, &out, "slashOracle") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// SlashOracle is a free data retrieval call binding the contract method 0x38063b54. +// +// Solidity: function slashOracle() view returns(address) +func (_Vanillaregistryv2 *Vanillaregistryv2Session) SlashOracle() (common.Address, error) { + return _Vanillaregistryv2.Contract.SlashOracle(&_Vanillaregistryv2.CallOpts) +} + +// SlashOracle is a free data retrieval call binding the contract method 0x38063b54. +// +// Solidity: function slashOracle() view returns(address) +func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) SlashOracle() (common.Address, error) { + return _Vanillaregistryv2.Contract.SlashOracle(&_Vanillaregistryv2.CallOpts) +} + +// SlashingFundsTracker is a free data retrieval call binding the contract method 0x6f0301bd. +// +// Solidity: function slashingFundsTracker() view returns(address recipient, uint256 accumulatedAmount, uint256 lastPayoutBlock, uint256 payoutPeriodBlocks) +func (_Vanillaregistryv2 *Vanillaregistryv2Caller) SlashingFundsTracker(opts *bind.CallOpts) (struct { + Recipient common.Address + AccumulatedAmount *big.Int + LastPayoutBlock *big.Int + PayoutPeriodBlocks *big.Int +}, error) { + var out []interface{} + err := _Vanillaregistryv2.contract.Call(opts, &out, "slashingFundsTracker") + + outstruct := new(struct { + Recipient common.Address + AccumulatedAmount *big.Int + LastPayoutBlock *big.Int + PayoutPeriodBlocks *big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.Recipient = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + outstruct.AccumulatedAmount = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.LastPayoutBlock = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.PayoutPeriodBlocks = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +// SlashingFundsTracker is a free data retrieval call binding the contract method 0x6f0301bd. +// +// Solidity: function slashingFundsTracker() view returns(address recipient, uint256 accumulatedAmount, uint256 lastPayoutBlock, uint256 payoutPeriodBlocks) +func (_Vanillaregistryv2 *Vanillaregistryv2Session) SlashingFundsTracker() (struct { + Recipient common.Address + AccumulatedAmount *big.Int + LastPayoutBlock *big.Int + PayoutPeriodBlocks *big.Int +}, error) { + return _Vanillaregistryv2.Contract.SlashingFundsTracker(&_Vanillaregistryv2.CallOpts) +} + +// SlashingFundsTracker is a free data retrieval call binding the contract method 0x6f0301bd. +// +// Solidity: function slashingFundsTracker() view returns(address recipient, uint256 accumulatedAmount, uint256 lastPayoutBlock, uint256 payoutPeriodBlocks) +func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) SlashingFundsTracker() (struct { + Recipient common.Address + AccumulatedAmount *big.Int + LastPayoutBlock *big.Int + PayoutPeriodBlocks *big.Int +}, error) { + return _Vanillaregistryv2.Contract.SlashingFundsTracker(&_Vanillaregistryv2.CallOpts) +} + +// StakedValidators is a free data retrieval call binding the contract method 0xfced6425. +// +// Solidity: function stakedValidators(bytes ) view returns(bool exists, address withdrawalAddress, uint256 balance, (bool,uint256) unstakeOccurrence) +func (_Vanillaregistryv2 *Vanillaregistryv2Caller) StakedValidators(opts *bind.CallOpts, arg0 []byte) (struct { + Exists bool + WithdrawalAddress common.Address + Balance *big.Int + UnstakeOccurrence BlockHeightOccurrenceOccurrence +}, error) { + var out []interface{} + err := _Vanillaregistryv2.contract.Call(opts, &out, "stakedValidators", arg0) + + outstruct := new(struct { + Exists bool + WithdrawalAddress common.Address + Balance *big.Int + UnstakeOccurrence BlockHeightOccurrenceOccurrence + }) + if err != nil { + return *outstruct, err + } + + outstruct.Exists = *abi.ConvertType(out[0], new(bool)).(*bool) + outstruct.WithdrawalAddress = *abi.ConvertType(out[1], new(common.Address)).(*common.Address) + outstruct.Balance = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.UnstakeOccurrence = *abi.ConvertType(out[3], new(BlockHeightOccurrenceOccurrence)).(*BlockHeightOccurrenceOccurrence) + + return *outstruct, err + +} + +// StakedValidators is a free data retrieval call binding the contract method 0xfced6425. +// +// Solidity: function stakedValidators(bytes ) view returns(bool exists, address withdrawalAddress, uint256 balance, (bool,uint256) unstakeOccurrence) +func (_Vanillaregistryv2 *Vanillaregistryv2Session) StakedValidators(arg0 []byte) (struct { + Exists bool + WithdrawalAddress common.Address + Balance *big.Int + UnstakeOccurrence BlockHeightOccurrenceOccurrence +}, error) { + return _Vanillaregistryv2.Contract.StakedValidators(&_Vanillaregistryv2.CallOpts, arg0) +} + +// StakedValidators is a free data retrieval call binding the contract method 0xfced6425. +// +// Solidity: function stakedValidators(bytes ) view returns(bool exists, address withdrawalAddress, uint256 balance, (bool,uint256) unstakeOccurrence) +func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) StakedValidators(arg0 []byte) (struct { + Exists bool + WithdrawalAddress common.Address + Balance *big.Int + UnstakeOccurrence BlockHeightOccurrenceOccurrence +}, error) { + return _Vanillaregistryv2.Contract.StakedValidators(&_Vanillaregistryv2.CallOpts, arg0) +} + +// UnstakePeriodBlocks is a free data retrieval call binding the contract method 0xc253f765. +// +// Solidity: function unstakePeriodBlocks() view returns(uint256) +func (_Vanillaregistryv2 *Vanillaregistryv2Caller) UnstakePeriodBlocks(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Vanillaregistryv2.contract.Call(opts, &out, "unstakePeriodBlocks") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// UnstakePeriodBlocks is a free data retrieval call binding the contract method 0xc253f765. +// +// Solidity: function unstakePeriodBlocks() view returns(uint256) +func (_Vanillaregistryv2 *Vanillaregistryv2Session) UnstakePeriodBlocks() (*big.Int, error) { + return _Vanillaregistryv2.Contract.UnstakePeriodBlocks(&_Vanillaregistryv2.CallOpts) +} + +// UnstakePeriodBlocks is a free data retrieval call binding the contract method 0xc253f765. +// +// Solidity: function unstakePeriodBlocks() view returns(uint256) +func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) UnstakePeriodBlocks() (*big.Int, error) { + return _Vanillaregistryv2.Contract.UnstakePeriodBlocks(&_Vanillaregistryv2.CallOpts) +} + +// WhitelistedStakers is a free data retrieval call binding the contract method 0xfdaf17f0. +// +// Solidity: function whitelistedStakers(address staker) view returns(bool whitelisted) +func (_Vanillaregistryv2 *Vanillaregistryv2Caller) WhitelistedStakers(opts *bind.CallOpts, staker common.Address) (bool, error) { + var out []interface{} + err := _Vanillaregistryv2.contract.Call(opts, &out, "whitelistedStakers", staker) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// WhitelistedStakers is a free data retrieval call binding the contract method 0xfdaf17f0. +// +// Solidity: function whitelistedStakers(address staker) view returns(bool whitelisted) +func (_Vanillaregistryv2 *Vanillaregistryv2Session) WhitelistedStakers(staker common.Address) (bool, error) { + return _Vanillaregistryv2.Contract.WhitelistedStakers(&_Vanillaregistryv2.CallOpts, staker) +} + +// WhitelistedStakers is a free data retrieval call binding the contract method 0xfdaf17f0. +// +// Solidity: function whitelistedStakers(address staker) view returns(bool whitelisted) +func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) WhitelistedStakers(staker common.Address) (bool, error) { + return _Vanillaregistryv2.Contract.WhitelistedStakers(&_Vanillaregistryv2.CallOpts, staker) +} + +// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. +// +// Solidity: function acceptOwnership() returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Vanillaregistryv2.contract.Transact(opts, "acceptOwnership") +} + +// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. +// +// Solidity: function acceptOwnership() returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Session) AcceptOwnership() (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.AcceptOwnership(&_Vanillaregistryv2.TransactOpts) +} + +// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. +// +// Solidity: function acceptOwnership() returns() +func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.AcceptOwnership(&_Vanillaregistryv2.TransactOpts) +} + +// AddStake is a paid mutator transaction binding the contract method 0x92afedf6. +// +// Solidity: function addStake(bytes[] blsPubKeys) payable returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) AddStake(opts *bind.TransactOpts, blsPubKeys [][]byte) (*types.Transaction, error) { + return _Vanillaregistryv2.contract.Transact(opts, "addStake", blsPubKeys) +} + +// AddStake is a paid mutator transaction binding the contract method 0x92afedf6. +// +// Solidity: function addStake(bytes[] blsPubKeys) payable returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Session) AddStake(blsPubKeys [][]byte) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.AddStake(&_Vanillaregistryv2.TransactOpts, blsPubKeys) +} + +// AddStake is a paid mutator transaction binding the contract method 0x92afedf6. +// +// Solidity: function addStake(bytes[] blsPubKeys) payable returns() +func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) AddStake(blsPubKeys [][]byte) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.AddStake(&_Vanillaregistryv2.TransactOpts, blsPubKeys) +} + +// ClaimForceWithdrawnFunds is a paid mutator transaction binding the contract method 0xf55690fd. +// +// Solidity: function claimForceWithdrawnFunds() returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) ClaimForceWithdrawnFunds(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Vanillaregistryv2.contract.Transact(opts, "claimForceWithdrawnFunds") +} + +// ClaimForceWithdrawnFunds is a paid mutator transaction binding the contract method 0xf55690fd. +// +// Solidity: function claimForceWithdrawnFunds() returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Session) ClaimForceWithdrawnFunds() (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.ClaimForceWithdrawnFunds(&_Vanillaregistryv2.TransactOpts) +} + +// ClaimForceWithdrawnFunds is a paid mutator transaction binding the contract method 0xf55690fd. +// +// Solidity: function claimForceWithdrawnFunds() returns() +func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) ClaimForceWithdrawnFunds() (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.ClaimForceWithdrawnFunds(&_Vanillaregistryv2.TransactOpts) +} + +// DelegateStake is a paid mutator transaction binding the contract method 0x4b7952b3. +// +// Solidity: function delegateStake(bytes[] blsPubKeys, address withdrawalAddress) payable returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) DelegateStake(opts *bind.TransactOpts, blsPubKeys [][]byte, withdrawalAddress common.Address) (*types.Transaction, error) { + return _Vanillaregistryv2.contract.Transact(opts, "delegateStake", blsPubKeys, withdrawalAddress) +} + +// DelegateStake is a paid mutator transaction binding the contract method 0x4b7952b3. +// +// Solidity: function delegateStake(bytes[] blsPubKeys, address withdrawalAddress) payable returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Session) DelegateStake(blsPubKeys [][]byte, withdrawalAddress common.Address) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.DelegateStake(&_Vanillaregistryv2.TransactOpts, blsPubKeys, withdrawalAddress) +} + +// DelegateStake is a paid mutator transaction binding the contract method 0x4b7952b3. +// +// Solidity: function delegateStake(bytes[] blsPubKeys, address withdrawalAddress) payable returns() +func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) DelegateStake(blsPubKeys [][]byte, withdrawalAddress common.Address) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.DelegateStake(&_Vanillaregistryv2.TransactOpts, blsPubKeys, withdrawalAddress) +} + +// ForceWithdrawalAsOwner is a paid mutator transaction binding the contract method 0x7cadea98. +// +// Solidity: function forceWithdrawalAsOwner(bytes[] blsPubKeys, address withdrawalAddress) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) ForceWithdrawalAsOwner(opts *bind.TransactOpts, blsPubKeys [][]byte, withdrawalAddress common.Address) (*types.Transaction, error) { + return _Vanillaregistryv2.contract.Transact(opts, "forceWithdrawalAsOwner", blsPubKeys, withdrawalAddress) +} + +// ForceWithdrawalAsOwner is a paid mutator transaction binding the contract method 0x7cadea98. +// +// Solidity: function forceWithdrawalAsOwner(bytes[] blsPubKeys, address withdrawalAddress) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Session) ForceWithdrawalAsOwner(blsPubKeys [][]byte, withdrawalAddress common.Address) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.ForceWithdrawalAsOwner(&_Vanillaregistryv2.TransactOpts, blsPubKeys, withdrawalAddress) +} + +// ForceWithdrawalAsOwner is a paid mutator transaction binding the contract method 0x7cadea98. +// +// Solidity: function forceWithdrawalAsOwner(bytes[] blsPubKeys, address withdrawalAddress) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) ForceWithdrawalAsOwner(blsPubKeys [][]byte, withdrawalAddress common.Address) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.ForceWithdrawalAsOwner(&_Vanillaregistryv2.TransactOpts, blsPubKeys, withdrawalAddress) +} + +// Initialize is a paid mutator transaction binding the contract method 0xacfb89fd. +// +// Solidity: function initialize(uint256 _minStake, address _slashOracle, address _slashReceiver, uint256 _unstakePeriodBlocks, uint256 _slashingPayoutPeriodBlocks, address _owner) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) Initialize(opts *bind.TransactOpts, _minStake *big.Int, _slashOracle common.Address, _slashReceiver common.Address, _unstakePeriodBlocks *big.Int, _slashingPayoutPeriodBlocks *big.Int, _owner common.Address) (*types.Transaction, error) { + return _Vanillaregistryv2.contract.Transact(opts, "initialize", _minStake, _slashOracle, _slashReceiver, _unstakePeriodBlocks, _slashingPayoutPeriodBlocks, _owner) +} + +// Initialize is a paid mutator transaction binding the contract method 0xacfb89fd. +// +// Solidity: function initialize(uint256 _minStake, address _slashOracle, address _slashReceiver, uint256 _unstakePeriodBlocks, uint256 _slashingPayoutPeriodBlocks, address _owner) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Session) Initialize(_minStake *big.Int, _slashOracle common.Address, _slashReceiver common.Address, _unstakePeriodBlocks *big.Int, _slashingPayoutPeriodBlocks *big.Int, _owner common.Address) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.Initialize(&_Vanillaregistryv2.TransactOpts, _minStake, _slashOracle, _slashReceiver, _unstakePeriodBlocks, _slashingPayoutPeriodBlocks, _owner) +} + +// Initialize is a paid mutator transaction binding the contract method 0xacfb89fd. +// +// Solidity: function initialize(uint256 _minStake, address _slashOracle, address _slashReceiver, uint256 _unstakePeriodBlocks, uint256 _slashingPayoutPeriodBlocks, address _owner) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) Initialize(_minStake *big.Int, _slashOracle common.Address, _slashReceiver common.Address, _unstakePeriodBlocks *big.Int, _slashingPayoutPeriodBlocks *big.Int, _owner common.Address) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.Initialize(&_Vanillaregistryv2.TransactOpts, _minStake, _slashOracle, _slashReceiver, _unstakePeriodBlocks, _slashingPayoutPeriodBlocks, _owner) +} + +// ManuallyTransferSlashingFunds is a paid mutator transaction binding the contract method 0xa1d694eb. +// +// Solidity: function manuallyTransferSlashingFunds() returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) ManuallyTransferSlashingFunds(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Vanillaregistryv2.contract.Transact(opts, "manuallyTransferSlashingFunds") +} + +// ManuallyTransferSlashingFunds is a paid mutator transaction binding the contract method 0xa1d694eb. +// +// Solidity: function manuallyTransferSlashingFunds() returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Session) ManuallyTransferSlashingFunds() (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.ManuallyTransferSlashingFunds(&_Vanillaregistryv2.TransactOpts) +} + +// ManuallyTransferSlashingFunds is a paid mutator transaction binding the contract method 0xa1d694eb. +// +// Solidity: function manuallyTransferSlashingFunds() returns() +func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) ManuallyTransferSlashingFunds() (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.ManuallyTransferSlashingFunds(&_Vanillaregistryv2.TransactOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Vanillaregistryv2.contract.Transact(opts, "pause") +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Session) Pause() (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.Pause(&_Vanillaregistryv2.TransactOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) Pause() (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.Pause(&_Vanillaregistryv2.TransactOpts) +} + +// RemoveWhitelistedStakers is a paid mutator transaction binding the contract method 0x5158c9fa. +// +// Solidity: function removeWhitelistedStakers(address[] stakers) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) RemoveWhitelistedStakers(opts *bind.TransactOpts, stakers []common.Address) (*types.Transaction, error) { + return _Vanillaregistryv2.contract.Transact(opts, "removeWhitelistedStakers", stakers) +} + +// RemoveWhitelistedStakers is a paid mutator transaction binding the contract method 0x5158c9fa. +// +// Solidity: function removeWhitelistedStakers(address[] stakers) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Session) RemoveWhitelistedStakers(stakers []common.Address) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.RemoveWhitelistedStakers(&_Vanillaregistryv2.TransactOpts, stakers) +} + +// RemoveWhitelistedStakers is a paid mutator transaction binding the contract method 0x5158c9fa. +// +// Solidity: function removeWhitelistedStakers(address[] stakers) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) RemoveWhitelistedStakers(stakers []common.Address) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.RemoveWhitelistedStakers(&_Vanillaregistryv2.TransactOpts, stakers) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Vanillaregistryv2.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Session) RenounceOwnership() (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.RenounceOwnership(&_Vanillaregistryv2.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.RenounceOwnership(&_Vanillaregistryv2.TransactOpts) +} + +// SetMinStake is a paid mutator transaction binding the contract method 0x8c80fd90. +// +// Solidity: function setMinStake(uint256 newMinStake) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) SetMinStake(opts *bind.TransactOpts, newMinStake *big.Int) (*types.Transaction, error) { + return _Vanillaregistryv2.contract.Transact(opts, "setMinStake", newMinStake) +} + +// SetMinStake is a paid mutator transaction binding the contract method 0x8c80fd90. +// +// Solidity: function setMinStake(uint256 newMinStake) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Session) SetMinStake(newMinStake *big.Int) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.SetMinStake(&_Vanillaregistryv2.TransactOpts, newMinStake) +} + +// SetMinStake is a paid mutator transaction binding the contract method 0x8c80fd90. +// +// Solidity: function setMinStake(uint256 newMinStake) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) SetMinStake(newMinStake *big.Int) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.SetMinStake(&_Vanillaregistryv2.TransactOpts, newMinStake) +} + +// SetSlashOracle is a paid mutator transaction binding the contract method 0x370baff6. +// +// Solidity: function setSlashOracle(address newSlashOracle) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) SetSlashOracle(opts *bind.TransactOpts, newSlashOracle common.Address) (*types.Transaction, error) { + return _Vanillaregistryv2.contract.Transact(opts, "setSlashOracle", newSlashOracle) +} + +// SetSlashOracle is a paid mutator transaction binding the contract method 0x370baff6. +// +// Solidity: function setSlashOracle(address newSlashOracle) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Session) SetSlashOracle(newSlashOracle common.Address) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.SetSlashOracle(&_Vanillaregistryv2.TransactOpts, newSlashOracle) +} + +// SetSlashOracle is a paid mutator transaction binding the contract method 0x370baff6. +// +// Solidity: function setSlashOracle(address newSlashOracle) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) SetSlashOracle(newSlashOracle common.Address) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.SetSlashOracle(&_Vanillaregistryv2.TransactOpts, newSlashOracle) +} + +// SetSlashReceiver is a paid mutator transaction binding the contract method 0x1a6933d5. +// +// Solidity: function setSlashReceiver(address newSlashReceiver) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) SetSlashReceiver(opts *bind.TransactOpts, newSlashReceiver common.Address) (*types.Transaction, error) { + return _Vanillaregistryv2.contract.Transact(opts, "setSlashReceiver", newSlashReceiver) +} + +// SetSlashReceiver is a paid mutator transaction binding the contract method 0x1a6933d5. +// +// Solidity: function setSlashReceiver(address newSlashReceiver) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Session) SetSlashReceiver(newSlashReceiver common.Address) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.SetSlashReceiver(&_Vanillaregistryv2.TransactOpts, newSlashReceiver) +} + +// SetSlashReceiver is a paid mutator transaction binding the contract method 0x1a6933d5. +// +// Solidity: function setSlashReceiver(address newSlashReceiver) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) SetSlashReceiver(newSlashReceiver common.Address) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.SetSlashReceiver(&_Vanillaregistryv2.TransactOpts, newSlashReceiver) +} + +// SetSlashingPayoutPeriodBlocks is a paid mutator transaction binding the contract method 0xc4828f6b. +// +// Solidity: function setSlashingPayoutPeriodBlocks(uint256 newSlashingPayoutPeriodBlocks) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) SetSlashingPayoutPeriodBlocks(opts *bind.TransactOpts, newSlashingPayoutPeriodBlocks *big.Int) (*types.Transaction, error) { + return _Vanillaregistryv2.contract.Transact(opts, "setSlashingPayoutPeriodBlocks", newSlashingPayoutPeriodBlocks) +} + +// SetSlashingPayoutPeriodBlocks is a paid mutator transaction binding the contract method 0xc4828f6b. +// +// Solidity: function setSlashingPayoutPeriodBlocks(uint256 newSlashingPayoutPeriodBlocks) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Session) SetSlashingPayoutPeriodBlocks(newSlashingPayoutPeriodBlocks *big.Int) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.SetSlashingPayoutPeriodBlocks(&_Vanillaregistryv2.TransactOpts, newSlashingPayoutPeriodBlocks) +} + +// SetSlashingPayoutPeriodBlocks is a paid mutator transaction binding the contract method 0xc4828f6b. +// +// Solidity: function setSlashingPayoutPeriodBlocks(uint256 newSlashingPayoutPeriodBlocks) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) SetSlashingPayoutPeriodBlocks(newSlashingPayoutPeriodBlocks *big.Int) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.SetSlashingPayoutPeriodBlocks(&_Vanillaregistryv2.TransactOpts, newSlashingPayoutPeriodBlocks) +} + +// SetUnstakePeriodBlocks is a paid mutator transaction binding the contract method 0xbc325c59. +// +// Solidity: function setUnstakePeriodBlocks(uint256 newUnstakePeriodBlocks) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) SetUnstakePeriodBlocks(opts *bind.TransactOpts, newUnstakePeriodBlocks *big.Int) (*types.Transaction, error) { + return _Vanillaregistryv2.contract.Transact(opts, "setUnstakePeriodBlocks", newUnstakePeriodBlocks) +} + +// SetUnstakePeriodBlocks is a paid mutator transaction binding the contract method 0xbc325c59. +// +// Solidity: function setUnstakePeriodBlocks(uint256 newUnstakePeriodBlocks) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Session) SetUnstakePeriodBlocks(newUnstakePeriodBlocks *big.Int) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.SetUnstakePeriodBlocks(&_Vanillaregistryv2.TransactOpts, newUnstakePeriodBlocks) +} + +// SetUnstakePeriodBlocks is a paid mutator transaction binding the contract method 0xbc325c59. +// +// Solidity: function setUnstakePeriodBlocks(uint256 newUnstakePeriodBlocks) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) SetUnstakePeriodBlocks(newUnstakePeriodBlocks *big.Int) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.SetUnstakePeriodBlocks(&_Vanillaregistryv2.TransactOpts, newUnstakePeriodBlocks) +} + +// Slash is a paid mutator transaction binding the contract method 0x7aa7dc14. +// +// Solidity: function slash(bytes[] blsPubKeys, bool payoutIfDue) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) Slash(opts *bind.TransactOpts, blsPubKeys [][]byte, payoutIfDue bool) (*types.Transaction, error) { + return _Vanillaregistryv2.contract.Transact(opts, "slash", blsPubKeys, payoutIfDue) +} + +// Slash is a paid mutator transaction binding the contract method 0x7aa7dc14. +// +// Solidity: function slash(bytes[] blsPubKeys, bool payoutIfDue) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Session) Slash(blsPubKeys [][]byte, payoutIfDue bool) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.Slash(&_Vanillaregistryv2.TransactOpts, blsPubKeys, payoutIfDue) +} + +// Slash is a paid mutator transaction binding the contract method 0x7aa7dc14. +// +// Solidity: function slash(bytes[] blsPubKeys, bool payoutIfDue) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) Slash(blsPubKeys [][]byte, payoutIfDue bool) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.Slash(&_Vanillaregistryv2.TransactOpts, blsPubKeys, payoutIfDue) +} + +// Stake is a paid mutator transaction binding the contract method 0x7299e0e6. +// +// Solidity: function stake(bytes[] blsPubKeys) payable returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) Stake(opts *bind.TransactOpts, blsPubKeys [][]byte) (*types.Transaction, error) { + return _Vanillaregistryv2.contract.Transact(opts, "stake", blsPubKeys) +} + +// Stake is a paid mutator transaction binding the contract method 0x7299e0e6. +// +// Solidity: function stake(bytes[] blsPubKeys) payable returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Session) Stake(blsPubKeys [][]byte) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.Stake(&_Vanillaregistryv2.TransactOpts, blsPubKeys) +} + +// Stake is a paid mutator transaction binding the contract method 0x7299e0e6. +// +// Solidity: function stake(bytes[] blsPubKeys) payable returns() +func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) Stake(blsPubKeys [][]byte) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.Stake(&_Vanillaregistryv2.TransactOpts, blsPubKeys) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _Vanillaregistryv2.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Session) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.TransferOwnership(&_Vanillaregistryv2.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.TransferOwnership(&_Vanillaregistryv2.TransactOpts, newOwner) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Vanillaregistryv2.contract.Transact(opts, "unpause") +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Session) Unpause() (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.Unpause(&_Vanillaregistryv2.TransactOpts) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) Unpause() (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.Unpause(&_Vanillaregistryv2.TransactOpts) +} + +// Unstake is a paid mutator transaction binding the contract method 0xc08a2081. +// +// Solidity: function unstake(bytes[] blsPubKeys) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) Unstake(opts *bind.TransactOpts, blsPubKeys [][]byte) (*types.Transaction, error) { + return _Vanillaregistryv2.contract.Transact(opts, "unstake", blsPubKeys) +} + +// Unstake is a paid mutator transaction binding the contract method 0xc08a2081. +// +// Solidity: function unstake(bytes[] blsPubKeys) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Session) Unstake(blsPubKeys [][]byte) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.Unstake(&_Vanillaregistryv2.TransactOpts, blsPubKeys) +} + +// Unstake is a paid mutator transaction binding the contract method 0xc08a2081. +// +// Solidity: function unstake(bytes[] blsPubKeys) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) Unstake(blsPubKeys [][]byte) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.Unstake(&_Vanillaregistryv2.TransactOpts, blsPubKeys) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _Vanillaregistryv2.contract.Transact(opts, "upgradeToAndCall", newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Session) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.UpgradeToAndCall(&_Vanillaregistryv2.TransactOpts, newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.UpgradeToAndCall(&_Vanillaregistryv2.TransactOpts, newImplementation, data) +} + +// WhitelistStakers is a paid mutator transaction binding the contract method 0x95ebffdb. +// +// Solidity: function whitelistStakers(address[] stakers) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) WhitelistStakers(opts *bind.TransactOpts, stakers []common.Address) (*types.Transaction, error) { + return _Vanillaregistryv2.contract.Transact(opts, "whitelistStakers", stakers) +} + +// WhitelistStakers is a paid mutator transaction binding the contract method 0x95ebffdb. +// +// Solidity: function whitelistStakers(address[] stakers) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Session) WhitelistStakers(stakers []common.Address) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.WhitelistStakers(&_Vanillaregistryv2.TransactOpts, stakers) +} + +// WhitelistStakers is a paid mutator transaction binding the contract method 0x95ebffdb. +// +// Solidity: function whitelistStakers(address[] stakers) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) WhitelistStakers(stakers []common.Address) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.WhitelistStakers(&_Vanillaregistryv2.TransactOpts, stakers) +} + +// Withdraw is a paid mutator transaction binding the contract method 0xdcb1edcb. +// +// Solidity: function withdraw(bytes[] blsPubKeys) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) Withdraw(opts *bind.TransactOpts, blsPubKeys [][]byte) (*types.Transaction, error) { + return _Vanillaregistryv2.contract.Transact(opts, "withdraw", blsPubKeys) +} + +// Withdraw is a paid mutator transaction binding the contract method 0xdcb1edcb. +// +// Solidity: function withdraw(bytes[] blsPubKeys) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Session) Withdraw(blsPubKeys [][]byte) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.Withdraw(&_Vanillaregistryv2.TransactOpts, blsPubKeys) +} + +// Withdraw is a paid mutator transaction binding the contract method 0xdcb1edcb. +// +// Solidity: function withdraw(bytes[] blsPubKeys) returns() +func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) Withdraw(blsPubKeys [][]byte) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.Withdraw(&_Vanillaregistryv2.TransactOpts, blsPubKeys) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) { + return _Vanillaregistryv2.contract.RawTransact(opts, calldata) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Session) Fallback(calldata []byte) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.Fallback(&_Vanillaregistryv2.TransactOpts, calldata) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) Fallback(calldata []byte) (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.Fallback(&_Vanillaregistryv2.TransactOpts, calldata) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Vanillaregistryv2.contract.RawTransact(opts, nil) // calldata is disallowed for receive function +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_Vanillaregistryv2 *Vanillaregistryv2Session) Receive() (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.Receive(&_Vanillaregistryv2.TransactOpts) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) Receive() (*types.Transaction, error) { + return _Vanillaregistryv2.Contract.Receive(&_Vanillaregistryv2.TransactOpts) +} + +// Vanillaregistryv2FeeTransferIterator is returned from FilterFeeTransfer and is used to iterate over the raw logs and unpacked data for FeeTransfer events raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2FeeTransferIterator struct { + Event *Vanillaregistryv2FeeTransfer // 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 *Vanillaregistryv2FeeTransferIterator) 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(Vanillaregistryv2FeeTransfer) + 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(Vanillaregistryv2FeeTransfer) + 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 *Vanillaregistryv2FeeTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Vanillaregistryv2FeeTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Vanillaregistryv2FeeTransfer represents a FeeTransfer event raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2FeeTransfer struct { + Amount *big.Int + Recipient common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFeeTransfer is a free log retrieval operation binding the contract event 0x445bb6587d6cd09e272a0d1e5179e772b547dbf1041b6163f86bb62e86f25031. +// +// Solidity: event FeeTransfer(uint256 amount, address indexed recipient) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterFeeTransfer(opts *bind.FilterOpts, recipient []common.Address) (*Vanillaregistryv2FeeTransferIterator, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "FeeTransfer", recipientRule) + if err != nil { + return nil, err + } + return &Vanillaregistryv2FeeTransferIterator{contract: _Vanillaregistryv2.contract, event: "FeeTransfer", logs: logs, sub: sub}, nil +} + +// WatchFeeTransfer is a free log subscription operation binding the contract event 0x445bb6587d6cd09e272a0d1e5179e772b547dbf1041b6163f86bb62e86f25031. +// +// Solidity: event FeeTransfer(uint256 amount, address indexed recipient) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchFeeTransfer(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2FeeTransfer, recipient []common.Address) (event.Subscription, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "FeeTransfer", recipientRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Vanillaregistryv2FeeTransfer) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "FeeTransfer", 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 +} + +// ParseFeeTransfer is a log parse operation binding the contract event 0x445bb6587d6cd09e272a0d1e5179e772b547dbf1041b6163f86bb62e86f25031. +// +// Solidity: event FeeTransfer(uint256 amount, address indexed recipient) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseFeeTransfer(log types.Log) (*Vanillaregistryv2FeeTransfer, error) { + event := new(Vanillaregistryv2FeeTransfer) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "FeeTransfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Vanillaregistryv2InitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2InitializedIterator struct { + Event *Vanillaregistryv2Initialized // 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 *Vanillaregistryv2InitializedIterator) 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(Vanillaregistryv2Initialized) + 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(Vanillaregistryv2Initialized) + 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 *Vanillaregistryv2InitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Vanillaregistryv2InitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Vanillaregistryv2Initialized represents a Initialized event raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2Initialized struct { + Version uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterInitialized(opts *bind.FilterOpts) (*Vanillaregistryv2InitializedIterator, error) { + + logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &Vanillaregistryv2InitializedIterator{contract: _Vanillaregistryv2.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2Initialized) (event.Subscription, error) { + + logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Vanillaregistryv2Initialized) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseInitialized(log types.Log) (*Vanillaregistryv2Initialized, error) { + event := new(Vanillaregistryv2Initialized) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Vanillaregistryv2MinStakeSetIterator is returned from FilterMinStakeSet and is used to iterate over the raw logs and unpacked data for MinStakeSet events raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2MinStakeSetIterator struct { + Event *Vanillaregistryv2MinStakeSet // 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 *Vanillaregistryv2MinStakeSetIterator) 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(Vanillaregistryv2MinStakeSet) + 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(Vanillaregistryv2MinStakeSet) + 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 *Vanillaregistryv2MinStakeSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Vanillaregistryv2MinStakeSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Vanillaregistryv2MinStakeSet represents a MinStakeSet event raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2MinStakeSet struct { + MsgSender common.Address + NewMinStake *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMinStakeSet is a free log retrieval operation binding the contract event 0xbd0f06c543aec7980853f7cb191dff311f0ef977570d34683aacc97e33b3f301. +// +// Solidity: event MinStakeSet(address indexed msgSender, uint256 newMinStake) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterMinStakeSet(opts *bind.FilterOpts, msgSender []common.Address) (*Vanillaregistryv2MinStakeSetIterator, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "MinStakeSet", msgSenderRule) + if err != nil { + return nil, err + } + return &Vanillaregistryv2MinStakeSetIterator{contract: _Vanillaregistryv2.contract, event: "MinStakeSet", logs: logs, sub: sub}, nil +} + +// WatchMinStakeSet is a free log subscription operation binding the contract event 0xbd0f06c543aec7980853f7cb191dff311f0ef977570d34683aacc97e33b3f301. +// +// Solidity: event MinStakeSet(address indexed msgSender, uint256 newMinStake) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchMinStakeSet(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2MinStakeSet, msgSender []common.Address) (event.Subscription, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "MinStakeSet", msgSenderRule) + 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(Vanillaregistryv2MinStakeSet) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "MinStakeSet", 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 +} + +// ParseMinStakeSet is a log parse operation binding the contract event 0xbd0f06c543aec7980853f7cb191dff311f0ef977570d34683aacc97e33b3f301. +// +// Solidity: event MinStakeSet(address indexed msgSender, uint256 newMinStake) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseMinStakeSet(log types.Log) (*Vanillaregistryv2MinStakeSet, error) { + event := new(Vanillaregistryv2MinStakeSet) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "MinStakeSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Vanillaregistryv2OwnershipTransferStartedIterator is returned from FilterOwnershipTransferStarted and is used to iterate over the raw logs and unpacked data for OwnershipTransferStarted events raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2OwnershipTransferStartedIterator struct { + Event *Vanillaregistryv2OwnershipTransferStarted // 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 *Vanillaregistryv2OwnershipTransferStartedIterator) 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(Vanillaregistryv2OwnershipTransferStarted) + 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(Vanillaregistryv2OwnershipTransferStarted) + 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 *Vanillaregistryv2OwnershipTransferStartedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Vanillaregistryv2OwnershipTransferStartedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Vanillaregistryv2OwnershipTransferStarted represents a OwnershipTransferStarted event raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2OwnershipTransferStarted struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferStarted is a free log retrieval operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. +// +// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterOwnershipTransferStarted(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*Vanillaregistryv2OwnershipTransferStartedIterator, 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 := _Vanillaregistryv2.contract.FilterLogs(opts, "OwnershipTransferStarted", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &Vanillaregistryv2OwnershipTransferStartedIterator{contract: _Vanillaregistryv2.contract, event: "OwnershipTransferStarted", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferStarted is a free log subscription operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. +// +// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchOwnershipTransferStarted(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2OwnershipTransferStarted, 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 := _Vanillaregistryv2.contract.WatchLogs(opts, "OwnershipTransferStarted", 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(Vanillaregistryv2OwnershipTransferStarted) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "OwnershipTransferStarted", 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 +} + +// ParseOwnershipTransferStarted is a log parse operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. +// +// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseOwnershipTransferStarted(log types.Log) (*Vanillaregistryv2OwnershipTransferStarted, error) { + event := new(Vanillaregistryv2OwnershipTransferStarted) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "OwnershipTransferStarted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Vanillaregistryv2OwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2OwnershipTransferredIterator struct { + Event *Vanillaregistryv2OwnershipTransferred // 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 *Vanillaregistryv2OwnershipTransferredIterator) 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(Vanillaregistryv2OwnershipTransferred) + 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(Vanillaregistryv2OwnershipTransferred) + 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 *Vanillaregistryv2OwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Vanillaregistryv2OwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Vanillaregistryv2OwnershipTransferred represents a OwnershipTransferred event raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2OwnershipTransferred 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 (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*Vanillaregistryv2OwnershipTransferredIterator, 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 := _Vanillaregistryv2.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &Vanillaregistryv2OwnershipTransferredIterator{contract: _Vanillaregistryv2.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 (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2OwnershipTransferred, 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 := _Vanillaregistryv2.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(Vanillaregistryv2OwnershipTransferred) + if err := _Vanillaregistryv2.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 (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseOwnershipTransferred(log types.Log) (*Vanillaregistryv2OwnershipTransferred, error) { + event := new(Vanillaregistryv2OwnershipTransferred) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Vanillaregistryv2PausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2PausedIterator struct { + Event *Vanillaregistryv2Paused // 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 *Vanillaregistryv2PausedIterator) 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(Vanillaregistryv2Paused) + 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(Vanillaregistryv2Paused) + 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 *Vanillaregistryv2PausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Vanillaregistryv2PausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Vanillaregistryv2Paused represents a Paused event raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2Paused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterPaused(opts *bind.FilterOpts) (*Vanillaregistryv2PausedIterator, error) { + + logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &Vanillaregistryv2PausedIterator{contract: _Vanillaregistryv2.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2Paused) (event.Subscription, error) { + + logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "Paused") + 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(Vanillaregistryv2Paused) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "Paused", 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 +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParsePaused(log types.Log) (*Vanillaregistryv2Paused, error) { + event := new(Vanillaregistryv2Paused) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Vanillaregistryv2SlashOracleSetIterator is returned from FilterSlashOracleSet and is used to iterate over the raw logs and unpacked data for SlashOracleSet events raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2SlashOracleSetIterator struct { + Event *Vanillaregistryv2SlashOracleSet // 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 *Vanillaregistryv2SlashOracleSetIterator) 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(Vanillaregistryv2SlashOracleSet) + 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(Vanillaregistryv2SlashOracleSet) + 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 *Vanillaregistryv2SlashOracleSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Vanillaregistryv2SlashOracleSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Vanillaregistryv2SlashOracleSet represents a SlashOracleSet event raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2SlashOracleSet struct { + MsgSender common.Address + NewSlashOracle common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSlashOracleSet is a free log retrieval operation binding the contract event 0x5b8cc95f72c2f7fba20ba3e60c77062f56cc5a2f3cba5aeaddee4c51812d27ea. +// +// Solidity: event SlashOracleSet(address indexed msgSender, address newSlashOracle) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterSlashOracleSet(opts *bind.FilterOpts, msgSender []common.Address) (*Vanillaregistryv2SlashOracleSetIterator, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "SlashOracleSet", msgSenderRule) + if err != nil { + return nil, err + } + return &Vanillaregistryv2SlashOracleSetIterator{contract: _Vanillaregistryv2.contract, event: "SlashOracleSet", logs: logs, sub: sub}, nil +} + +// WatchSlashOracleSet is a free log subscription operation binding the contract event 0x5b8cc95f72c2f7fba20ba3e60c77062f56cc5a2f3cba5aeaddee4c51812d27ea. +// +// Solidity: event SlashOracleSet(address indexed msgSender, address newSlashOracle) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchSlashOracleSet(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2SlashOracleSet, msgSender []common.Address) (event.Subscription, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "SlashOracleSet", msgSenderRule) + 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(Vanillaregistryv2SlashOracleSet) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "SlashOracleSet", 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 +} + +// ParseSlashOracleSet is a log parse operation binding the contract event 0x5b8cc95f72c2f7fba20ba3e60c77062f56cc5a2f3cba5aeaddee4c51812d27ea. +// +// Solidity: event SlashOracleSet(address indexed msgSender, address newSlashOracle) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseSlashOracleSet(log types.Log) (*Vanillaregistryv2SlashOracleSet, error) { + event := new(Vanillaregistryv2SlashOracleSet) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "SlashOracleSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Vanillaregistryv2SlashReceiverSetIterator is returned from FilterSlashReceiverSet and is used to iterate over the raw logs and unpacked data for SlashReceiverSet events raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2SlashReceiverSetIterator struct { + Event *Vanillaregistryv2SlashReceiverSet // 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 *Vanillaregistryv2SlashReceiverSetIterator) 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(Vanillaregistryv2SlashReceiverSet) + 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(Vanillaregistryv2SlashReceiverSet) + 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 *Vanillaregistryv2SlashReceiverSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Vanillaregistryv2SlashReceiverSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Vanillaregistryv2SlashReceiverSet represents a SlashReceiverSet event raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2SlashReceiverSet struct { + MsgSender common.Address + NewSlashReceiver common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSlashReceiverSet is a free log retrieval operation binding the contract event 0xf7f99ea479b331e341a35cdf347f232a35dd611f889867759df261eeb540770a. +// +// Solidity: event SlashReceiverSet(address indexed msgSender, address newSlashReceiver) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterSlashReceiverSet(opts *bind.FilterOpts, msgSender []common.Address) (*Vanillaregistryv2SlashReceiverSetIterator, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "SlashReceiverSet", msgSenderRule) + if err != nil { + return nil, err + } + return &Vanillaregistryv2SlashReceiverSetIterator{contract: _Vanillaregistryv2.contract, event: "SlashReceiverSet", logs: logs, sub: sub}, nil +} + +// WatchSlashReceiverSet is a free log subscription operation binding the contract event 0xf7f99ea479b331e341a35cdf347f232a35dd611f889867759df261eeb540770a. +// +// Solidity: event SlashReceiverSet(address indexed msgSender, address newSlashReceiver) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchSlashReceiverSet(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2SlashReceiverSet, msgSender []common.Address) (event.Subscription, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "SlashReceiverSet", msgSenderRule) + 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(Vanillaregistryv2SlashReceiverSet) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "SlashReceiverSet", 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 +} + +// ParseSlashReceiverSet is a log parse operation binding the contract event 0xf7f99ea479b331e341a35cdf347f232a35dd611f889867759df261eeb540770a. +// +// Solidity: event SlashReceiverSet(address indexed msgSender, address newSlashReceiver) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseSlashReceiverSet(log types.Log) (*Vanillaregistryv2SlashReceiverSet, error) { + event := new(Vanillaregistryv2SlashReceiverSet) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "SlashReceiverSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Vanillaregistryv2SlashedIterator is returned from FilterSlashed and is used to iterate over the raw logs and unpacked data for Slashed events raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2SlashedIterator struct { + Event *Vanillaregistryv2Slashed // 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 *Vanillaregistryv2SlashedIterator) 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(Vanillaregistryv2Slashed) + 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(Vanillaregistryv2Slashed) + 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 *Vanillaregistryv2SlashedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Vanillaregistryv2SlashedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Vanillaregistryv2Slashed represents a Slashed event raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2Slashed struct { + MsgSender common.Address + SlashReceiver common.Address + WithdrawalAddress common.Address + ValBLSPubKey []byte + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSlashed is a free log retrieval operation binding the contract event 0xf15b8630ce764d5dbcfaaa9843c3e5fcdb460aaaa46d7dc3ff4f19ca4096fc07. +// +// Solidity: event Slashed(address indexed msgSender, address indexed slashReceiver, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterSlashed(opts *bind.FilterOpts, msgSender []common.Address, slashReceiver []common.Address, withdrawalAddress []common.Address) (*Vanillaregistryv2SlashedIterator, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + var slashReceiverRule []interface{} + for _, slashReceiverItem := range slashReceiver { + slashReceiverRule = append(slashReceiverRule, slashReceiverItem) + } + var withdrawalAddressRule []interface{} + for _, withdrawalAddressItem := range withdrawalAddress { + withdrawalAddressRule = append(withdrawalAddressRule, withdrawalAddressItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "Slashed", msgSenderRule, slashReceiverRule, withdrawalAddressRule) + if err != nil { + return nil, err + } + return &Vanillaregistryv2SlashedIterator{contract: _Vanillaregistryv2.contract, event: "Slashed", logs: logs, sub: sub}, nil +} + +// WatchSlashed is a free log subscription operation binding the contract event 0xf15b8630ce764d5dbcfaaa9843c3e5fcdb460aaaa46d7dc3ff4f19ca4096fc07. +// +// Solidity: event Slashed(address indexed msgSender, address indexed slashReceiver, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchSlashed(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2Slashed, msgSender []common.Address, slashReceiver []common.Address, withdrawalAddress []common.Address) (event.Subscription, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + var slashReceiverRule []interface{} + for _, slashReceiverItem := range slashReceiver { + slashReceiverRule = append(slashReceiverRule, slashReceiverItem) + } + var withdrawalAddressRule []interface{} + for _, withdrawalAddressItem := range withdrawalAddress { + withdrawalAddressRule = append(withdrawalAddressRule, withdrawalAddressItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "Slashed", msgSenderRule, slashReceiverRule, withdrawalAddressRule) + 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(Vanillaregistryv2Slashed) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "Slashed", 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 +} + +// ParseSlashed is a log parse operation binding the contract event 0xf15b8630ce764d5dbcfaaa9843c3e5fcdb460aaaa46d7dc3ff4f19ca4096fc07. +// +// Solidity: event Slashed(address indexed msgSender, address indexed slashReceiver, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseSlashed(log types.Log) (*Vanillaregistryv2Slashed, error) { + event := new(Vanillaregistryv2Slashed) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "Slashed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Vanillaregistryv2SlashingPayoutPeriodBlocksSetIterator is returned from FilterSlashingPayoutPeriodBlocksSet and is used to iterate over the raw logs and unpacked data for SlashingPayoutPeriodBlocksSet events raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2SlashingPayoutPeriodBlocksSetIterator struct { + Event *Vanillaregistryv2SlashingPayoutPeriodBlocksSet // 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 *Vanillaregistryv2SlashingPayoutPeriodBlocksSetIterator) 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(Vanillaregistryv2SlashingPayoutPeriodBlocksSet) + 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(Vanillaregistryv2SlashingPayoutPeriodBlocksSet) + 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 *Vanillaregistryv2SlashingPayoutPeriodBlocksSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Vanillaregistryv2SlashingPayoutPeriodBlocksSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Vanillaregistryv2SlashingPayoutPeriodBlocksSet represents a SlashingPayoutPeriodBlocksSet event raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2SlashingPayoutPeriodBlocksSet struct { + MsgSender common.Address + NewSlashingPayoutPeriodBlocks *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSlashingPayoutPeriodBlocksSet is a free log retrieval operation binding the contract event 0x537af662b191583a2538de843160914f46fd6033598c645efd5f9ac3cb3f650e. +// +// Solidity: event SlashingPayoutPeriodBlocksSet(address indexed msgSender, uint256 newSlashingPayoutPeriodBlocks) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterSlashingPayoutPeriodBlocksSet(opts *bind.FilterOpts, msgSender []common.Address) (*Vanillaregistryv2SlashingPayoutPeriodBlocksSetIterator, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "SlashingPayoutPeriodBlocksSet", msgSenderRule) + if err != nil { + return nil, err + } + return &Vanillaregistryv2SlashingPayoutPeriodBlocksSetIterator{contract: _Vanillaregistryv2.contract, event: "SlashingPayoutPeriodBlocksSet", logs: logs, sub: sub}, nil +} + +// WatchSlashingPayoutPeriodBlocksSet is a free log subscription operation binding the contract event 0x537af662b191583a2538de843160914f46fd6033598c645efd5f9ac3cb3f650e. +// +// Solidity: event SlashingPayoutPeriodBlocksSet(address indexed msgSender, uint256 newSlashingPayoutPeriodBlocks) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchSlashingPayoutPeriodBlocksSet(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2SlashingPayoutPeriodBlocksSet, msgSender []common.Address) (event.Subscription, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "SlashingPayoutPeriodBlocksSet", msgSenderRule) + 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(Vanillaregistryv2SlashingPayoutPeriodBlocksSet) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "SlashingPayoutPeriodBlocksSet", 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 +} + +// ParseSlashingPayoutPeriodBlocksSet is a log parse operation binding the contract event 0x537af662b191583a2538de843160914f46fd6033598c645efd5f9ac3cb3f650e. +// +// Solidity: event SlashingPayoutPeriodBlocksSet(address indexed msgSender, uint256 newSlashingPayoutPeriodBlocks) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseSlashingPayoutPeriodBlocksSet(log types.Log) (*Vanillaregistryv2SlashingPayoutPeriodBlocksSet, error) { + event := new(Vanillaregistryv2SlashingPayoutPeriodBlocksSet) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "SlashingPayoutPeriodBlocksSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Vanillaregistryv2StakeAddedIterator is returned from FilterStakeAdded and is used to iterate over the raw logs and unpacked data for StakeAdded events raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2StakeAddedIterator struct { + Event *Vanillaregistryv2StakeAdded // 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 *Vanillaregistryv2StakeAddedIterator) 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(Vanillaregistryv2StakeAdded) + 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(Vanillaregistryv2StakeAdded) + 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 *Vanillaregistryv2StakeAddedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Vanillaregistryv2StakeAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Vanillaregistryv2StakeAdded represents a StakeAdded event raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2StakeAdded struct { + MsgSender common.Address + WithdrawalAddress common.Address + ValBLSPubKey []byte + Amount *big.Int + NewBalance *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterStakeAdded is a free log retrieval operation binding the contract event 0xb01516cc7ddda8b10127c714474503b38a75b9afa8a4e4b9da306e61181980c7. +// +// Solidity: event StakeAdded(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount, uint256 newBalance) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterStakeAdded(opts *bind.FilterOpts, msgSender []common.Address, withdrawalAddress []common.Address) (*Vanillaregistryv2StakeAddedIterator, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + var withdrawalAddressRule []interface{} + for _, withdrawalAddressItem := range withdrawalAddress { + withdrawalAddressRule = append(withdrawalAddressRule, withdrawalAddressItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "StakeAdded", msgSenderRule, withdrawalAddressRule) + if err != nil { + return nil, err + } + return &Vanillaregistryv2StakeAddedIterator{contract: _Vanillaregistryv2.contract, event: "StakeAdded", logs: logs, sub: sub}, nil +} + +// WatchStakeAdded is a free log subscription operation binding the contract event 0xb01516cc7ddda8b10127c714474503b38a75b9afa8a4e4b9da306e61181980c7. +// +// Solidity: event StakeAdded(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount, uint256 newBalance) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchStakeAdded(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2StakeAdded, msgSender []common.Address, withdrawalAddress []common.Address) (event.Subscription, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + var withdrawalAddressRule []interface{} + for _, withdrawalAddressItem := range withdrawalAddress { + withdrawalAddressRule = append(withdrawalAddressRule, withdrawalAddressItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "StakeAdded", msgSenderRule, withdrawalAddressRule) + 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(Vanillaregistryv2StakeAdded) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "StakeAdded", 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 +} + +// ParseStakeAdded is a log parse operation binding the contract event 0xb01516cc7ddda8b10127c714474503b38a75b9afa8a4e4b9da306e61181980c7. +// +// Solidity: event StakeAdded(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount, uint256 newBalance) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseStakeAdded(log types.Log) (*Vanillaregistryv2StakeAdded, error) { + event := new(Vanillaregistryv2StakeAdded) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "StakeAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Vanillaregistryv2StakeWithdrawnIterator is returned from FilterStakeWithdrawn and is used to iterate over the raw logs and unpacked data for StakeWithdrawn events raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2StakeWithdrawnIterator struct { + Event *Vanillaregistryv2StakeWithdrawn // 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 *Vanillaregistryv2StakeWithdrawnIterator) 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(Vanillaregistryv2StakeWithdrawn) + 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(Vanillaregistryv2StakeWithdrawn) + 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 *Vanillaregistryv2StakeWithdrawnIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Vanillaregistryv2StakeWithdrawnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Vanillaregistryv2StakeWithdrawn represents a StakeWithdrawn event raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2StakeWithdrawn struct { + MsgSender common.Address + WithdrawalAddress common.Address + ValBLSPubKey []byte + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterStakeWithdrawn is a free log retrieval operation binding the contract event 0x3ff0f1758b0b95c72d1f781b732306588b99dabb298fec793499eb8803b05465. +// +// Solidity: event StakeWithdrawn(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterStakeWithdrawn(opts *bind.FilterOpts, msgSender []common.Address, withdrawalAddress []common.Address) (*Vanillaregistryv2StakeWithdrawnIterator, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + var withdrawalAddressRule []interface{} + for _, withdrawalAddressItem := range withdrawalAddress { + withdrawalAddressRule = append(withdrawalAddressRule, withdrawalAddressItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "StakeWithdrawn", msgSenderRule, withdrawalAddressRule) + if err != nil { + return nil, err + } + return &Vanillaregistryv2StakeWithdrawnIterator{contract: _Vanillaregistryv2.contract, event: "StakeWithdrawn", logs: logs, sub: sub}, nil +} + +// WatchStakeWithdrawn is a free log subscription operation binding the contract event 0x3ff0f1758b0b95c72d1f781b732306588b99dabb298fec793499eb8803b05465. +// +// Solidity: event StakeWithdrawn(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchStakeWithdrawn(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2StakeWithdrawn, msgSender []common.Address, withdrawalAddress []common.Address) (event.Subscription, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + var withdrawalAddressRule []interface{} + for _, withdrawalAddressItem := range withdrawalAddress { + withdrawalAddressRule = append(withdrawalAddressRule, withdrawalAddressItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "StakeWithdrawn", msgSenderRule, withdrawalAddressRule) + 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(Vanillaregistryv2StakeWithdrawn) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "StakeWithdrawn", 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 +} + +// ParseStakeWithdrawn is a log parse operation binding the contract event 0x3ff0f1758b0b95c72d1f781b732306588b99dabb298fec793499eb8803b05465. +// +// Solidity: event StakeWithdrawn(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseStakeWithdrawn(log types.Log) (*Vanillaregistryv2StakeWithdrawn, error) { + event := new(Vanillaregistryv2StakeWithdrawn) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "StakeWithdrawn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Vanillaregistryv2StakedIterator is returned from FilterStaked and is used to iterate over the raw logs and unpacked data for Staked events raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2StakedIterator struct { + Event *Vanillaregistryv2Staked // 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 *Vanillaregistryv2StakedIterator) 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(Vanillaregistryv2Staked) + 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(Vanillaregistryv2Staked) + 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 *Vanillaregistryv2StakedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Vanillaregistryv2StakedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Vanillaregistryv2Staked represents a Staked event raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2Staked struct { + MsgSender common.Address + WithdrawalAddress common.Address + ValBLSPubKey []byte + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterStaked is a free log retrieval operation binding the contract event 0x1c9a8e1c32f2ea144885ec1a1398b5d51d627f9532fb2614516322a0b8087de5. +// +// Solidity: event Staked(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterStaked(opts *bind.FilterOpts, msgSender []common.Address, withdrawalAddress []common.Address) (*Vanillaregistryv2StakedIterator, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + var withdrawalAddressRule []interface{} + for _, withdrawalAddressItem := range withdrawalAddress { + withdrawalAddressRule = append(withdrawalAddressRule, withdrawalAddressItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "Staked", msgSenderRule, withdrawalAddressRule) + if err != nil { + return nil, err + } + return &Vanillaregistryv2StakedIterator{contract: _Vanillaregistryv2.contract, event: "Staked", logs: logs, sub: sub}, nil +} + +// WatchStaked is a free log subscription operation binding the contract event 0x1c9a8e1c32f2ea144885ec1a1398b5d51d627f9532fb2614516322a0b8087de5. +// +// Solidity: event Staked(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchStaked(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2Staked, msgSender []common.Address, withdrawalAddress []common.Address) (event.Subscription, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + var withdrawalAddressRule []interface{} + for _, withdrawalAddressItem := range withdrawalAddress { + withdrawalAddressRule = append(withdrawalAddressRule, withdrawalAddressItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "Staked", msgSenderRule, withdrawalAddressRule) + 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(Vanillaregistryv2Staked) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "Staked", 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 +} + +// ParseStaked is a log parse operation binding the contract event 0x1c9a8e1c32f2ea144885ec1a1398b5d51d627f9532fb2614516322a0b8087de5. +// +// Solidity: event Staked(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseStaked(log types.Log) (*Vanillaregistryv2Staked, error) { + event := new(Vanillaregistryv2Staked) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "Staked", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Vanillaregistryv2StakerRemovedFromWhitelistIterator is returned from FilterStakerRemovedFromWhitelist and is used to iterate over the raw logs and unpacked data for StakerRemovedFromWhitelist events raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2StakerRemovedFromWhitelistIterator struct { + Event *Vanillaregistryv2StakerRemovedFromWhitelist // 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 *Vanillaregistryv2StakerRemovedFromWhitelistIterator) 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(Vanillaregistryv2StakerRemovedFromWhitelist) + 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(Vanillaregistryv2StakerRemovedFromWhitelist) + 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 *Vanillaregistryv2StakerRemovedFromWhitelistIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Vanillaregistryv2StakerRemovedFromWhitelistIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Vanillaregistryv2StakerRemovedFromWhitelist represents a StakerRemovedFromWhitelist event raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2StakerRemovedFromWhitelist struct { + MsgSender common.Address + Staker common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterStakerRemovedFromWhitelist is a free log retrieval operation binding the contract event 0x79fccea9ca325c6c715589de68546a63a35425178d1a8b1436bef7f7a76087a4. +// +// Solidity: event StakerRemovedFromWhitelist(address indexed msgSender, address staker) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterStakerRemovedFromWhitelist(opts *bind.FilterOpts, msgSender []common.Address) (*Vanillaregistryv2StakerRemovedFromWhitelistIterator, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "StakerRemovedFromWhitelist", msgSenderRule) + if err != nil { + return nil, err + } + return &Vanillaregistryv2StakerRemovedFromWhitelistIterator{contract: _Vanillaregistryv2.contract, event: "StakerRemovedFromWhitelist", logs: logs, sub: sub}, nil +} + +// WatchStakerRemovedFromWhitelist is a free log subscription operation binding the contract event 0x79fccea9ca325c6c715589de68546a63a35425178d1a8b1436bef7f7a76087a4. +// +// Solidity: event StakerRemovedFromWhitelist(address indexed msgSender, address staker) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchStakerRemovedFromWhitelist(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2StakerRemovedFromWhitelist, msgSender []common.Address) (event.Subscription, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "StakerRemovedFromWhitelist", msgSenderRule) + 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(Vanillaregistryv2StakerRemovedFromWhitelist) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "StakerRemovedFromWhitelist", 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 +} + +// ParseStakerRemovedFromWhitelist is a log parse operation binding the contract event 0x79fccea9ca325c6c715589de68546a63a35425178d1a8b1436bef7f7a76087a4. +// +// Solidity: event StakerRemovedFromWhitelist(address indexed msgSender, address staker) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseStakerRemovedFromWhitelist(log types.Log) (*Vanillaregistryv2StakerRemovedFromWhitelist, error) { + event := new(Vanillaregistryv2StakerRemovedFromWhitelist) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "StakerRemovedFromWhitelist", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Vanillaregistryv2StakerWhitelistedIterator is returned from FilterStakerWhitelisted and is used to iterate over the raw logs and unpacked data for StakerWhitelisted events raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2StakerWhitelistedIterator struct { + Event *Vanillaregistryv2StakerWhitelisted // 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 *Vanillaregistryv2StakerWhitelistedIterator) 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(Vanillaregistryv2StakerWhitelisted) + 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(Vanillaregistryv2StakerWhitelisted) + 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 *Vanillaregistryv2StakerWhitelistedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Vanillaregistryv2StakerWhitelistedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Vanillaregistryv2StakerWhitelisted represents a StakerWhitelisted event raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2StakerWhitelisted struct { + MsgSender common.Address + Staker common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterStakerWhitelisted is a free log retrieval operation binding the contract event 0xc94be990bcb425c41f84d9928ad9082894fb4f1f1d2508bc088d3a6a3e4059db. +// +// Solidity: event StakerWhitelisted(address indexed msgSender, address staker) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterStakerWhitelisted(opts *bind.FilterOpts, msgSender []common.Address) (*Vanillaregistryv2StakerWhitelistedIterator, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "StakerWhitelisted", msgSenderRule) + if err != nil { + return nil, err + } + return &Vanillaregistryv2StakerWhitelistedIterator{contract: _Vanillaregistryv2.contract, event: "StakerWhitelisted", logs: logs, sub: sub}, nil +} + +// WatchStakerWhitelisted is a free log subscription operation binding the contract event 0xc94be990bcb425c41f84d9928ad9082894fb4f1f1d2508bc088d3a6a3e4059db. +// +// Solidity: event StakerWhitelisted(address indexed msgSender, address staker) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchStakerWhitelisted(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2StakerWhitelisted, msgSender []common.Address) (event.Subscription, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "StakerWhitelisted", msgSenderRule) + 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(Vanillaregistryv2StakerWhitelisted) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "StakerWhitelisted", 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 +} + +// ParseStakerWhitelisted is a log parse operation binding the contract event 0xc94be990bcb425c41f84d9928ad9082894fb4f1f1d2508bc088d3a6a3e4059db. +// +// Solidity: event StakerWhitelisted(address indexed msgSender, address staker) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseStakerWhitelisted(log types.Log) (*Vanillaregistryv2StakerWhitelisted, error) { + event := new(Vanillaregistryv2StakerWhitelisted) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "StakerWhitelisted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Vanillaregistryv2TotalStakeWithdrawnIterator is returned from FilterTotalStakeWithdrawn and is used to iterate over the raw logs and unpacked data for TotalStakeWithdrawn events raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2TotalStakeWithdrawnIterator struct { + Event *Vanillaregistryv2TotalStakeWithdrawn // 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 *Vanillaregistryv2TotalStakeWithdrawnIterator) 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(Vanillaregistryv2TotalStakeWithdrawn) + 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(Vanillaregistryv2TotalStakeWithdrawn) + 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 *Vanillaregistryv2TotalStakeWithdrawnIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Vanillaregistryv2TotalStakeWithdrawnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Vanillaregistryv2TotalStakeWithdrawn represents a TotalStakeWithdrawn event raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2TotalStakeWithdrawn struct { + MsgSender common.Address + WithdrawalAddress common.Address + TotalAmount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTotalStakeWithdrawn is a free log retrieval operation binding the contract event 0xf0ac877c24c32b3466c3766ad66c170058d5f4ae8347c93bc5adc21b10c14cbe. +// +// Solidity: event TotalStakeWithdrawn(address indexed msgSender, address indexed withdrawalAddress, uint256 totalAmount) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterTotalStakeWithdrawn(opts *bind.FilterOpts, msgSender []common.Address, withdrawalAddress []common.Address) (*Vanillaregistryv2TotalStakeWithdrawnIterator, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + var withdrawalAddressRule []interface{} + for _, withdrawalAddressItem := range withdrawalAddress { + withdrawalAddressRule = append(withdrawalAddressRule, withdrawalAddressItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "TotalStakeWithdrawn", msgSenderRule, withdrawalAddressRule) + if err != nil { + return nil, err + } + return &Vanillaregistryv2TotalStakeWithdrawnIterator{contract: _Vanillaregistryv2.contract, event: "TotalStakeWithdrawn", logs: logs, sub: sub}, nil +} + +// WatchTotalStakeWithdrawn is a free log subscription operation binding the contract event 0xf0ac877c24c32b3466c3766ad66c170058d5f4ae8347c93bc5adc21b10c14cbe. +// +// Solidity: event TotalStakeWithdrawn(address indexed msgSender, address indexed withdrawalAddress, uint256 totalAmount) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchTotalStakeWithdrawn(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2TotalStakeWithdrawn, msgSender []common.Address, withdrawalAddress []common.Address) (event.Subscription, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + var withdrawalAddressRule []interface{} + for _, withdrawalAddressItem := range withdrawalAddress { + withdrawalAddressRule = append(withdrawalAddressRule, withdrawalAddressItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "TotalStakeWithdrawn", msgSenderRule, withdrawalAddressRule) + 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(Vanillaregistryv2TotalStakeWithdrawn) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "TotalStakeWithdrawn", 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 +} + +// ParseTotalStakeWithdrawn is a log parse operation binding the contract event 0xf0ac877c24c32b3466c3766ad66c170058d5f4ae8347c93bc5adc21b10c14cbe. +// +// Solidity: event TotalStakeWithdrawn(address indexed msgSender, address indexed withdrawalAddress, uint256 totalAmount) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseTotalStakeWithdrawn(log types.Log) (*Vanillaregistryv2TotalStakeWithdrawn, error) { + event := new(Vanillaregistryv2TotalStakeWithdrawn) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "TotalStakeWithdrawn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Vanillaregistryv2UnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2UnpausedIterator struct { + Event *Vanillaregistryv2Unpaused // 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 *Vanillaregistryv2UnpausedIterator) 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(Vanillaregistryv2Unpaused) + 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(Vanillaregistryv2Unpaused) + 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 *Vanillaregistryv2UnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Vanillaregistryv2UnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Vanillaregistryv2Unpaused represents a Unpaused event raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2Unpaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterUnpaused(opts *bind.FilterOpts) (*Vanillaregistryv2UnpausedIterator, error) { + + logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &Vanillaregistryv2UnpausedIterator{contract: _Vanillaregistryv2.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2Unpaused) (event.Subscription, error) { + + logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "Unpaused") + 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(Vanillaregistryv2Unpaused) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "Unpaused", 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 +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseUnpaused(log types.Log) (*Vanillaregistryv2Unpaused, error) { + event := new(Vanillaregistryv2Unpaused) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Vanillaregistryv2UnstakePeriodBlocksSetIterator is returned from FilterUnstakePeriodBlocksSet and is used to iterate over the raw logs and unpacked data for UnstakePeriodBlocksSet events raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2UnstakePeriodBlocksSetIterator struct { + Event *Vanillaregistryv2UnstakePeriodBlocksSet // 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 *Vanillaregistryv2UnstakePeriodBlocksSetIterator) 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(Vanillaregistryv2UnstakePeriodBlocksSet) + 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(Vanillaregistryv2UnstakePeriodBlocksSet) + 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 *Vanillaregistryv2UnstakePeriodBlocksSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Vanillaregistryv2UnstakePeriodBlocksSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Vanillaregistryv2UnstakePeriodBlocksSet represents a UnstakePeriodBlocksSet event raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2UnstakePeriodBlocksSet struct { + MsgSender common.Address + NewUnstakePeriodBlocks *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnstakePeriodBlocksSet is a free log retrieval operation binding the contract event 0x1c7b684565a5bbbb1e7647588e4e6cf72ffa21a25545a4385f2074132aa51613. +// +// Solidity: event UnstakePeriodBlocksSet(address indexed msgSender, uint256 newUnstakePeriodBlocks) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterUnstakePeriodBlocksSet(opts *bind.FilterOpts, msgSender []common.Address) (*Vanillaregistryv2UnstakePeriodBlocksSetIterator, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "UnstakePeriodBlocksSet", msgSenderRule) + if err != nil { + return nil, err + } + return &Vanillaregistryv2UnstakePeriodBlocksSetIterator{contract: _Vanillaregistryv2.contract, event: "UnstakePeriodBlocksSet", logs: logs, sub: sub}, nil +} + +// WatchUnstakePeriodBlocksSet is a free log subscription operation binding the contract event 0x1c7b684565a5bbbb1e7647588e4e6cf72ffa21a25545a4385f2074132aa51613. +// +// Solidity: event UnstakePeriodBlocksSet(address indexed msgSender, uint256 newUnstakePeriodBlocks) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchUnstakePeriodBlocksSet(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2UnstakePeriodBlocksSet, msgSender []common.Address) (event.Subscription, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "UnstakePeriodBlocksSet", msgSenderRule) + 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(Vanillaregistryv2UnstakePeriodBlocksSet) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "UnstakePeriodBlocksSet", 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 +} + +// ParseUnstakePeriodBlocksSet is a log parse operation binding the contract event 0x1c7b684565a5bbbb1e7647588e4e6cf72ffa21a25545a4385f2074132aa51613. +// +// Solidity: event UnstakePeriodBlocksSet(address indexed msgSender, uint256 newUnstakePeriodBlocks) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseUnstakePeriodBlocksSet(log types.Log) (*Vanillaregistryv2UnstakePeriodBlocksSet, error) { + event := new(Vanillaregistryv2UnstakePeriodBlocksSet) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "UnstakePeriodBlocksSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Vanillaregistryv2UnstakedIterator is returned from FilterUnstaked and is used to iterate over the raw logs and unpacked data for Unstaked events raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2UnstakedIterator struct { + Event *Vanillaregistryv2Unstaked // 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 *Vanillaregistryv2UnstakedIterator) 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(Vanillaregistryv2Unstaked) + 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(Vanillaregistryv2Unstaked) + 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 *Vanillaregistryv2UnstakedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Vanillaregistryv2UnstakedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Vanillaregistryv2Unstaked represents a Unstaked event raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2Unstaked struct { + MsgSender common.Address + WithdrawalAddress common.Address + ValBLSPubKey []byte + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnstaked is a free log retrieval operation binding the contract event 0x104975b81462e4e991f38b5b4158bf402b1528cd36ac80b123aef9d06dd0e1a9. +// +// Solidity: event Unstaked(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterUnstaked(opts *bind.FilterOpts, msgSender []common.Address, withdrawalAddress []common.Address) (*Vanillaregistryv2UnstakedIterator, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + var withdrawalAddressRule []interface{} + for _, withdrawalAddressItem := range withdrawalAddress { + withdrawalAddressRule = append(withdrawalAddressRule, withdrawalAddressItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "Unstaked", msgSenderRule, withdrawalAddressRule) + if err != nil { + return nil, err + } + return &Vanillaregistryv2UnstakedIterator{contract: _Vanillaregistryv2.contract, event: "Unstaked", logs: logs, sub: sub}, nil +} + +// WatchUnstaked is a free log subscription operation binding the contract event 0x104975b81462e4e991f38b5b4158bf402b1528cd36ac80b123aef9d06dd0e1a9. +// +// Solidity: event Unstaked(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchUnstaked(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2Unstaked, msgSender []common.Address, withdrawalAddress []common.Address) (event.Subscription, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + var withdrawalAddressRule []interface{} + for _, withdrawalAddressItem := range withdrawalAddress { + withdrawalAddressRule = append(withdrawalAddressRule, withdrawalAddressItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "Unstaked", msgSenderRule, withdrawalAddressRule) + 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(Vanillaregistryv2Unstaked) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "Unstaked", 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 +} + +// ParseUnstaked is a log parse operation binding the contract event 0x104975b81462e4e991f38b5b4158bf402b1528cd36ac80b123aef9d06dd0e1a9. +// +// Solidity: event Unstaked(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseUnstaked(log types.Log) (*Vanillaregistryv2Unstaked, error) { + event := new(Vanillaregistryv2Unstaked) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "Unstaked", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Vanillaregistryv2UpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2UpgradedIterator struct { + Event *Vanillaregistryv2Upgraded // 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 *Vanillaregistryv2UpgradedIterator) 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(Vanillaregistryv2Upgraded) + 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(Vanillaregistryv2Upgraded) + 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 *Vanillaregistryv2UpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Vanillaregistryv2UpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Vanillaregistryv2Upgraded represents a Upgraded event raised by the Vanillaregistryv2 contract. +type Vanillaregistryv2Upgraded struct { + Implementation common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*Vanillaregistryv2UpgradedIterator, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return &Vanillaregistryv2UpgradedIterator{contract: _Vanillaregistryv2.contract, event: "Upgraded", logs: logs, sub: sub}, nil +} + +// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2Upgraded, implementation []common.Address) (event.Subscription, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "Upgraded", implementationRule) + 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(Vanillaregistryv2Upgraded) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "Upgraded", 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 +} + +// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseUpgraded(log types.Log) (*Vanillaregistryv2Upgraded, error) { + event := new(Vanillaregistryv2Upgraded) + if err := _Vanillaregistryv2.contract.UnpackLog(event, "Upgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/contracts-abi/script.sh b/contracts-abi/script.sh index 343174af9..0004f573e 100755 --- a/contracts-abi/script.sh +++ b/contracts-abi/script.sh @@ -36,6 +36,8 @@ extract_and_save_abi "$BASE_DIR/out/L1Gateway.sol/L1Gateway.json" "$ABI_DIR/L1Ga extract_and_save_abi "$BASE_DIR/out/VanillaRegistry.sol/VanillaRegistry.json" "$ABI_DIR/VanillaRegistry.abi" +extract_and_save_abi "$BASE_DIR/out/VanillaRegistryV2.sol/VanillaRegistryV2.json" "$ABI_DIR/VanillaRegistryV2.abi" + extract_and_save_abi "$BASE_DIR/out/BlockTracker.sol/BlockTracker.json" "$ABI_DIR/BlockTracker.abi" extract_and_save_abi "$BASE_DIR/out/MevCommitAVS.sol/MevCommitAVS.json" "$ABI_DIR/MevCommitAVS.abi" @@ -109,6 +111,8 @@ generate_go_code "$ABI_DIR/SettlementGateway.abi" "SettlementGateway" "settlemen # Generate Go code for L1Gateway.abi generate_go_code "$ABI_DIR/L1Gateway.abi" "L1Gateway" "l1gateway" +generate_go_code "$ABI_DIR/VanillaRegistryV2.abi" "VanillaRegistryV2" "vanillaregistryv2" + generate_go_code "$ABI_DIR/VanillaRegistry.abi" "VanillaRegistry" "vanillaregistry" generate_go_code "$ABI_DIR/BlockTracker.abi" "BlockTracker" "blocktracker" diff --git a/contracts/.solhintignore b/contracts/.solhintignore index 9153096bf..f838dfa5a 100644 --- a/contracts/.solhintignore +++ b/contracts/.solhintignore @@ -1,3 +1,4 @@ lib/ test/ node_modules/ +contracts/validator-registry/VanillaRegistry.sol \ No newline at end of file diff --git a/contracts/contracts/interfaces/IVanillaRegistry.sol b/contracts/contracts/interfaces/IVanillaRegistry.sol index 930ee223d..e722014cc 100644 --- a/contracts/contracts/interfaces/IVanillaRegistry.sol +++ b/contracts/contracts/interfaces/IVanillaRegistry.sol @@ -48,12 +48,6 @@ interface IVanillaRegistry { /// @dev Event emitted when the slashing payout period blocks parameter is set. event SlashingPayoutPeriodBlocksSet(address indexed msgSender, uint256 newSlashingPayoutPeriodBlocks); - /// @dev Event emitted when a staker is whitelisted. - event StakerWhitelisted(address indexed msgSender, address staker); - - /// @dev Event emitted when a staker is removed from the whitelist. - event StakerRemovedFromWhitelist(address indexed msgSender, address staker); - error ValidatorRecordMustExist(bytes valBLSPubKey); error ValidatorRecordMustNotExist(bytes valBLSPubKey); error ValidatorCannotBeUnstaking(bytes valBLSPubKey); @@ -69,15 +63,13 @@ interface IVanillaRegistry { error WithdrawalFailed(); error NoFundsToWithdraw(); error SlashingTransferFailed(); + error MinStakeMustBePositive(); error SlashAmountMustBePositive(); error SlashAmountMustBeLessThanMinStake(); error SlashOracleMustBeSet(); error SlashReceiverMustBeSet(); error UnstakePeriodMustBePositive(); error SlashingPayoutPeriodMustBePositive(); - error SenderIsNotWhitelistedStaker(address sender); - error StakerAlreadyWhitelisted(address staker); - error StakerNotWhitelisted(address staker); /// @dev Initializes the contract with the provided parameters. function initialize( @@ -159,4 +151,4 @@ interface IVanillaRegistry { /// @dev Returns the number of blocks remaining until an unstaking validator can withdraw their staked ETH. function getBlocksTillWithdrawAllowed(bytes calldata valBLSPubKey) external view returns (uint256); -} +} \ No newline at end of file diff --git a/contracts/contracts/interfaces/IVanillaRegistryV2.sol b/contracts/contracts/interfaces/IVanillaRegistryV2.sol new file mode 100644 index 000000000..2881bcabf --- /dev/null +++ b/contracts/contracts/interfaces/IVanillaRegistryV2.sol @@ -0,0 +1,162 @@ +// SPDX-License-Identifier: BSL 1.1 +pragma solidity 0.8.26; + +import { BlockHeightOccurrence } from "../utils/Occurrence.sol"; + +/// @title IVanillaRegistryV2 +/// @notice Interface for the VanillaRegistry contract for validators. +interface IVanillaRegistryV2 { + + /// @dev Struct representing a validator staked with the registry. + struct StakedValidator { + bool exists; + address withdrawalAddress; + uint256 balance; + BlockHeightOccurrence.Occurrence unstakeOccurrence; + } + + /// @dev Event emitted when a validator is staked. + event Staked(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount); + + /// @dev Event emitted when ETH is added to the staked balance a validator. + event StakeAdded(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount, uint256 newBalance); + + /// @dev Event emitted when a validator is unstaked. + event Unstaked(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount); + + /// @dev Event emitted when a validator's stake is withdrawn. + event StakeWithdrawn(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount); + + /// @dev Event emitted when total stake is withdrawn. + event TotalStakeWithdrawn(address indexed msgSender, address indexed withdrawalAddress, uint256 totalAmount); + + /// @dev Event emitted when a validator is slashed. + event Slashed(address indexed msgSender, address indexed slashReceiver, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount); + + /// @dev Event emitted when the min stake parameter is set. + event MinStakeSet(address indexed msgSender, uint256 newMinStake); + + /// @dev Event emitted when the slash oracle parameter is set. + event SlashOracleSet(address indexed msgSender, address newSlashOracle); + + /// @dev Event emitted when the slash receiver parameter is set. + event SlashReceiverSet(address indexed msgSender, address newSlashReceiver); + + /// @dev Event emitted when the unstake period blocks parameter is set. + event UnstakePeriodBlocksSet(address indexed msgSender, uint256 newUnstakePeriodBlocks); + + /// @dev Event emitted when the slashing payout period blocks parameter is set. + event SlashingPayoutPeriodBlocksSet(address indexed msgSender, uint256 newSlashingPayoutPeriodBlocks); + + /// @dev Event emitted when a staker is whitelisted. + event StakerWhitelisted(address indexed msgSender, address staker); + + /// @dev Event emitted when a staker is removed from the whitelist. + event StakerRemovedFromWhitelist(address indexed msgSender, address staker); + + error ValidatorRecordMustExist(bytes valBLSPubKey); + error ValidatorRecordMustNotExist(bytes valBLSPubKey); + error ValidatorCannotBeUnstaking(bytes valBLSPubKey); + error SenderIsNotWithdrawalAddress(address sender, address withdrawalAddress); + error InvalidBLSPubKeyLength(uint256 expected, uint256 actual); + error SenderIsNotSlashOracle(address sender, address slashOracle); + error WithdrawalAddressMustBeSet(); + error MustUnstakeToWithdraw(); + error AtLeastOneRecipientRequired(); + error StakeTooLowForNumberOfKeys(uint256 msgValue, uint256 required); + error WithdrawingTooSoon(); + error WithdrawalAddressMismatch(address actualWithdrawalAddress, address expectedWithdrawalAddress); + error WithdrawalFailed(); + error NoFundsToWithdraw(); + error SlashingTransferFailed(); + error SlashAmountMustBePositive(); + error SlashAmountMustBeLessThanMinStake(); + error SlashOracleMustBeSet(); + error SlashReceiverMustBeSet(); + error UnstakePeriodMustBePositive(); + error SlashingPayoutPeriodMustBePositive(); + error SenderIsNotWhitelistedStaker(address sender); + error StakerAlreadyWhitelisted(address staker); + error StakerNotWhitelisted(address staker); + + /// @dev Initializes the contract with the provided parameters. + function initialize( + uint256 _minStake, + address _slashOracle, + address _slashReceiver, + uint256 _unstakePeriodBlocks, + uint256 _slashingPayoutPeriodBlocks, + address _owner + ) external; + + /* + * @dev Stakes ETH on behalf of one or multiple validators via their BLS pubkey. + * @param blsPubKeys The validator BLS public keys to stake. + */ + function stake(bytes[] calldata blsPubKeys) external payable; + + /* + * @dev Stakes ETH on behalf of one or multiple validators via their BLS pubkey, + * and specifies an address other than msg.sender to be the withdrawal address. + * @param blsPubKeys The validator BLS public keys to stake. + * @param withdrawalAddress The address to receive the staked ETH. + */ + function delegateStake(bytes[] calldata blsPubKeys, address withdrawalAddress) external payable; + + /* + * @dev Adds ETH to the staked balance of one or multiple validators via their BLS pubkey. + * @dev A staking entry must already exist for each provided BLS pubkey. + * @param blsPubKeys The BLS public keys to add stake to. + */ + function addStake(bytes[] calldata blsPubKeys) external payable; + + /* + * @dev Unstakes ETH on behalf of one or multiple validators via their BLS pubkey. + * @param blsPubKeys The BLS public keys to unstake. + */ + function unstake(bytes[] calldata blsPubKeys) external; + + /* + * @dev Withdraws ETH on behalf of one or multiple validators via their BLS pubkey. + * @param blsPubKeys The BLS public keys to withdraw. + */ + function withdraw(bytes[] calldata blsPubKeys) external; + + /// @dev Allows oracle to slash some portion of stake for one or multiple validators via their BLS pubkey. + /// @param blsPubKeys The BLS public keys to slash. + /// @param payoutIfDue Whether to payout slashed funds to receiver if the payout period is due. + function slash(bytes[] calldata blsPubKeys, bool payoutIfDue) external; + + /// @dev Enables the owner to pause the contract. + function pause() external; + + /// @dev Enables the owner to unpause the contract. + function unpause() external; + + /// @dev Enables the owner to set the minimum stake parameter. + function setMinStake(uint256 newMinStake) external; + + /// @dev Enables the owner to set the slash oracle parameter. + function setSlashOracle(address newSlashOracle) external; + + /// @dev Enables the owner to set the slash receiver parameter. + function setSlashReceiver(address newSlashReceiver) external; + + /// @dev Enables the owner to set the unstake period parameter. + function setUnstakePeriodBlocks(uint256 newUnstakePeriodBlocks) external; + + /// @dev Returns true if a validator is considered "opted-in" to mev-commit via this registry. + function isValidatorOptedIn(bytes calldata valBLSPubKey) external view returns (bool); + + /// @dev Returns stored staked validator struct for a given BLS pubkey. + function getStakedValidator(bytes calldata valBLSPubKey) external view returns (StakedValidator memory); + + /// @dev Returns the staked amount for a given BLS pubkey. + function getStakedAmount(bytes calldata valBLSPubKey) external view returns (uint256); + + /// @dev Returns true if a validator is currently unstaking. + function isUnstaking(bytes calldata valBLSPubKey) external view returns (bool); + + /// @dev Returns the number of blocks remaining until an unstaking validator can withdraw their staked ETH. + function getBlocksTillWithdrawAllowed(bytes calldata valBLSPubKey) external view returns (uint256); +} diff --git a/contracts/contracts/validator-registry/VanillaRegistry.sol b/contracts/contracts/validator-registry/VanillaRegistry.sol index 266fc0eb9..ced3dd878 100644 --- a/contracts/contracts/validator-registry/VanillaRegistry.sol +++ b/contracts/contracts/validator-registry/VanillaRegistry.sol @@ -31,28 +31,12 @@ contract VanillaRegistry is IVanillaRegistry, VanillaRegistryStorage, _; } - /// @dev Modifier to confirm the sender is whitelisted. - modifier onlyWhitelistedStaker() { - require(whitelistedStakers[msg.sender], IVanillaRegistry.SenderIsNotWhitelistedStaker(msg.sender)); - _; - } - /// @dev See https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable#initializing_the_implementation_contract /// @custom:oz-upgrades-unsafe-allow constructor constructor() { _disableInitializers(); } - /// @dev Receive function is disabled for this contract to prevent unintended interactions. - receive() external payable { - revert Errors.InvalidReceive(); - } - - /// @dev Fallback function to revert all calls, ensuring no unintended interactions. - fallback() external payable { - revert Errors.InvalidFallback(); - } - /// @dev Initializes the contract with the provided parameters. function initialize( uint256 _minStake, @@ -62,7 +46,6 @@ contract VanillaRegistry is IVanillaRegistry, VanillaRegistryStorage, uint256 _slashingPayoutPeriodBlocks, address _owner ) external initializer { - __Pausable_init(); _setMinStake(_minStake); _setSlashOracle(_slashOracle); _setUnstakePeriodBlocks(_unstakePeriodBlocks); @@ -70,12 +53,22 @@ contract VanillaRegistry is IVanillaRegistry, VanillaRegistryStorage, __Ownable_init(_owner); } + /// @dev Receive function is disabled for this contract to prevent unintended interactions. + receive() external payable { + revert Errors.InvalidReceive(); + } + + /// @dev Fallback function to revert all calls, ensuring no unintended interactions. + fallback() external payable { + revert Errors.InvalidFallback(); + } + /* * @dev Stakes ETH on behalf of one or multiple validators via their BLS pubkey. * @param blsPubKeys The validator BLS public keys to stake. */ function stake(bytes[] calldata blsPubKeys) external payable - onlyValidBLSPubKeys(blsPubKeys) onlyWhitelistedStaker() whenNotPaused() { + onlyValidBLSPubKeys(blsPubKeys) whenNotPaused() { _stake(blsPubKeys, msg.sender); } @@ -96,7 +89,7 @@ contract VanillaRegistry is IVanillaRegistry, VanillaRegistryStorage, * @dev A staking entry must already exist for each provided BLS pubkey. * @param blsPubKeys The BLS public keys to add stake to. */ - function addStake(bytes[] calldata blsPubKeys) external payable onlyWhitelistedStaker() whenNotPaused() { + function addStake(bytes[] calldata blsPubKeys) external payable whenNotPaused() { _addStake(blsPubKeys); } @@ -186,26 +179,6 @@ contract VanillaRegistry is IVanillaRegistry, VanillaRegistryStorage, FeePayout.transferToRecipient(slashingFundsTracker); } - /// @dev Enables the owner to whitelist stakers. - function whitelistStakers(address[] calldata stakers) external onlyOwner { - uint256 len = stakers.length; - for (uint256 i = 0; i < len; ++i) { - require(!whitelistedStakers[stakers[i]], IVanillaRegistry.StakerAlreadyWhitelisted(stakers[i])); - whitelistedStakers[stakers[i]] = true; - emit StakerWhitelisted(msg.sender, stakers[i]); - } - } - - /// @dev Enables the owner to remove stakers from the whitelist. - function removeWhitelistedStakers(address[] calldata stakers) external onlyOwner { - uint256 len = stakers.length; - for (uint256 i = 0; i < len; ++i) { - require(whitelistedStakers[stakers[i]], IVanillaRegistry.StakerNotWhitelisted(stakers[i])); - whitelistedStakers[stakers[i]] = false; - emit StakerRemovedFromWhitelist(msg.sender, stakers[i]); - } - } - /// @dev Returns true if a validator is considered "opted-in" to mev-commit via this registry. function isValidatorOptedIn(bytes calldata valBLSPubKey) external view returns (bool) { return _isValidatorOptedIn(valBLSPubKey); @@ -392,6 +365,7 @@ contract VanillaRegistry is IVanillaRegistry, VanillaRegistryStorage, /// @dev Internal function to set the minimum stake parameter. function _setMinStake(uint256 newMinStake) internal { + require(newMinStake != 0, IVanillaRegistry.MinStakeMustBePositive()); minStake = newMinStake; emit MinStakeSet(msg.sender, newMinStake); } @@ -426,13 +400,11 @@ contract VanillaRegistry is IVanillaRegistry, VanillaRegistryStorage, /// @dev Internal function to check if a validator is considered "opted-in" to mev-commit via this registry. function _isValidatorOptedIn(bytes calldata valBLSPubKey) internal view returns (bool) { - return !_isUnstaking(valBLSPubKey) && - stakedValidators[valBLSPubKey].balance >= minStake && - whitelistedStakers[stakedValidators[valBLSPubKey].withdrawalAddress]; + return !_isUnstaking(valBLSPubKey) && stakedValidators[valBLSPubKey].balance >= minStake; } /// @dev Internal function to check if a validator is currently unstaking. function _isUnstaking(bytes calldata valBLSPubKey) internal view returns (bool) { return stakedValidators[valBLSPubKey].unstakeOccurrence.exists; } -} +} \ No newline at end of file diff --git a/contracts/contracts/validator-registry/VanillaRegistryStorage.sol b/contracts/contracts/validator-registry/VanillaRegistryStorage.sol index bad13a36a..eef164b57 100644 --- a/contracts/contracts/validator-registry/VanillaRegistryStorage.sol +++ b/contracts/contracts/validator-registry/VanillaRegistryStorage.sol @@ -26,9 +26,6 @@ contract VanillaRegistryStorage { /// @dev Mapping of withdrawal addresses to claimable ETH that was force withdrawn by the owner. mapping(address withdrawalAddress => uint256 amountToClaim) public forceWithdrawnFunds; - /// @dev Mapping of staker addresses to whether they are whitelisted. - mapping(address staker => bool whitelisted) public whitelistedStakers; - /// @dev See https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable#storage-gaps - uint256[47] private __gap; -} + uint256[48] private __gap; +} \ No newline at end of file diff --git a/contracts/contracts/validator-registry/VanillaRegistryStorageV2.sol b/contracts/contracts/validator-registry/VanillaRegistryStorageV2.sol new file mode 100644 index 000000000..83731e2e1 --- /dev/null +++ b/contracts/contracts/validator-registry/VanillaRegistryStorageV2.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: BSL 1.1 +pragma solidity 0.8.26; + +import {IVanillaRegistryV2} from "../interfaces/IVanillaRegistryV2.sol"; +import {FeePayout} from "../utils/FeePayout.sol"; + +/// @title VanillaRegistryStorage +/// @notice Storage components of the VanillaRegistry contract. +contract VanillaRegistryStorageV2 { + + /// @dev Minimum stake required for validators, also used as the slash amount. + uint256 public minStake; + + /// @dev Permissioned account that is able to invoke slashes. + address public slashOracle; + + /// @dev Number of blocks required between unstake initiation and withdrawal. + uint256 public unstakePeriodBlocks; + + /// @dev Struct enabling automatic slashing funds payouts + FeePayout.Tracker public slashingFundsTracker; + + /// @dev Mapping of BLS pubkeys to stored staked validator structs. + mapping(bytes => IVanillaRegistryV2.StakedValidator) public stakedValidators; + + /// @dev Mapping of withdrawal addresses to claimable ETH that was force withdrawn by the owner. + mapping(address withdrawalAddress => uint256 amountToClaim) public forceWithdrawnFunds; + + /// @dev Mapping of staker addresses to whether they are whitelisted. + mapping(address staker => bool whitelisted) public whitelistedStakers; + + /// @dev See https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable#storage-gaps + uint256[47] private __gap; +} diff --git a/contracts/contracts/validator-registry/VanillaRegistryV2.sol b/contracts/contracts/validator-registry/VanillaRegistryV2.sol new file mode 100644 index 000000000..c67374518 --- /dev/null +++ b/contracts/contracts/validator-registry/VanillaRegistryV2.sol @@ -0,0 +1,438 @@ +// SPDX-License-Identifier: BSL 1.1 +pragma solidity 0.8.26; + +import {IVanillaRegistryV2} from "../interfaces/IVanillaRegistryV2.sol"; +import {VanillaRegistryStorageV2} from "./VanillaRegistryStorageV2.sol"; +import {BlockHeightOccurrence} from "../utils/Occurrence.sol"; +import {Ownable2StepUpgradeable} from "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol"; +import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol"; +import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; +import {Errors} from "../utils/Errors.sol"; +import {FeePayout} from "../utils/FeePayout.sol"; + +/// @title Vanilla Registry +/// @notice Logic contract enabling L1 validators to opt-in to mev-commit +/// via simply staking ETH outside what's staked with the beacon chain. +contract VanillaRegistryV2 is IVanillaRegistryV2, VanillaRegistryStorageV2, + Ownable2StepUpgradeable, PausableUpgradeable, UUPSUpgradeable { + + /// @dev Modifier to confirm all provided BLS pubkeys are valid length. + modifier onlyValidBLSPubKeys(bytes[] calldata blsPubKeys) { + uint256 len = blsPubKeys.length; + for (uint256 i = 0; i < len; ++i) { + require(blsPubKeys[i].length == 48, IVanillaRegistryV2.InvalidBLSPubKeyLength(48, blsPubKeys[i].length)); + } + _; + } + + /// @dev Modifier to confirm the sender is the oracle account. + modifier onlySlashOracle() { + require(msg.sender == slashOracle, IVanillaRegistryV2.SenderIsNotSlashOracle(msg.sender, slashOracle)); + _; + } + + /// @dev Modifier to confirm the sender is whitelisted. + modifier onlyWhitelistedStaker() { + require(whitelistedStakers[msg.sender], IVanillaRegistryV2.SenderIsNotWhitelistedStaker(msg.sender)); + _; + } + + /// @dev See https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable#initializing_the_implementation_contract + /// @custom:oz-upgrades-unsafe-allow constructor + constructor() { + _disableInitializers(); + } + + /// @dev Receive function is disabled for this contract to prevent unintended interactions. + receive() external payable { + revert Errors.InvalidReceive(); + } + + /// @dev Fallback function to revert all calls, ensuring no unintended interactions. + fallback() external payable { + revert Errors.InvalidFallback(); + } + + /// @dev Initializes the contract with the provided parameters. + function initialize( + uint256 _minStake, + address _slashOracle, + address _slashReceiver, + uint256 _unstakePeriodBlocks, + uint256 _slashingPayoutPeriodBlocks, + address _owner + ) external initializer { + __Pausable_init(); + _setMinStake(_minStake); + _setSlashOracle(_slashOracle); + _setUnstakePeriodBlocks(_unstakePeriodBlocks); + FeePayout.init(slashingFundsTracker, _slashReceiver, _slashingPayoutPeriodBlocks); + __Ownable_init(_owner); + } + + /* + * @dev Stakes ETH on behalf of one or multiple validators via their BLS pubkey. + * @param blsPubKeys The validator BLS public keys to stake. + */ + function stake(bytes[] calldata blsPubKeys) external payable + onlyValidBLSPubKeys(blsPubKeys) onlyWhitelistedStaker() whenNotPaused() { + _stake(blsPubKeys, msg.sender); + } + + /* + * @dev Stakes ETH on behalf of one or multiple validators via their BLS pubkey, + * and specifies an address other than msg.sender to be the withdrawal address. + * @param blsPubKeys The validator BLS public keys to stake. + * @param withdrawalAddress The address to receive the staked ETH. + */ + function delegateStake(bytes[] calldata blsPubKeys, address withdrawalAddress) external payable + onlyValidBLSPubKeys(blsPubKeys) onlyOwner { + require(withdrawalAddress != address(0), IVanillaRegistryV2.WithdrawalAddressMustBeSet()); + _stake(blsPubKeys, withdrawalAddress); + } + + /* + * @dev Adds ETH to the staked balance of one or multiple validators via their BLS pubkey. + * @dev A staking entry must already exist for each provided BLS pubkey. + * @param blsPubKeys The BLS public keys to add stake to. + */ + function addStake(bytes[] calldata blsPubKeys) external payable onlyWhitelistedStaker() whenNotPaused() { + _addStake(blsPubKeys); + } + + /* + * @dev Unstakes ETH on behalf of one or multiple validators via their BLS pubkey. + * @param blsPubKeys The BLS public keys to unstake. + */ + function unstake(bytes[] calldata blsPubKeys) external whenNotPaused() { + _unstake(blsPubKeys); + } + + /// @dev Allows owner to withdraw ETH on behalf of one or multiple validators via their BLS pubkey. + /// @param blsPubKeys The BLS public keys to withdraw. + /// @dev msg.sender must be the withdrawal address for every provided validator pubkey as enforced in _withdraw. + function withdraw(bytes[] calldata blsPubKeys) external whenNotPaused() { + uint256 totalAmount = _withdraw(blsPubKeys, msg.sender); + if (totalAmount != 0) { + (bool success, ) = msg.sender.call{value: totalAmount}(""); + require(success, IVanillaRegistryV2.WithdrawalFailed()); + } + } + + /// @dev Allows owner to withdraw ETH on behalf of one or multiple validators via their BLS pubkey. + /// @param blsPubKeys The BLS public keys to withdraw. + /// @param withdrawalAddress The address to receive the staked ETH. + /// @dev withdrawalAddress must be the withdrawal address for every provided validator pubkeyas enforced in _withdraw. + function forceWithdrawalAsOwner(bytes[] calldata blsPubKeys, address withdrawalAddress) external onlyOwner { + uint256 totalAmount = _withdraw(blsPubKeys, withdrawalAddress); + if (totalAmount != 0) { + forceWithdrawnFunds[withdrawalAddress] += totalAmount; + } + } + + /// @dev Allows a withdrawal address to claim any ETH that was force withdrawn by the owner. + function claimForceWithdrawnFunds() external { + uint256 amountToClaim = forceWithdrawnFunds[msg.sender]; + require(amountToClaim != 0, IVanillaRegistryV2.NoFundsToWithdraw()); + forceWithdrawnFunds[msg.sender] = 0; + (bool success, ) = msg.sender.call{value: amountToClaim}(""); + require(success, IVanillaRegistryV2.WithdrawalFailed()); + } + + /// @dev Allows oracle to slash some portion of stake for one or multiple validators via their BLS pubkey. + /// @param blsPubKeys The BLS public keys to slash. + /// @param payoutIfDue Whether to payout slashed funds to receiver if the payout period is due. + function slash(bytes[] calldata blsPubKeys, bool payoutIfDue) external onlySlashOracle whenNotPaused() { + _slash(blsPubKeys, payoutIfDue); + } + + /// @dev Enables the owner to pause the contract. + function pause() external onlyOwner { + _pause(); + } + + /// @dev Enables the owner to unpause the contract. + function unpause() external onlyOwner { + _unpause(); + } + + /// @dev Enables the owner to set the minimum stake parameter. + function setMinStake(uint256 newMinStake) external onlyOwner { + _setMinStake(newMinStake); + } + + /// @dev Enables the owner to set the slash oracle parameter. + function setSlashOracle(address newSlashOracle) external onlyOwner { + _setSlashOracle(newSlashOracle); + } + + /// @dev Enables the owner to set the slash receiver parameter. + function setSlashReceiver(address newSlashReceiver) external onlyOwner { + _setSlashReceiver(newSlashReceiver); + } + + /// @dev Enables the owner to set the unstake period parameter. + function setUnstakePeriodBlocks(uint256 newUnstakePeriodBlocks) external onlyOwner { + _setUnstakePeriodBlocks(newUnstakePeriodBlocks); + } + + /// @dev Enables the owner to set the slashing payout period parameter. + function setSlashingPayoutPeriodBlocks(uint256 newSlashingPayoutPeriodBlocks) external onlyOwner { + _setSlashingPayoutPeriodBlocks(newSlashingPayoutPeriodBlocks); + } + + /// @dev Enables the owner to manually transfer slashing funds. + function manuallyTransferSlashingFunds() external onlyOwner { + FeePayout.transferToRecipient(slashingFundsTracker); + } + + /// @dev Enables the owner to whitelist stakers. + function whitelistStakers(address[] calldata stakers) external onlyOwner { + uint256 len = stakers.length; + for (uint256 i = 0; i < len; ++i) { + require(!whitelistedStakers[stakers[i]], IVanillaRegistryV2.StakerAlreadyWhitelisted(stakers[i])); + whitelistedStakers[stakers[i]] = true; + emit StakerWhitelisted(msg.sender, stakers[i]); + } + } + + /// @dev Enables the owner to remove stakers from the whitelist. + function removeWhitelistedStakers(address[] calldata stakers) external onlyOwner { + uint256 len = stakers.length; + for (uint256 i = 0; i < len; ++i) { + require(whitelistedStakers[stakers[i]], IVanillaRegistryV2.StakerNotWhitelisted(stakers[i])); + whitelistedStakers[stakers[i]] = false; + emit StakerRemovedFromWhitelist(msg.sender, stakers[i]); + } + } + + /// @dev Returns true if a validator is considered "opted-in" to mev-commit via this registry. + function isValidatorOptedIn(bytes calldata valBLSPubKey) external view returns (bool) { + return _isValidatorOptedIn(valBLSPubKey); + } + + /// @dev Returns stored staked validator struct for a given BLS pubkey. + function getStakedValidator(bytes calldata valBLSPubKey) external view returns (StakedValidator memory) { + return stakedValidators[valBLSPubKey]; + } + + /// @dev Returns the staked amount for a given BLS pubkey. + function getStakedAmount(bytes calldata valBLSPubKey) external view returns (uint256) { + return stakedValidators[valBLSPubKey].balance; + } + + /// @dev Returns true if a validator is currently unstaking. + function isUnstaking(bytes calldata valBLSPubKey) external view returns (bool) { + return _isUnstaking(valBLSPubKey); + } + + /// @dev Returns the number of blocks remaining until an unstaking validator can withdraw their staked ETH. + function getBlocksTillWithdrawAllowed(bytes calldata valBLSPubKey) external view returns (uint256) { + require(_isUnstaking(valBLSPubKey), IVanillaRegistryV2.MustUnstakeToWithdraw()); + uint256 blocksSinceUnstakeInitiated = block.number - stakedValidators[valBLSPubKey].unstakeOccurrence.blockHeight; + return blocksSinceUnstakeInitiated > unstakePeriodBlocks ? 0 : unstakePeriodBlocks - blocksSinceUnstakeInitiated; + } + + /// @dev Returns true if the slashing payout period is due. + function isSlashingPayoutDue() external view returns (bool) { + return FeePayout.isPayoutDue(slashingFundsTracker); + } + + function getAccumulatedSlashingFunds() external view returns (uint256) { + return slashingFundsTracker.accumulatedAmount; + } + + /* + * @dev implements _authorizeUpgrade from UUPSUpgradeable to enable only + * the owner to upgrade the implementation contract. + */ + // solhint-disable-next-line no-empty-blocks + function _authorizeUpgrade(address) internal override onlyOwner {} + + /// @dev Internal function that splits msg.value stake to apply an action for each validator. + function _splitStakeAndApplyAction( + bytes[] calldata blsPubKeys, + address withdrawalAddress, + function(bytes calldata, uint256, address) internal action + ) internal { + require(blsPubKeys.length != 0, IVanillaRegistryV2.AtLeastOneRecipientRequired()); + uint256 baseStakeAmount = msg.value / blsPubKeys.length; + uint256 lastStakeAmount = msg.value - (baseStakeAmount * (blsPubKeys.length - 1)); + uint256 numKeys = blsPubKeys.length; + for (uint256 i = 0; i < numKeys; ++i) { + uint256 stakeAmount = (i == numKeys - 1) ? lastStakeAmount : baseStakeAmount; + action(blsPubKeys[i], stakeAmount, withdrawalAddress); + } + } + + /* + * @dev Internal function to stake ETH on behalf of one or multiple validators via their BLS pubkey. + * @param blsPubKeys The validator BLS public keys to stake. + * @param withdrawalAddress The address to receive the staked ETH. + */ + function _stake(bytes[] calldata blsPubKeys, address withdrawalAddress) internal { + // At least minStake must be staked for each pubkey. + require(msg.value >= minStake * blsPubKeys.length, IVanillaRegistryV2.StakeTooLowForNumberOfKeys(msg.value, minStake * blsPubKeys.length)); + _splitStakeAndApplyAction(blsPubKeys, withdrawalAddress, _stakeAction); + } + + /// @dev Internal function that creates a staked validator record and emits a Staked event. + function _stakeAction(bytes calldata pubKey, uint256 stakeAmount, address withdrawalAddress) internal { + require(!stakedValidators[pubKey].exists, IVanillaRegistryV2.ValidatorRecordMustNotExist(pubKey)); + stakedValidators[pubKey] = StakedValidator({ + exists: true, + balance: stakeAmount, + withdrawalAddress: withdrawalAddress, + unstakeOccurrence: BlockHeightOccurrence.Occurrence({ exists: false, blockHeight: 0 }) + }); + emit Staked(msg.sender, withdrawalAddress, pubKey, stakeAmount); + } + + /* + * @dev Internal function to add ETH to the staked balance of one or multiple validators via their BLS pubkey. + * @param blsPubKeys The BLS public keys to add stake to. + */ + function _addStake(bytes[] calldata blsPubKeys) internal { + // At least 1 wei must be added for each pubkey. + require(msg.value >= blsPubKeys.length, IVanillaRegistryV2.StakeTooLowForNumberOfKeys(msg.value, blsPubKeys.length)); + _splitStakeAndApplyAction(blsPubKeys, address(0), _addStakeAction); + } + + /// @dev Internal function that adds stake to an already existing validator record, emitting a StakeAdded event. + function _addStakeAction(bytes calldata pubKey, uint256 stakeAmount, address) internal { + IVanillaRegistryV2.StakedValidator storage validator = stakedValidators[pubKey]; + require(validator.exists, IVanillaRegistryV2.ValidatorRecordMustExist(pubKey)); + require(validator.withdrawalAddress == msg.sender, + IVanillaRegistryV2.SenderIsNotWithdrawalAddress(msg.sender, validator.withdrawalAddress)); + require(!_isUnstaking(pubKey), IVanillaRegistryV2.ValidatorCannotBeUnstaking(pubKey)); + validator.balance += stakeAmount; + emit StakeAdded(msg.sender, validator.withdrawalAddress, pubKey, stakeAmount, validator.balance); + } + + /* + * @dev Internal function to unstake ETH on behalf of one or multiple validators via their BLS pubkey. + * @param blsPubKeys The BLS public keys to unstake. + */ + function _unstake(bytes[] calldata blsPubKeys) internal { + uint256 len = blsPubKeys.length; + for (uint256 i = 0; i < len; ++i) { + IVanillaRegistryV2.StakedValidator storage validator = stakedValidators[blsPubKeys[i]]; + require(validator.exists, IVanillaRegistryV2.ValidatorRecordMustExist(blsPubKeys[i])); + require(!_isUnstaking(blsPubKeys[i]), IVanillaRegistryV2.ValidatorCannotBeUnstaking(blsPubKeys[i])); + require(validator.withdrawalAddress == msg.sender, + IVanillaRegistryV2.SenderIsNotWithdrawalAddress(msg.sender, validator.withdrawalAddress)); + _unstakeSingle(blsPubKeys[i]); + } + } + + /* + * @dev Internal function to unstake ETH on behalf of one validator via their BLS pubkey. + * This function is necessary for slashing. + * @param pubKey The single BLS public key to unstake. + */ + function _unstakeSingle(bytes calldata pubKey) internal { + IVanillaRegistryV2.StakedValidator storage validator = stakedValidators[pubKey]; + BlockHeightOccurrence.captureOccurrence(validator.unstakeOccurrence); + emit Unstaked(msg.sender, validator.withdrawalAddress, pubKey, validator.balance); + } + + + /// @dev Internal function to withdraw ETH on behalf of one or multiple validators via their BLS pubkey. + /// @dev This function also deletes the validator record, and therefore serves a purpose even if no withdawable funds exist. + /// @param blsPubKeys The BLS public keys to withdraw. + /// @param expectedWithdrawalAddress The expected withdrawal address for every provided validator. + /// @return totalAmount The total amount of ETH withdrawn, to be handled by calling function. + /// @dev msg.sender must be contract owner, or the withdrawal address for every provided validator. + function _withdraw(bytes[] calldata blsPubKeys, address expectedWithdrawalAddress) internal returns (uint256) { + uint256 len = blsPubKeys.length; + uint256 totalAmount = 0; + for (uint256 i = 0; i < len; ++i) { + bytes calldata pubKey = blsPubKeys[i]; + IVanillaRegistryV2.StakedValidator storage validator = stakedValidators[pubKey]; + require(validator.exists, IVanillaRegistryV2.ValidatorRecordMustExist(pubKey)); + require(_isUnstaking(pubKey), IVanillaRegistryV2.MustUnstakeToWithdraw()); + require(block.number > validator.unstakeOccurrence.blockHeight + unstakePeriodBlocks, + IVanillaRegistryV2.WithdrawingTooSoon()); + require(validator.withdrawalAddress == expectedWithdrawalAddress, + IVanillaRegistryV2.WithdrawalAddressMismatch(validator.withdrawalAddress, expectedWithdrawalAddress)); + uint256 balance = validator.balance; + totalAmount += balance; + delete stakedValidators[pubKey]; + emit StakeWithdrawn(msg.sender, expectedWithdrawalAddress, pubKey, balance); + } + emit TotalStakeWithdrawn(msg.sender, expectedWithdrawalAddress, totalAmount); + return totalAmount; + } + + /// @dev Internal function to slash minStake worth of ETH on behalf of one or multiple validators via their BLS pubkey. + /// @param blsPubKeys The BLS public keys to slash. + /// @param payoutIfDue Whether to payout slashed funds to receiver if the payout period is due. + function _slash(bytes[] calldata blsPubKeys, bool payoutIfDue) internal { + uint256 len = blsPubKeys.length; + for (uint256 i = 0; i < len; ++i) { + bytes calldata pubKey = blsPubKeys[i]; + IVanillaRegistryV2.StakedValidator storage validator = stakedValidators[pubKey]; + require(validator.exists, IVanillaRegistryV2.ValidatorRecordMustExist(pubKey)); + if (!_isUnstaking(pubKey)) { + _unstakeSingle(pubKey); + } + uint256 toSlash = minStake; + if (validator.balance < minStake) { + toSlash = validator.balance; + } + validator.balance -= toSlash; + slashingFundsTracker.accumulatedAmount += toSlash; + bool isLastEntry = i == len - 1; + if (payoutIfDue && FeePayout.isPayoutDue(slashingFundsTracker) && isLastEntry) { + FeePayout.transferToRecipient(slashingFundsTracker); + } + emit Slashed(msg.sender, slashingFundsTracker.recipient, validator.withdrawalAddress, pubKey, toSlash); + } + } + + /// @dev Internal function to set the minimum stake parameter. + function _setMinStake(uint256 newMinStake) internal { + minStake = newMinStake; + emit MinStakeSet(msg.sender, newMinStake); + } + + /// @dev Internal function to set the slash oracle parameter. + function _setSlashOracle(address newSlashOracle) internal { + require(newSlashOracle != address(0), IVanillaRegistryV2.SlashOracleMustBeSet()); + slashOracle = newSlashOracle; + emit SlashOracleSet(msg.sender, newSlashOracle); + } + + /// @dev Internal function to set the slash receiver parameter. + function _setSlashReceiver(address newSlashReceiver) internal { + require(newSlashReceiver != address(0), IVanillaRegistryV2.SlashReceiverMustBeSet()); + slashingFundsTracker.recipient = newSlashReceiver; + emit SlashReceiverSet(msg.sender, newSlashReceiver); + } + + /// @dev Internal function to set the unstake period parameter. + function _setUnstakePeriodBlocks(uint256 newUnstakePeriodBlocks) internal { + require(newUnstakePeriodBlocks != 0, IVanillaRegistryV2.UnstakePeriodMustBePositive()); + unstakePeriodBlocks = newUnstakePeriodBlocks; + emit UnstakePeriodBlocksSet(msg.sender, newUnstakePeriodBlocks); + } + + /// @dev Internal function to set the slashing payout period parameter in blocks. + function _setSlashingPayoutPeriodBlocks(uint256 newSlashingPayoutPeriodBlocks) internal { + require(newSlashingPayoutPeriodBlocks != 0, IVanillaRegistryV2.SlashingPayoutPeriodMustBePositive()); + slashingFundsTracker.payoutPeriodBlocks = newSlashingPayoutPeriodBlocks; + emit SlashingPayoutPeriodBlocksSet(msg.sender, newSlashingPayoutPeriodBlocks); + } + + /// @dev Internal function to check if a validator is considered "opted-in" to mev-commit via this registry. + function _isValidatorOptedIn(bytes calldata valBLSPubKey) internal view returns (bool) { + return !_isUnstaking(valBLSPubKey) && + stakedValidators[valBLSPubKey].balance >= minStake && + whitelistedStakers[stakedValidators[valBLSPubKey].withdrawalAddress]; + } + + /// @dev Internal function to check if a validator is currently unstaking. + function _isUnstaking(bytes calldata valBLSPubKey) internal view returns (bool) { + return stakedValidators[valBLSPubKey].unstakeOccurrence.exists; + } +} diff --git a/contracts/scripts/validator-registry/DeployForMockL1.s.sol b/contracts/scripts/validator-registry/DeployForMockL1.s.sol index 5e0f7b257..9bd24d8d5 100644 --- a/contracts/scripts/validator-registry/DeployForMockL1.s.sol +++ b/contracts/scripts/validator-registry/DeployForMockL1.s.sol @@ -8,7 +8,7 @@ pragma solidity 0.8.26; import {Script} from "forge-std/Script.sol"; import {console} from "forge-std/console.sol"; import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol"; -import {VanillaRegistry} from "../../contracts/validator-registry/VanillaRegistry.sol"; +import {VanillaRegistryV2} from "../../contracts/validator-registry/VanillaRegistryV2.sol"; import {ValidatorOptInRouter} from "../../contracts/validator-registry/ValidatorOptInRouter.sol"; contract AlwaysFalseAVS { @@ -35,14 +35,14 @@ contract DeployForMockL1 is Script { address owner = msg.sender; address vanillaRegistryProxy = Upgrades.deployUUPSProxy( - "VanillaRegistry.sol", + "VanillaRegistryV2.sol", abi.encodeCall( - VanillaRegistry.initialize, + VanillaRegistryV2.initialize, (minStake, slashOracle, slashReceiver, unstakePeriodBlocks, payoutPeriodBlocks, owner) ) ); - console.log("_VanillaRegistry:", vanillaRegistryProxy); - VanillaRegistry vanillaRegistry = VanillaRegistry(payable(vanillaRegistryProxy)); + console.log("_VanillaRegistryV2:", vanillaRegistryProxy); + VanillaRegistryV2 vanillaRegistry = VanillaRegistryV2(payable(vanillaRegistryProxy)); address[] memory stakers = new address[](1); stakers[0] = owner; diff --git a/contracts/test/validator-registry/ValidatorOptInRouterTest.sol b/contracts/test/validator-registry/ValidatorOptInRouterTest.sol index 540b38777..a20817d26 100644 --- a/contracts/test/validator-registry/ValidatorOptInRouterTest.sol +++ b/contracts/test/validator-registry/ValidatorOptInRouterTest.sol @@ -2,13 +2,14 @@ pragma solidity 0.8.26; import {Test} from "forge-std/Test.sol"; -import {VanillaRegistry} from "../../contracts/validator-registry/VanillaRegistry.sol"; +import {VanillaRegistryV2} from "../../contracts/validator-registry/VanillaRegistryV2.sol"; import {ValidatorOptInRouter} from "../../contracts/validator-registry/ValidatorOptInRouter.sol"; import {MevCommitAVS} from "../../contracts/validator-registry/avs/MevCommitAVS.sol"; import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol"; -import {VanillaRegistryTest} from "./VanillaRegistryTest.sol"; +import {VanillaRegistryV2Test} from "./VanillaRegistryV2Test.sol"; import {MevCommitAVSTest} from "./avs/MevCommitAVSTest.sol"; import {IValidatorOptInRouter} from "../../contracts/interfaces/IValidatorOptInRouter.sol"; +import {IVanillaRegistryV2} from "../../contracts/interfaces/IVanillaRegistryV2.sol"; import {IVanillaRegistry} from "../../contracts/interfaces/IVanillaRegistry.sol"; import {IMevCommitAVS} from "../../contracts/interfaces/IMevCommitAVS.sol"; import {IMevCommitMiddleware} from "../../contracts/interfaces/IMevCommitMiddleware.sol"; @@ -18,8 +19,8 @@ import {MevCommitMiddlewareTestCont} from "./middleware/MevCommitMiddlewareTestC contract ValidatorOptInRouterTest is Test { ValidatorOptInRouter public validatorOptInRouter; - VanillaRegistry public vanillaRegistry; - VanillaRegistryTest public vanillaRegistryTest; + VanillaRegistryV2 public vanillaRegistry; + VanillaRegistryV2Test public vanillaRegistryTest; MevCommitAVS public mevCommitAVS; MevCommitAVSTest public mevCommitAVSTest; MevCommitMiddleware public mevCommitMiddleware; @@ -38,7 +39,7 @@ contract ValidatorOptInRouterTest is Test { user1 = address(0x123); user2 = address(0x456); - vanillaRegistryTest = new VanillaRegistryTest(); + vanillaRegistryTest = new VanillaRegistryV2Test(); vanillaRegistryTest.setUp(); vanillaRegistry = vanillaRegistryTest.validatorRegistry(); @@ -64,12 +65,12 @@ contract ValidatorOptInRouterTest is Test { } function testSetters() public { - IVanillaRegistry newValReg = new VanillaRegistry(); - IVanillaRegistry oldValReg = vanillaRegistry; + IVanillaRegistryV2 newValReg = new VanillaRegistryV2(); + IVanillaRegistryV2 oldValReg = vanillaRegistry; vm.prank(owner); vm.expectEmit(); emit VanillaRegistrySet(address(oldValReg), address(newValReg)); - validatorOptInRouter.setVanillaRegistry(newValReg); + validatorOptInRouter.setVanillaRegistry((IVanillaRegistry((address(newValReg))))); assertEq(address(validatorOptInRouter.vanillaRegistry()), address(newValReg)); IMevCommitAVS newMevCommitAVS = new MevCommitAVS(); diff --git a/contracts/test/validator-registry/VanillaRegistryTest.sol b/contracts/test/validator-registry/VanillaRegistryV2Test.sol similarity index 91% rename from contracts/test/validator-registry/VanillaRegistryTest.sol rename to contracts/test/validator-registry/VanillaRegistryV2Test.sol index c8e87f459..ba3b815a4 100644 --- a/contracts/test/validator-registry/VanillaRegistryTest.sol +++ b/contracts/test/validator-registry/VanillaRegistryV2Test.sol @@ -2,13 +2,13 @@ pragma solidity 0.8.26; import {Test} from"forge-std/Test.sol"; -import {VanillaRegistry} from"../../contracts/validator-registry/VanillaRegistry.sol"; +import {VanillaRegistryV2} from"../../contracts/validator-registry/VanillaRegistryV2.sol"; import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol"; -import {IVanillaRegistry} from "../../contracts/interfaces/IVanillaRegistry.sol"; +import {IVanillaRegistryV2} from "../../contracts/interfaces/IVanillaRegistryV2.sol"; import {OwnableUpgradeable} from "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol"; -contract VanillaRegistryTest is Test { - VanillaRegistry public validatorRegistry; +contract VanillaRegistryV2Test is Test { + VanillaRegistryV2 public validatorRegistry; address public owner; address public user1; address public user2; @@ -46,10 +46,10 @@ contract VanillaRegistryTest is Test { assertEq(user2BLSKey.length, 48); address proxy = Upgrades.deployUUPSProxy( - "VanillaRegistry.sol", - abi.encodeCall(VanillaRegistry.initialize, (MIN_STAKE, SLASH_ORACLE, SLASH_RECEIVER, UNSTAKE_PERIOD, PAYOUT_PERIOD, owner)) + "VanillaRegistryV2.sol", + abi.encodeCall(VanillaRegistryV2.initialize, (MIN_STAKE, SLASH_ORACLE, SLASH_RECEIVER, UNSTAKE_PERIOD, PAYOUT_PERIOD, owner)) ); - validatorRegistry = VanillaRegistry(payable(proxy)); + validatorRegistry = VanillaRegistryV2(payable(proxy)); } function testSecondInitialize() public { @@ -66,7 +66,7 @@ contract VanillaRegistryTest is Test { bytes[] memory validators = new bytes[](1); validators[0] = user1BLSKey; - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.SenderIsNotWhitelistedStaker.selector, user1)); + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.SenderIsNotWhitelistedStaker.selector, user1)); vm.prank(user1); validatorRegistry.stake{value: MIN_STAKE}(validators); @@ -100,7 +100,7 @@ contract VanillaRegistryTest is Test { validators[0] = user2BLSKey; vm.startPrank(user1); - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.SenderIsNotWhitelistedStaker.selector, user1)); + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.SenderIsNotWhitelistedStaker.selector, user1)); validatorRegistry.stake{value: MIN_STAKE}(validators); vm.stopPrank(); @@ -197,7 +197,7 @@ contract VanillaRegistryTest is Test { validators[0] = user1BLSKey; vm.prank(user1); - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.StakeTooLowForNumberOfKeys.selector, MIN_STAKE/2, MIN_STAKE)); + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.StakeTooLowForNumberOfKeys.selector, MIN_STAKE/2, MIN_STAKE)); validatorRegistry.stake{value: MIN_STAKE/2}(validators); assertFalse(validatorRegistry.isValidatorOptedIn(user1BLSKey)); @@ -209,11 +209,11 @@ contract VanillaRegistryTest is Test { assertTrue(validatorRegistry.isValidatorOptedIn(user1BLSKey)); vm.prank(user1); - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.StakeTooLowForNumberOfKeys.selector, 0, 1)); + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.StakeTooLowForNumberOfKeys.selector, 0, 1)); validatorRegistry.addStake{value: 0}(validators); vm.prank(user2); - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.SenderIsNotWithdrawalAddress.selector, user2, user1)); + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.SenderIsNotWithdrawalAddress.selector, user2, user1)); validatorRegistry.addStake{value: MIN_STAKE/2}(validators); vm.prank(user1); @@ -231,7 +231,7 @@ contract VanillaRegistryTest is Test { assertEq(validatorRegistry.getStakedAmount(user2BLSKey), 0); vm.startPrank(user2); - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.ValidatorRecordMustExist.selector, user2BLSKey)); + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.ValidatorRecordMustExist.selector, user2BLSKey)); validatorRegistry.unstake(validators); vm.stopPrank(); assertEq(validatorRegistry.getStakedAmount(user2BLSKey), 0); @@ -242,7 +242,7 @@ contract VanillaRegistryTest is Test { bytes[] memory validators = new bytes[](1); validators[0] = user1BLSKey; vm.startPrank(user2); - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.SenderIsNotWithdrawalAddress.selector, user2, user1)); + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.SenderIsNotWithdrawalAddress.selector, user2, user1)); validatorRegistry.unstake(validators); vm.stopPrank(); } @@ -270,7 +270,7 @@ contract VanillaRegistryTest is Test { bothValidators[0] = user1BLSKey; bothValidators[1] = user2BLSKey; vm.prank(user1); - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.SenderIsNotWithdrawalAddress.selector, user1, user2)); + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.SenderIsNotWithdrawalAddress.selector, user1, user2)); validatorRegistry.unstake(bothValidators); } @@ -285,7 +285,7 @@ contract VanillaRegistryTest is Test { vm.roll(500); vm.prank(user2); - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.WithdrawalAddressMismatch.selector, + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.WithdrawalAddressMismatch.selector, user1, // actual from validator record user2)); // expected from msg.sender validatorRegistry.withdraw(validators); @@ -318,7 +318,7 @@ contract VanillaRegistryTest is Test { bothValidators[0] = user1BLSKey; bothValidators[1] = user2BLSKey; vm.prank(user1); - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.WithdrawalAddressMismatch.selector, + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.WithdrawalAddressMismatch.selector, user2, // actual from validator record user1)); // expected from msg.sender validatorRegistry.withdraw(bothValidators); @@ -332,7 +332,7 @@ contract VanillaRegistryTest is Test { validators[0] = user1BLSKey; vm.startPrank(user1); - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.MustUnstakeToWithdraw.selector)); + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.MustUnstakeToWithdraw.selector)); validatorRegistry.withdraw(validators); vm.stopPrank(); } @@ -378,14 +378,14 @@ contract VanillaRegistryTest is Test { vm.stopPrank(); vm.startPrank(user1); - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.ValidatorCannotBeUnstaking.selector, user1BLSKey)); + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.ValidatorCannotBeUnstaking.selector, user1BLSKey)); validatorRegistry.unstake(validators); vm.stopPrank(); vm.roll(500); vm.startPrank(user1); - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.ValidatorCannotBeUnstaking.selector, user1BLSKey)); + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.ValidatorCannotBeUnstaking.selector, user1BLSKey)); validatorRegistry.unstake(validators); vm.stopPrank(); } @@ -407,14 +407,14 @@ contract VanillaRegistryTest is Test { assertEq(validatorRegistry.getStakedAmount(user1BLSKey), MIN_STAKE); vm.startPrank(user1); - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.ValidatorRecordMustNotExist.selector, user1BLSKey)); + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.ValidatorRecordMustNotExist.selector, user1BLSKey)); validatorRegistry.stake{value: MIN_STAKE}(validators); vm.stopPrank(); vm.roll(500); vm.startPrank(user1); - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.ValidatorRecordMustNotExist.selector, user1BLSKey)); + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.ValidatorRecordMustNotExist.selector, user1BLSKey)); validatorRegistry.stake{value: MIN_STAKE}(validators); vm.stopPrank(); @@ -425,7 +425,7 @@ contract VanillaRegistryTest is Test { vm.deal(user2, 10 ether); vm.startPrank(user2); - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.ValidatorRecordMustNotExist.selector, user1BLSKey)); + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.ValidatorRecordMustNotExist.selector, user1BLSKey)); validatorRegistry.stake{value: MIN_STAKE}(validators); vm.stopPrank(); @@ -483,7 +483,7 @@ contract VanillaRegistryTest is Test { } function testSlashMinStakeIncreased() public { - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.ValidatorRecordMustExist.selector, user1BLSKey)); + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.ValidatorRecordMustExist.selector, user1BLSKey)); bytes[] memory validators = new bytes[](1); validators[0] = user1BLSKey; vm.prank(SLASH_ORACLE); @@ -514,7 +514,7 @@ contract VanillaRegistryTest is Test { function testUnauthorizedSlash() public { testSelfStake(); - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.SenderIsNotSlashOracle.selector, user2, SLASH_ORACLE)); + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.SenderIsNotSlashOracle.selector, user2, SLASH_ORACLE)); bytes[] memory validators = new bytes[](1); validators[0] = user1BLSKey; vm.prank(user2); @@ -705,7 +705,7 @@ contract VanillaRegistryTest is Test { function testGetBlocksTillWithdrawAllowed() public { testSelfStake(); - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.MustUnstakeToWithdraw.selector)); + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.MustUnstakeToWithdraw.selector)); validatorRegistry.getBlocksTillWithdrawAllowed(user2BLSKey); assertEq(block.number, 1); @@ -734,7 +734,7 @@ contract VanillaRegistryTest is Test { assertEq(blocksTillWithdraw, 1); vm.startPrank(user1); - vm.expectRevert(IVanillaRegistry.WithdrawingTooSoon.selector); + vm.expectRevert(IVanillaRegistryV2.WithdrawingTooSoon.selector); validatorRegistry.withdraw(validators); vm.stopPrank(); @@ -793,7 +793,7 @@ contract VanillaRegistryTest is Test { vm.roll(30); vm.prank(user1); - vm.expectRevert(IVanillaRegistry.WithdrawingTooSoon.selector); + vm.expectRevert(IVanillaRegistryV2.WithdrawingTooSoon.selector); validatorRegistry.withdraw(validators); vm.stopPrank(); @@ -937,7 +937,7 @@ contract VanillaRegistryTest is Test { vm.prank(user1); vm.expectRevert( - abi.encodeWithSelector(IVanillaRegistry.ValidatorCannotBeUnstaking.selector, user1BLSKey) + abi.encodeWithSelector(IVanillaRegistryV2.ValidatorCannotBeUnstaking.selector, user1BLSKey) ); validatorRegistry.addStake{value: MIN_STAKE}(validators); } @@ -959,7 +959,7 @@ contract VanillaRegistryTest is Test { vm.deal(user1, 100 wei); vm.prank(user1); - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.StakeTooLowForNumberOfKeys.selector, 80, 90)); + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.StakeTooLowForNumberOfKeys.selector, 80, 90)); validatorRegistry.stake{value: 80 wei}(validators); assertEq(address(validatorRegistry).balance, 0); @@ -999,7 +999,7 @@ contract VanillaRegistryTest is Test { validators[1] = user2BLSKey; vm.prank(owner); - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.ValidatorRecordMustExist.selector, user1BLSKey)); + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.ValidatorRecordMustExist.selector, user1BLSKey)); validatorRegistry.forceWithdrawalAsOwner(validators, user1); testMultiStake(); @@ -1015,13 +1015,13 @@ contract VanillaRegistryTest is Test { validatorRegistry.forceWithdrawalAsOwner(validators, user1); vm.prank(owner); - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.WithdrawingTooSoon.selector)); + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.WithdrawingTooSoon.selector)); validatorRegistry.forceWithdrawalAsOwner(validators, user1); vm.roll(200); vm.prank(owner); - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.WithdrawalAddressMismatch.selector, user1, user2)); + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.WithdrawalAddressMismatch.selector, user1, user2)); validatorRegistry.forceWithdrawalAsOwner(validators, user2); assertEq(address(validatorRegistry).balance, 6 ether); @@ -1052,7 +1052,7 @@ contract VanillaRegistryTest is Test { assertEq(owner.balance, ownerBefore); vm.prank(owner); - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.ValidatorRecordMustExist.selector, user1BLSKey)); + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.ValidatorRecordMustExist.selector, user1BLSKey)); validatorRegistry.forceWithdrawalAsOwner(validators, user1); } @@ -1066,7 +1066,7 @@ contract VanillaRegistryTest is Test { vm.roll(500); - IVanillaRegistry.StakedValidator memory stakedValidator = validatorRegistry.getStakedValidator(user1BLSKey); + IVanillaRegistryV2.StakedValidator memory stakedValidator = validatorRegistry.getStakedValidator(user1BLSKey); assertTrue(stakedValidator.exists); assertEq(stakedValidator.balance, 0); assertEq(stakedValidator.withdrawalAddress, user1); @@ -1102,7 +1102,7 @@ contract VanillaRegistryTest is Test { vm.roll(200); - IVanillaRegistry.StakedValidator memory stakedValidator = validatorRegistry.getStakedValidator(user1BLSKey); + IVanillaRegistryV2.StakedValidator memory stakedValidator = validatorRegistry.getStakedValidator(user1BLSKey); assertTrue(stakedValidator.exists); assertEq(stakedValidator.balance, 2 ether); assertEq(stakedValidator.withdrawalAddress, user1); @@ -1145,17 +1145,17 @@ contract VanillaRegistryTest is Test { vm.deal(user1, 3 * MIN_STAKE); vm.prank(user1); - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.ValidatorRecordMustNotExist.selector, user1BLSKey)); + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.ValidatorRecordMustNotExist.selector, user1BLSKey)); validatorRegistry.stake{value: 3 * MIN_STAKE}(validators); vm.deal(owner, 3 * MIN_STAKE); vm.prank(owner); - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.ValidatorRecordMustNotExist.selector, user1BLSKey)); + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.ValidatorRecordMustNotExist.selector, user1BLSKey)); validatorRegistry.delegateStake{value: 3 * MIN_STAKE}(validators, user1); validators[2] = user2BLSKey; vm.prank(user1); - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.ValidatorRecordMustNotExist.selector, user2BLSKey)); + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.ValidatorRecordMustNotExist.selector, user2BLSKey)); validatorRegistry.stake{value: 3 * MIN_STAKE}(validators); validators[2] = user3BLSKey; @@ -1176,7 +1176,7 @@ contract VanillaRegistryTest is Test { validatorRegistry.whitelistStakers(stakers); vm.prank(owner); - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.StakerAlreadyWhitelisted.selector, user1)); + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.StakerAlreadyWhitelisted.selector, user1)); validatorRegistry.whitelistStakers(stakers); } @@ -1184,7 +1184,7 @@ contract VanillaRegistryTest is Test { vm.prank(owner); address[] memory stakers = new address[](1); stakers[0] = user1; - vm.expectRevert(abi.encodeWithSelector(IVanillaRegistry.StakerNotWhitelisted.selector, user1)); + vm.expectRevert(abi.encodeWithSelector(IVanillaRegistryV2.StakerNotWhitelisted.selector, user1)); validatorRegistry.removeWhitelistedStakers(stakers); } diff --git a/contracts/test/validator-registry/rewards/RewardManagerTest.sol b/contracts/test/validator-registry/rewards/RewardManagerTest.sol index dab77bcff..61a36d8cf 100644 --- a/contracts/test/validator-registry/rewards/RewardManagerTest.sol +++ b/contracts/test/validator-registry/rewards/RewardManagerTest.sol @@ -2,14 +2,14 @@ pragma solidity 0.8.26; import {Test} from "forge-std/Test.sol"; -import {VanillaRegistry} from "../../../contracts/validator-registry/VanillaRegistry.sol"; +import {VanillaRegistryV2} from "../../../contracts/validator-registry/VanillaRegistryV2.sol"; import {ValidatorOptInRouter} from "../../../contracts/validator-registry/ValidatorOptInRouter.sol"; import {MevCommitAVS} from "../../../contracts/validator-registry/avs/MevCommitAVS.sol"; import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol"; -import {VanillaRegistryTest} from "../VanillaRegistryTest.sol"; +import {VanillaRegistryV2Test} from "../VanillaRegistryV2Test.sol"; import {MevCommitAVSTest} from "../avs/MevCommitAVSTest.sol"; import {IValidatorOptInRouter} from "../../../contracts/interfaces/IValidatorOptInRouter.sol"; -import {IVanillaRegistry} from "../../../contracts/interfaces/IVanillaRegistry.sol"; +import {IVanillaRegistryV2} from "../../../contracts/interfaces/IVanillaRegistryV2.sol"; import {IMevCommitAVS} from "../../../contracts/interfaces/IMevCommitAVS.sol"; import {IMevCommitMiddleware} from "../../../contracts/interfaces/IMevCommitMiddleware.sol"; import {MevCommitMiddleware} from "../../../contracts/validator-registry/middleware/MevCommitMiddleware.sol"; @@ -23,8 +23,8 @@ import "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol"; contract RewardManagerTest is Test { RewardManager public rewardManager; - VanillaRegistry public vanillaRegistry; - VanillaRegistryTest public vanillaRegistryTest; + VanillaRegistryV2 public vanillaRegistry; + VanillaRegistryV2Test public vanillaRegistryTest; MevCommitAVS public mevCommitAVS; MevCommitAVSTest public mevCommitAVSTest; MevCommitMiddleware public mevCommitMiddleware; @@ -67,7 +67,7 @@ contract RewardManagerTest is Test { user4 = address(0xabc); user5 = address(0xdef); - vanillaRegistryTest = new VanillaRegistryTest(); + vanillaRegistryTest = new VanillaRegistryV2Test(); vanillaRegistryTest.setUp(); vanillaRegistry = vanillaRegistryTest.validatorRegistry(); @@ -96,7 +96,7 @@ contract RewardManagerTest is Test { } function testRMSetters() public { - IVanillaRegistry newRegistry = new VanillaRegistry(); + IVanillaRegistryV2 newRegistry = new VanillaRegistryV2(); vm.prank(owner); vm.expectEmit(); emit VanillaRegistrySet(address(newRegistry)); @@ -177,7 +177,7 @@ contract RewardManagerTest is Test { emit RemovedFromAutoClaimBlacklist(user1); rewardManager.removeFromAutoClaimBlacklist(user1); - VanillaRegistry newRegistry = new VanillaRegistry(); + VanillaRegistryV2 newRegistry = new VanillaRegistryV2(); vm.prank(owner); vm.expectEmit(); emit VanillaRegistrySet(address(newRegistry)); From 5e264954d6694bc6f588ada6cc20f48df7abc35b Mon Sep 17 00:00:00 2001 From: owen-eth Date: Wed, 10 Dec 2025 16:46:36 -0500 Subject: [PATCH 2/6] moved old contracts into upgrades folder and updated references --- .../interfaces/IValidatorOptInRouter.sol | 2 +- .../IVanillaRegistry.sol | 0 .../VanillaRegistry.sol | 2 +- .../VanillaRegistryStorage.sol | 2 +- .../validator-registry/ValidatorOptInRouter.sol | 2 +- .../ValidatorOptInRouterStorage.sol | 2 +- .../validator-registry/rewards/RewardManager.sol | 4 ++-- .../rewards/RewardManagerStorage.sol | 4 ++-- .../DeployVanillaRegistry.s.sol | 14 +++++++------- .../DeployVanillaReputational.s.sol | 14 +++++++------- .../scripts/validator-registry/GetParams.s.sol | 16 ++++++++-------- .../ValidatorExampleScript.s.sol | 8 ++++---- .../ValidatorOptInRouterTest.sol | 2 +- 13 files changed, 36 insertions(+), 36 deletions(-) rename contracts/contracts/{interfaces => upgrades}/IVanillaRegistry.sol (100%) rename contracts/contracts/{validator-registry => upgrades}/VanillaRegistry.sol (99%) rename contracts/contracts/{validator-registry => upgrades}/VanillaRegistryStorage.sol (94%) diff --git a/contracts/contracts/interfaces/IValidatorOptInRouter.sol b/contracts/contracts/interfaces/IValidatorOptInRouter.sol index 559346bc7..5a0bb52b6 100644 --- a/contracts/contracts/interfaces/IValidatorOptInRouter.sol +++ b/contracts/contracts/interfaces/IValidatorOptInRouter.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: BSL 1.1 pragma solidity 0.8.26; -import {IVanillaRegistry} from "./IVanillaRegistry.sol"; +import {IVanillaRegistry} from "../upgrades/IVanillaRegistry.sol"; import {IMevCommitAVS} from "./IMevCommitAVS.sol"; import {IMevCommitMiddleware} from "./IMevCommitMiddleware.sol"; diff --git a/contracts/contracts/interfaces/IVanillaRegistry.sol b/contracts/contracts/upgrades/IVanillaRegistry.sol similarity index 100% rename from contracts/contracts/interfaces/IVanillaRegistry.sol rename to contracts/contracts/upgrades/IVanillaRegistry.sol diff --git a/contracts/contracts/validator-registry/VanillaRegistry.sol b/contracts/contracts/upgrades/VanillaRegistry.sol similarity index 99% rename from contracts/contracts/validator-registry/VanillaRegistry.sol rename to contracts/contracts/upgrades/VanillaRegistry.sol index ced3dd878..64be2054d 100644 --- a/contracts/contracts/validator-registry/VanillaRegistry.sol +++ b/contracts/contracts/upgrades/VanillaRegistry.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: BSL 1.1 pragma solidity 0.8.26; -import {IVanillaRegistry} from "../interfaces/IVanillaRegistry.sol"; +import {IVanillaRegistry} from "./IVanillaRegistry.sol"; import {VanillaRegistryStorage} from "./VanillaRegistryStorage.sol"; import {BlockHeightOccurrence} from "../utils/Occurrence.sol"; import {Ownable2StepUpgradeable} from "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol"; diff --git a/contracts/contracts/validator-registry/VanillaRegistryStorage.sol b/contracts/contracts/upgrades/VanillaRegistryStorage.sol similarity index 94% rename from contracts/contracts/validator-registry/VanillaRegistryStorage.sol rename to contracts/contracts/upgrades/VanillaRegistryStorage.sol index eef164b57..58eaf3da8 100644 --- a/contracts/contracts/validator-registry/VanillaRegistryStorage.sol +++ b/contracts/contracts/upgrades/VanillaRegistryStorage.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: BSL 1.1 pragma solidity 0.8.26; -import {IVanillaRegistry} from "../interfaces/IVanillaRegistry.sol"; +import {IVanillaRegistry} from "./IVanillaRegistry.sol"; import {FeePayout} from "../utils/FeePayout.sol"; /// @title VanillaRegistryStorage diff --git a/contracts/contracts/validator-registry/ValidatorOptInRouter.sol b/contracts/contracts/validator-registry/ValidatorOptInRouter.sol index 3d0af3d6f..2f7a9bebf 100644 --- a/contracts/contracts/validator-registry/ValidatorOptInRouter.sol +++ b/contracts/contracts/validator-registry/ValidatorOptInRouter.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.26; import {ValidatorOptInRouterStorage} from "./ValidatorOptInRouterStorage.sol"; import {IValidatorOptInRouter} from "../interfaces/IValidatorOptInRouter.sol"; -import {IVanillaRegistry} from "../interfaces/IVanillaRegistry.sol"; +import {IVanillaRegistry} from "../upgrades/IVanillaRegistry.sol"; import {IMevCommitAVS} from "../interfaces/IMevCommitAVS.sol"; import {Ownable2StepUpgradeable} from "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol"; import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; diff --git a/contracts/contracts/validator-registry/ValidatorOptInRouterStorage.sol b/contracts/contracts/validator-registry/ValidatorOptInRouterStorage.sol index 46b221ad2..a874617c5 100644 --- a/contracts/contracts/validator-registry/ValidatorOptInRouterStorage.sol +++ b/contracts/contracts/validator-registry/ValidatorOptInRouterStorage.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: BSL 1.1 pragma solidity 0.8.26; -import {IVanillaRegistry} from "../interfaces/IVanillaRegistry.sol"; +import {IVanillaRegistry} from "../upgrades/IVanillaRegistry.sol"; import {IMevCommitAVS} from "../interfaces/IMevCommitAVS.sol"; import {IMevCommitMiddleware} from "../interfaces/IMevCommitMiddleware.sol"; diff --git a/contracts/contracts/validator-registry/rewards/RewardManager.sol b/contracts/contracts/validator-registry/rewards/RewardManager.sol index 532058276..125ea3154 100644 --- a/contracts/contracts/validator-registry/rewards/RewardManager.sol +++ b/contracts/contracts/validator-registry/rewards/RewardManager.sol @@ -8,7 +8,7 @@ import {Ownable2StepUpgradeable} from "@openzeppelin/contracts-upgradeable/acces import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol"; import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol"; import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; -import {VanillaRegistryStorage} from "../VanillaRegistryStorage.sol"; +import {VanillaRegistryStorageV2} from "../VanillaRegistryStorageV2.sol"; import {MevCommitAVSStorage} from "../avs/MevCommitAVSStorage.sol"; import {MevCommitMiddlewareStorage} from "../middleware/MevCommitMiddlewareStorage.sol"; @@ -203,7 +203,7 @@ contract RewardManager is IRewardManager, RewardManagerStorage, function _setVanillaRegistry(address vanillaRegistry) internal { require(vanillaRegistry != address(0), InvalidAddress()); - _vanillaRegistry = VanillaRegistryStorage(vanillaRegistry); + _vanillaRegistry = VanillaRegistryStorageV2(vanillaRegistry); emit VanillaRegistrySet(vanillaRegistry); } diff --git a/contracts/contracts/validator-registry/rewards/RewardManagerStorage.sol b/contracts/contracts/validator-registry/rewards/RewardManagerStorage.sol index e86f70f55..651578e81 100644 --- a/contracts/contracts/validator-registry/rewards/RewardManagerStorage.sol +++ b/contracts/contracts/validator-registry/rewards/RewardManagerStorage.sol @@ -1,14 +1,14 @@ // SPDX-License-Identifier: BSL 1.1 pragma solidity 0.8.26; -import {VanillaRegistryStorage} from "../VanillaRegistryStorage.sol"; +import {VanillaRegistryStorageV2} from "../VanillaRegistryStorageV2.sol"; import {MevCommitAVSStorage} from "../avs/MevCommitAVSStorage.sol"; import {MevCommitMiddlewareStorage} from "../middleware/MevCommitMiddlewareStorage.sol"; contract RewardManagerStorage { /// Storage reference to the VanillaRegistry contract. - VanillaRegistryStorage internal _vanillaRegistry; + VanillaRegistryStorageV2 internal _vanillaRegistry; /// Storage reference to the MevCommitAVS contract. MevCommitAVSStorage internal _mevCommitAVS; diff --git a/contracts/scripts/validator-registry/DeployVanillaRegistry.s.sol b/contracts/scripts/validator-registry/DeployVanillaRegistry.s.sol index 5ccefa0ec..cef242e26 100644 --- a/contracts/scripts/validator-registry/DeployVanillaRegistry.s.sol +++ b/contracts/scripts/validator-registry/DeployVanillaRegistry.s.sol @@ -7,7 +7,7 @@ pragma solidity 0.8.26; import {Script} from "forge-std/Script.sol"; import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol"; -import {VanillaRegistry} from "../../contracts/validator-registry/VanillaRegistry.sol"; +import {VanillaRegistryV2} from "../../contracts/validator-registry/VanillaRegistryV2.sol"; import {console} from "forge-std/console.sol"; import {MainnetConstants} from "../MainnetConstants.sol"; @@ -20,17 +20,17 @@ contract BaseDeploy is Script { uint256 payoutPeriodBlocks, address owner ) public returns (address) { - console.log("Deploying VanillaRegistry on chain:", block.chainid); + console.log("Deploying VanillaRegistryV2 on chain:", block.chainid); address proxy = Upgrades.deployUUPSProxy( - "VanillaRegistry.sol", + "VanillaRegistryV2.sol", abi.encodeCall( - VanillaRegistry.initialize, + VanillaRegistryV2.initialize, (minStake, slashOracle, slashReceiver, unstakePeriodBlocks, payoutPeriodBlocks, owner) ) ); - console.log("VanillaRegistry UUPS proxy deployed to:", address(proxy)); - VanillaRegistry vanillaRegistry = VanillaRegistry(payable(proxy)); - console.log("VanillaRegistry owner:", vanillaRegistry.owner()); + console.log("VanillaRegistryV2 UUPS proxy deployed to:", address(proxy)); + VanillaRegistryV2 vanillaRegistry = VanillaRegistryV2(payable(proxy)); + console.log("VanillaRegistryV2 owner:", vanillaRegistry.owner()); return proxy; } } diff --git a/contracts/scripts/validator-registry/DeployVanillaReputational.s.sol b/contracts/scripts/validator-registry/DeployVanillaReputational.s.sol index 06e5ec3c3..2d7d6ea17 100644 --- a/contracts/scripts/validator-registry/DeployVanillaReputational.s.sol +++ b/contracts/scripts/validator-registry/DeployVanillaReputational.s.sol @@ -7,7 +7,7 @@ pragma solidity 0.8.26; import {Script} from "forge-std/Script.sol"; import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol"; -import {VanillaRegistry} from "../../contracts/validator-registry/VanillaRegistry.sol"; +import {VanillaRegistryV2} from "../../contracts/validator-registry/VanillaRegistryV2.sol"; import {console} from "forge-std/console.sol"; import {MainnetConstants} from "../MainnetConstants.sol"; @@ -20,17 +20,17 @@ contract BaseDeploy is Script { uint256 payoutPeriodBlocks, address owner ) public returns (address) { - console.log("Deploying VanillaReputationalRegistry on chain:", block.chainid); + console.log("Deploying VanillaReputationalRegistryV2 on chain:", block.chainid); address proxy = Upgrades.deployUUPSProxy( - "VanillaRegistry.sol", + "VanillaRegistryV2.sol", abi.encodeCall( - VanillaRegistry.initialize, + VanillaRegistryV2.initialize, (minStake, slashOracle, slashReceiver, unstakePeriodBlocks, payoutPeriodBlocks, owner) ) ); - console.log("VanillaReputationalRegistry UUPS proxy deployed to:", address(proxy)); - VanillaRegistry vanillaRegistry = VanillaRegistry(payable(proxy)); - console.log("VanillaReputationalRegistry owner:", vanillaRegistry.owner()); + console.log("VanillaReputationalRegistryV2 UUPS proxy deployed to:", address(proxy)); + VanillaRegistryV2 vanillaRegistry = VanillaRegistryV2(payable(proxy)); + console.log("VanillaReputationalRegistryV2 owner:", vanillaRegistry.owner()); return proxy; } } diff --git a/contracts/scripts/validator-registry/GetParams.s.sol b/contracts/scripts/validator-registry/GetParams.s.sol index eb280a8f6..388381f96 100644 --- a/contracts/scripts/validator-registry/GetParams.s.sol +++ b/contracts/scripts/validator-registry/GetParams.s.sol @@ -6,9 +6,9 @@ pragma solidity 0.8.26; import {Script} from "forge-std/Script.sol"; -import {VanillaRegistry} from "../../contracts/validator-registry/VanillaRegistry.sol"; +import {VanillaRegistryV2} from "../../contracts/validator-registry/VanillaRegistryV2.sol"; import {console} from "forge-std/console.sol"; -import {VanillaRegistryStorage} from "../../contracts/validator-registry/VanillaRegistryStorage.sol"; +import {VanillaRegistryStorageV2} from "../../contracts/validator-registry/VanillaRegistryStorageV2.sol"; import {MevCommitAVS} from "../../contracts/validator-registry/avs/MevCommitAVS.sol"; import {MevCommitAVSStorage} from "../../contracts/validator-registry/avs/MevCommitAVSStorage.sol"; @@ -17,17 +17,17 @@ contract GetVanillaRegistryParams is Script { console.log("Getting params for VanillaRegistry on chain:", block.chainid); address vanillaRegAddr = 0x47afdcB2B089C16CEe354811EA1Bbe0DB7c335E9; - address owner = VanillaRegistry(payable(vanillaRegAddr)).owner(); + address owner = VanillaRegistryV2(payable(vanillaRegAddr)).owner(); console.log("VanillaRegistry owner:", owner); - bool isPaused = VanillaRegistry(payable(vanillaRegAddr)).paused(); + bool isPaused = VanillaRegistryV2(payable(vanillaRegAddr)).paused(); console.log("VanillaRegistry isPaused:", isPaused); - uint256 minStake = VanillaRegistryStorage(payable(vanillaRegAddr)).minStake(); + uint256 minStake = VanillaRegistryStorageV2(payable(vanillaRegAddr)).minStake(); console.log("VanillaRegistry minStake:", minStake); - address slashOracle = VanillaRegistryStorage(payable(vanillaRegAddr)).slashOracle(); + address slashOracle = VanillaRegistryStorageV2(payable(vanillaRegAddr)).slashOracle(); console.log("VanillaRegistry slashOracle:", slashOracle); - uint256 unstakePeriodBlocks = VanillaRegistryStorage(payable(vanillaRegAddr)).unstakePeriodBlocks(); + uint256 unstakePeriodBlocks = VanillaRegistryStorageV2(payable(vanillaRegAddr)).unstakePeriodBlocks(); console.log("VanillaRegistry unstakePeriodBlocks:", unstakePeriodBlocks); - uint256 accumulatedFunds = VanillaRegistry(payable(vanillaRegAddr)).getAccumulatedSlashingFunds(); + uint256 accumulatedFunds = VanillaRegistryV2(payable(vanillaRegAddr)).getAccumulatedSlashingFunds(); console.log("VanillaRegistry accumulatedFunds:", accumulatedFunds); } } diff --git a/contracts/scripts/validator-registry/ValidatorExampleScript.s.sol b/contracts/scripts/validator-registry/ValidatorExampleScript.s.sol index 14d56b2e5..9221c18bc 100644 --- a/contracts/scripts/validator-registry/ValidatorExampleScript.s.sol +++ b/contracts/scripts/validator-registry/ValidatorExampleScript.s.sol @@ -7,13 +7,13 @@ pragma solidity 0.8.26; import {Script} from "forge-std/Script.sol"; import {console} from "forge-std/console.sol"; -import {VanillaRegistry} from "../../contracts/validator-registry/VanillaRegistry.sol"; -import {IVanillaRegistry} from "../../contracts/interfaces/IVanillaRegistry.sol"; +import {VanillaRegistryV2} from "../../contracts/validator-registry/VanillaRegistryV2.sol"; +import {IVanillaRegistryV2} from "../../contracts/interfaces/IVanillaRegistryV2.sol"; // Script to e2e test the VanillaRegistry contract with anvil, also see makefile. abstract contract ExampleScript is Script { - VanillaRegistry internal _validatorRegistry = VanillaRegistry(payable(0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512)); + VanillaRegistryV2 internal _validatorRegistry = VanillaRegistryV2(payable(0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512)); // When starting anvil: // @@ -49,7 +49,7 @@ abstract contract ExampleScript is Script { console.log("Staked Amount:", stakedAmount); bool isUnstaking = _validatorRegistry.isUnstaking(blsKeys[i]); console.log("is Unstaking: %s", isUnstaking); - IVanillaRegistry.StakedValidator memory stakedValidator = _validatorRegistry.getStakedValidator(blsKeys[i]); + IVanillaRegistryV2.StakedValidator memory stakedValidator = _validatorRegistry.getStakedValidator(blsKeys[i]); console.log("Staked Validator balance: %s", stakedValidator.balance); console.log("Staked Validator withdrawalAddress: %s", stakedValidator.withdrawalAddress); console.log("Staked Validator unstakeBlockNum: %s", stakedValidator.unstakeOccurrence.blockHeight); diff --git a/contracts/test/validator-registry/ValidatorOptInRouterTest.sol b/contracts/test/validator-registry/ValidatorOptInRouterTest.sol index a20817d26..0978e2c07 100644 --- a/contracts/test/validator-registry/ValidatorOptInRouterTest.sol +++ b/contracts/test/validator-registry/ValidatorOptInRouterTest.sol @@ -10,7 +10,7 @@ import {VanillaRegistryV2Test} from "./VanillaRegistryV2Test.sol"; import {MevCommitAVSTest} from "./avs/MevCommitAVSTest.sol"; import {IValidatorOptInRouter} from "../../contracts/interfaces/IValidatorOptInRouter.sol"; import {IVanillaRegistryV2} from "../../contracts/interfaces/IVanillaRegistryV2.sol"; -import {IVanillaRegistry} from "../../contracts/interfaces/IVanillaRegistry.sol"; +import {IVanillaRegistry} from "../../contracts/upgrades/IVanillaRegistry.sol"; import {IMevCommitAVS} from "../../contracts/interfaces/IMevCommitAVS.sol"; import {IMevCommitMiddleware} from "../../contracts/interfaces/IMevCommitMiddleware.sol"; import {MevCommitMiddleware} from "../../contracts/validator-registry/middleware/MevCommitMiddleware.sol"; From 8a7698ccdacd79f5520795de3029e84cf63a661e Mon Sep 17 00:00:00 2001 From: owen-eth Date: Wed, 10 Dec 2025 20:05:12 -0500 Subject: [PATCH 3/6] updated vanilla deployer naming, added oz tag to VanillaV2, solhint ignore upgrades folder --- contracts/.solhintignore | 2 +- contracts/contracts/validator-registry/VanillaRegistryV2.sol | 1 + contracts/l1-deployer-cli.sh | 2 +- ...eployVanillaRegistry.s.sol => DeployVanillaRegistryV2.s.sol} | 0 4 files changed, 3 insertions(+), 2 deletions(-) rename contracts/scripts/validator-registry/{DeployVanillaRegistry.s.sol => DeployVanillaRegistryV2.s.sol} (100%) diff --git a/contracts/.solhintignore b/contracts/.solhintignore index f838dfa5a..103506f75 100644 --- a/contracts/.solhintignore +++ b/contracts/.solhintignore @@ -1,4 +1,4 @@ lib/ test/ node_modules/ -contracts/validator-registry/VanillaRegistry.sol \ No newline at end of file +contracts/upgrades/ \ No newline at end of file diff --git a/contracts/contracts/validator-registry/VanillaRegistryV2.sol b/contracts/contracts/validator-registry/VanillaRegistryV2.sol index c67374518..30106a4c1 100644 --- a/contracts/contracts/validator-registry/VanillaRegistryV2.sol +++ b/contracts/contracts/validator-registry/VanillaRegistryV2.sol @@ -13,6 +13,7 @@ import {FeePayout} from "../utils/FeePayout.sol"; /// @title Vanilla Registry /// @notice Logic contract enabling L1 validators to opt-in to mev-commit /// via simply staking ETH outside what's staked with the beacon chain. +/// @custom:oz-upgrades-from VanillaRegistry contract VanillaRegistryV2 is IVanillaRegistryV2, VanillaRegistryStorageV2, Ownable2StepUpgradeable, PausableUpgradeable, UUPSUpgradeable { diff --git a/contracts/l1-deployer-cli.sh b/contracts/l1-deployer-cli.sh index edeff5f3a..e80b47684 100755 --- a/contracts/l1-deployer-cli.sh +++ b/contracts/l1-deployer-cli.sh @@ -474,7 +474,7 @@ deploy_contract_generic() { } deploy_vanilla() { - deploy_contract_generic "scripts/validator-registry/DeployVanillaRegistry.s.sol" + deploy_contract_generic "scripts/validator-registry/DeployVanillaRegistryV2.s.sol" } deploy_vanilla_rep() { diff --git a/contracts/scripts/validator-registry/DeployVanillaRegistry.s.sol b/contracts/scripts/validator-registry/DeployVanillaRegistryV2.s.sol similarity index 100% rename from contracts/scripts/validator-registry/DeployVanillaRegistry.s.sol rename to contracts/scripts/validator-registry/DeployVanillaRegistryV2.s.sol From 36f88c01d56842541e2ca9e4e40dbd4142ee2c41 Mon Sep 17 00:00:00 2001 From: owen-eth Date: Thu, 11 Dec 2025 10:22:40 -0500 Subject: [PATCH 4/6] updated vanilla staking tool to comply with new naming --- tools/vanilla-stake/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/vanilla-stake/main.go b/tools/vanilla-stake/main.go index 973c2c480..e6e5e88e6 100644 --- a/tools/vanilla-stake/main.go +++ b/tools/vanilla-stake/main.go @@ -14,7 +14,7 @@ import ( "github.com/ethereum/go-ethereum/ethclient" "github.com/urfave/cli/v2" - vanillaregistry "github.com/primev/mev-commit/contracts-abi/clients/VanillaRegistry" + vanillaregistry "github.com/primev/mev-commit/contracts-abi/clients/VanillaRegistryV2" "github.com/primev/mev-commit/x/keysigner" ) @@ -114,7 +114,7 @@ func stakeVanilla(c *cli.Context) error { return fmt.Errorf("failed to get chain ID: %w", err) } - vrc, err := vanillaregistry.NewVanillaregistryCaller(common.HexToAddress(vanillaRegistryAddress), client) + vrc, err := vanillaregistry.NewVanillaregistryv2Caller(common.HexToAddress(vanillaRegistryAddress), client) if err != nil { return fmt.Errorf("failed to create Vanilla Registry caller: %w", err) } @@ -136,7 +136,7 @@ func stakeVanilla(c *cli.Context) error { return fmt.Errorf("caller %v is not whitelisted", signer.GetAddress()) } - vrt, err := vanillaregistry.NewVanillaregistryTransactor(common.HexToAddress(vanillaRegistryAddress), client) + vrt, err := vanillaregistry.NewVanillaregistryv2Transactor(common.HexToAddress(vanillaRegistryAddress), client) if err != nil { return fmt.Errorf("failed to create Vanilla Registry transactor: %w", err) } From 83c1bdf0bf92b2003a7586eeb9cbe3568ba34ea3 Mon Sep 17 00:00:00 2001 From: owen-eth Date: Thu, 11 Dec 2025 11:24:40 -0500 Subject: [PATCH 5/6] keep abi and go code naming as is, but use vanilla v2 contract --- contracts-abi/abi/VanillaRegistry.abi | 123 +- contracts-abi/abi/VanillaRegistryV2.abi | 1454 ------ .../VanillaRegistry/VanillaRegistry.go | 379 +- .../VanillaRegistryV2/VanillaRegistryV2.go | 4308 ----------------- contracts-abi/script.sh | 6 +- tools/vanilla-stake/main.go | 6 +- 6 files changed, 492 insertions(+), 5784 deletions(-) delete mode 100644 contracts-abi/abi/VanillaRegistryV2.abi delete mode 100644 contracts-abi/clients/VanillaRegistryV2/VanillaRegistryV2.go diff --git a/contracts-abi/abi/VanillaRegistry.abi b/contracts-abi/abi/VanillaRegistry.abi index 208370b00..47c5f260f 100644 --- a/contracts-abi/abi/VanillaRegistry.abi +++ b/contracts-abi/abi/VanillaRegistry.abi @@ -172,7 +172,7 @@ { "name": "", "type": "tuple", - "internalType": "struct IVanillaRegistry.StakedValidator", + "internalType": "struct IVanillaRegistryV2.StakedValidator", "components": [ { "name": "exists", @@ -379,6 +379,19 @@ ], "stateMutability": "view" }, + { + "type": "function", + "name": "removeWhitelistedStakers", + "inputs": [ + { + "name": "stakers", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, { "type": "function", "name": "renounceOwnership", @@ -633,6 +646,38 @@ "outputs": [], "stateMutability": "payable" }, + { + "type": "function", + "name": "whitelistStakers", + "inputs": [ + { + "name": "stakers", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "whitelistedStakers", + "inputs": [ + { + "name": "staker", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "whitelisted", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, { "type": "function", "name": "withdraw", @@ -941,6 +986,44 @@ ], "anonymous": false }, + { + "type": "event", + "name": "StakerRemovedFromWhitelist", + "inputs": [ + { + "name": "msgSender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "staker", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "StakerWhitelisted", + "inputs": [ + { + "name": "msgSender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "staker", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, { "type": "event", "name": "TotalStakeWithdrawn", @@ -1125,11 +1208,6 @@ "name": "InvalidReceive", "inputs": [] }, - { - "type": "error", - "name": "MinStakeMustBePositive", - "inputs": [] - }, { "type": "error", "name": "MustUnstakeToWithdraw", @@ -1188,6 +1266,17 @@ } ] }, + { + "type": "error", + "name": "SenderIsNotWhitelistedStaker", + "inputs": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + } + ] + }, { "type": "error", "name": "SenderIsNotWithdrawalAddress", @@ -1250,6 +1339,28 @@ } ] }, + { + "type": "error", + "name": "StakerAlreadyWhitelisted", + "inputs": [ + { + "name": "staker", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "StakerNotWhitelisted", + "inputs": [ + { + "name": "staker", + "type": "address", + "internalType": "address" + } + ] + }, { "type": "error", "name": "TransferToRecipientFailed", diff --git a/contracts-abi/abi/VanillaRegistryV2.abi b/contracts-abi/abi/VanillaRegistryV2.abi deleted file mode 100644 index 47c5f260f..000000000 --- a/contracts-abi/abi/VanillaRegistryV2.abi +++ /dev/null @@ -1,1454 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "fallback", - "stateMutability": "payable" - }, - { - "type": "receive", - "stateMutability": "payable" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "acceptOwnership", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "addStake", - "inputs": [ - { - "name": "blsPubKeys", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "claimForceWithdrawnFunds", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "delegateStake", - "inputs": [ - { - "name": "blsPubKeys", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "withdrawalAddress", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "forceWithdrawalAsOwner", - "inputs": [ - { - "name": "blsPubKeys", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "withdrawalAddress", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "forceWithdrawnFunds", - "inputs": [ - { - "name": "withdrawalAddress", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "amountToClaim", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getAccumulatedSlashingFunds", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getBlocksTillWithdrawAllowed", - "inputs": [ - { - "name": "valBLSPubKey", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getStakedAmount", - "inputs": [ - { - "name": "valBLSPubKey", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getStakedValidator", - "inputs": [ - { - "name": "valBLSPubKey", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct IVanillaRegistryV2.StakedValidator", - "components": [ - { - "name": "exists", - "type": "bool", - "internalType": "bool" - }, - { - "name": "withdrawalAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "balance", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "unstakeOccurrence", - "type": "tuple", - "internalType": "struct BlockHeightOccurrence.Occurrence", - "components": [ - { - "name": "exists", - "type": "bool", - "internalType": "bool" - }, - { - "name": "blockHeight", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "_minStake", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "_slashOracle", - "type": "address", - "internalType": "address" - }, - { - "name": "_slashReceiver", - "type": "address", - "internalType": "address" - }, - { - "name": "_unstakePeriodBlocks", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "_slashingPayoutPeriodBlocks", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "_owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isSlashingPayoutDue", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isUnstaking", - "inputs": [ - { - "name": "valBLSPubKey", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isValidatorOptedIn", - "inputs": [ - { - "name": "valBLSPubKey", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "manuallyTransferSlashingFunds", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "minStake", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "owner", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "pause", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "paused", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "pendingOwner", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "removeWhitelistedStakers", - "inputs": [ - { - "name": "stakers", - "type": "address[]", - "internalType": "address[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "renounceOwnership", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setMinStake", - "inputs": [ - { - "name": "newMinStake", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setSlashOracle", - "inputs": [ - { - "name": "newSlashOracle", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setSlashReceiver", - "inputs": [ - { - "name": "newSlashReceiver", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setSlashingPayoutPeriodBlocks", - "inputs": [ - { - "name": "newSlashingPayoutPeriodBlocks", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setUnstakePeriodBlocks", - "inputs": [ - { - "name": "newUnstakePeriodBlocks", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "slash", - "inputs": [ - { - "name": "blsPubKeys", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "payoutIfDue", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "slashOracle", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "slashingFundsTracker", - "inputs": [], - "outputs": [ - { - "name": "recipient", - "type": "address", - "internalType": "address" - }, - { - "name": "accumulatedAmount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "lastPayoutBlock", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "payoutPeriodBlocks", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "stake", - "inputs": [ - { - "name": "blsPubKeys", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "stakedValidators", - "inputs": [ - { - "name": "", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "exists", - "type": "bool", - "internalType": "bool" - }, - { - "name": "withdrawalAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "balance", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "unstakeOccurrence", - "type": "tuple", - "internalType": "struct BlockHeightOccurrence.Occurrence", - "components": [ - { - "name": "exists", - "type": "bool", - "internalType": "bool" - }, - { - "name": "blockHeight", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "transferOwnership", - "inputs": [ - { - "name": "newOwner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "unpause", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "unstake", - "inputs": [ - { - "name": "blsPubKeys", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "unstakePeriodBlocks", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "upgradeToAndCall", - "inputs": [ - { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "whitelistStakers", - "inputs": [ - { - "name": "stakers", - "type": "address[]", - "internalType": "address[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "whitelistedStakers", - "inputs": [ - { - "name": "staker", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "whitelisted", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "withdraw", - "inputs": [ - { - "name": "blsPubKeys", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "FeeTransfer", - "inputs": [ - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "recipient", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "MinStakeSet", - "inputs": [ - { - "name": "msgSender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newMinStake", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "OwnershipTransferStarted", - "inputs": [ - { - "name": "previousOwner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newOwner", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "OwnershipTransferred", - "inputs": [ - { - "name": "previousOwner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newOwner", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Paused", - "inputs": [ - { - "name": "account", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "SlashOracleSet", - "inputs": [ - { - "name": "msgSender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newSlashOracle", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "SlashReceiverSet", - "inputs": [ - { - "name": "msgSender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newSlashReceiver", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Slashed", - "inputs": [ - { - "name": "msgSender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "slashReceiver", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "withdrawalAddress", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "valBLSPubKey", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "SlashingPayoutPeriodBlocksSet", - "inputs": [ - { - "name": "msgSender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newSlashingPayoutPeriodBlocks", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "StakeAdded", - "inputs": [ - { - "name": "msgSender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "withdrawalAddress", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "valBLSPubKey", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newBalance", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "StakeWithdrawn", - "inputs": [ - { - "name": "msgSender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "withdrawalAddress", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "valBLSPubKey", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Staked", - "inputs": [ - { - "name": "msgSender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "withdrawalAddress", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "valBLSPubKey", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "StakerRemovedFromWhitelist", - "inputs": [ - { - "name": "msgSender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "staker", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "StakerWhitelisted", - "inputs": [ - { - "name": "msgSender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "staker", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "TotalStakeWithdrawn", - "inputs": [ - { - "name": "msgSender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "withdrawalAddress", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "totalAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Unpaused", - "inputs": [ - { - "name": "account", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "UnstakePeriodBlocksSet", - "inputs": [ - { - "name": "msgSender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newUnstakePeriodBlocks", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Unstaked", - "inputs": [ - { - "name": "msgSender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "withdrawalAddress", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "valBLSPubKey", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AddressEmptyCode", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AtLeastOneRecipientRequired", - "inputs": [] - }, - { - "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "inputs": [] - }, - { - "type": "error", - "name": "EnforcedPause", - "inputs": [] - }, - { - "type": "error", - "name": "ExpectedPause", - "inputs": [] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "FeeRecipientIsZero", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidBLSPubKeyLength", - "inputs": [ - { - "name": "expected", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "actual", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "InvalidFallback", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidReceive", - "inputs": [] - }, - { - "type": "error", - "name": "MustUnstakeToWithdraw", - "inputs": [] - }, - { - "type": "error", - "name": "NoFundsToWithdraw", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "OwnableInvalidOwner", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "OwnableUnauthorizedAccount", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "PayoutPeriodMustBePositive", - "inputs": [] - }, - { - "type": "error", - "name": "SenderIsNotSlashOracle", - "inputs": [ - { - "name": "sender", - "type": "address", - "internalType": "address" - }, - { - "name": "slashOracle", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "SenderIsNotWhitelistedStaker", - "inputs": [ - { - "name": "sender", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "SenderIsNotWithdrawalAddress", - "inputs": [ - { - "name": "sender", - "type": "address", - "internalType": "address" - }, - { - "name": "withdrawalAddress", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "SlashAmountMustBeLessThanMinStake", - "inputs": [] - }, - { - "type": "error", - "name": "SlashAmountMustBePositive", - "inputs": [] - }, - { - "type": "error", - "name": "SlashOracleMustBeSet", - "inputs": [] - }, - { - "type": "error", - "name": "SlashReceiverMustBeSet", - "inputs": [] - }, - { - "type": "error", - "name": "SlashingPayoutPeriodMustBePositive", - "inputs": [] - }, - { - "type": "error", - "name": "SlashingTransferFailed", - "inputs": [] - }, - { - "type": "error", - "name": "StakeTooLowForNumberOfKeys", - "inputs": [ - { - "name": "msgValue", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "required", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "StakerAlreadyWhitelisted", - "inputs": [ - { - "name": "staker", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "StakerNotWhitelisted", - "inputs": [ - { - "name": "staker", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "TransferToRecipientFailed", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "UnstakePeriodMustBePositive", - "inputs": [] - }, - { - "type": "error", - "name": "ValidatorCannotBeUnstaking", - "inputs": [ - { - "name": "valBLSPubKey", - "type": "bytes", - "internalType": "bytes" - } - ] - }, - { - "type": "error", - "name": "ValidatorRecordMustExist", - "inputs": [ - { - "name": "valBLSPubKey", - "type": "bytes", - "internalType": "bytes" - } - ] - }, - { - "type": "error", - "name": "ValidatorRecordMustNotExist", - "inputs": [ - { - "name": "valBLSPubKey", - "type": "bytes", - "internalType": "bytes" - } - ] - }, - { - "type": "error", - "name": "WithdrawalAddressMismatch", - "inputs": [ - { - "name": "actualWithdrawalAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "expectedWithdrawalAddress", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "WithdrawalAddressMustBeSet", - "inputs": [] - }, - { - "type": "error", - "name": "WithdrawalFailed", - "inputs": [] - }, - { - "type": "error", - "name": "WithdrawingTooSoon", - "inputs": [] - } -] diff --git a/contracts-abi/clients/VanillaRegistry/VanillaRegistry.go b/contracts-abi/clients/VanillaRegistry/VanillaRegistry.go index 677f6d9b3..54fc18aa1 100644 --- a/contracts-abi/clients/VanillaRegistry/VanillaRegistry.go +++ b/contracts-abi/clients/VanillaRegistry/VanillaRegistry.go @@ -35,8 +35,8 @@ type BlockHeightOccurrenceOccurrence struct { BlockHeight *big.Int } -// IVanillaRegistryStakedValidator is an auto generated low-level Go binding around an user-defined struct. -type IVanillaRegistryStakedValidator struct { +// IVanillaRegistryV2StakedValidator is an auto generated low-level Go binding around an user-defined struct. +type IVanillaRegistryV2StakedValidator struct { Exists bool WithdrawalAddress common.Address Balance *big.Int @@ -45,7 +45,7 @@ type IVanillaRegistryStakedValidator struct { // VanillaregistryMetaData contains all meta data concerning the Vanillaregistry contract. var VanillaregistryMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"fallback\",\"stateMutability\":\"payable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"UPGRADE_INTERFACE_VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"addStake\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"claimForceWithdrawnFunds\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegateStake\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"forceWithdrawalAsOwner\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"forceWithdrawnFunds\",\"inputs\":[{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"amountToClaim\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAccumulatedSlashingFunds\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBlocksTillWithdrawAllowed\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStakedAmount\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStakedValidator\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIVanillaRegistry.StakedValidator\",\"components\":[{\"name\":\"exists\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"balance\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"unstakeOccurrence\",\"type\":\"tuple\",\"internalType\":\"structBlockHeightOccurrence.Occurrence\",\"components\":[{\"name\":\"exists\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"blockHeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_minStake\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_slashOracle\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_slashReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_unstakePeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_slashingPayoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isSlashingPayoutDue\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isUnstaking\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isValidatorOptedIn\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"manuallyTransferSlashingFunds\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"minStake\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proxiableUUID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setMinStake\",\"inputs\":[{\"name\":\"newMinStake\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setSlashOracle\",\"inputs\":[{\"name\":\"newSlashOracle\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setSlashReceiver\",\"inputs\":[{\"name\":\"newSlashReceiver\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setSlashingPayoutPeriodBlocks\",\"inputs\":[{\"name\":\"newSlashingPayoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setUnstakePeriodBlocks\",\"inputs\":[{\"name\":\"newUnstakePeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slash\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"payoutIfDue\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slashOracle\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"slashingFundsTracker\",\"inputs\":[],\"outputs\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"accumulatedAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"lastPayoutBlock\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"payoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stake\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"stakedValidators\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"exists\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"balance\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"unstakeOccurrence\",\"type\":\"tuple\",\"internalType\":\"structBlockHeightOccurrence.Occurrence\",\"components\":[{\"name\":\"exists\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"blockHeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unstake\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unstakePeriodBlocks\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"upgradeToAndCall\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"withdraw\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"FeeTransfer\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"recipient\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MinStakeSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newMinStake\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlashOracleSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newSlashOracle\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlashReceiverSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newSlashReceiver\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Slashed\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"slashReceiver\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlashingPayoutPeriodBlocksSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newSlashingPayoutPeriodBlocks\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakeAdded\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newBalance\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakeWithdrawn\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Staked\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TotalStakeWithdrawn\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"totalAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"UnstakePeriodBlocksSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newUnstakePeriodBlocks\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unstaked\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AddressEmptyCode\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"AtLeastOneRecipientRequired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ERC1967InvalidImplementation\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967NonPayable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"EnforcedPause\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ExpectedPause\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FailedInnerCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FeeRecipientIsZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidBLSPubKeyLength\",\"inputs\":[{\"name\":\"expected\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"actual\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"InvalidFallback\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidReceive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"MinStakeMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"MustUnstakeToWithdraw\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoFundsToWithdraw\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"PayoutPeriodMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SenderIsNotSlashOracle\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"slashOracle\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"SenderIsNotWithdrawalAddress\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"SlashAmountMustBeLessThanMinStake\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashAmountMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashOracleMustBeSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashReceiverMustBeSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashingPayoutPeriodMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashingTransferFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StakeTooLowForNumberOfKeys\",\"inputs\":[{\"name\":\"msgValue\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"required\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"TransferToRecipientFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnauthorizedCallContext\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnsupportedProxiableUUID\",\"inputs\":[{\"name\":\"slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"UnstakePeriodMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ValidatorCannotBeUnstaking\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ValidatorRecordMustExist\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ValidatorRecordMustNotExist\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"WithdrawalAddressMismatch\",\"inputs\":[{\"name\":\"actualWithdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"expectedWithdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"WithdrawalAddressMustBeSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WithdrawalFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WithdrawingTooSoon\",\"inputs\":[]}]", + ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"fallback\",\"stateMutability\":\"payable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"UPGRADE_INTERFACE_VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"addStake\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"claimForceWithdrawnFunds\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegateStake\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"forceWithdrawalAsOwner\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"forceWithdrawnFunds\",\"inputs\":[{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"amountToClaim\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAccumulatedSlashingFunds\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBlocksTillWithdrawAllowed\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStakedAmount\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStakedValidator\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIVanillaRegistryV2.StakedValidator\",\"components\":[{\"name\":\"exists\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"balance\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"unstakeOccurrence\",\"type\":\"tuple\",\"internalType\":\"structBlockHeightOccurrence.Occurrence\",\"components\":[{\"name\":\"exists\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"blockHeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_minStake\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_slashOracle\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_slashReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_unstakePeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_slashingPayoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isSlashingPayoutDue\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isUnstaking\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isValidatorOptedIn\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"manuallyTransferSlashingFunds\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"minStake\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proxiableUUID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"removeWhitelistedStakers\",\"inputs\":[{\"name\":\"stakers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setMinStake\",\"inputs\":[{\"name\":\"newMinStake\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setSlashOracle\",\"inputs\":[{\"name\":\"newSlashOracle\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setSlashReceiver\",\"inputs\":[{\"name\":\"newSlashReceiver\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setSlashingPayoutPeriodBlocks\",\"inputs\":[{\"name\":\"newSlashingPayoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setUnstakePeriodBlocks\",\"inputs\":[{\"name\":\"newUnstakePeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slash\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"payoutIfDue\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slashOracle\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"slashingFundsTracker\",\"inputs\":[],\"outputs\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"accumulatedAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"lastPayoutBlock\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"payoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stake\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"stakedValidators\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"exists\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"balance\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"unstakeOccurrence\",\"type\":\"tuple\",\"internalType\":\"structBlockHeightOccurrence.Occurrence\",\"components\":[{\"name\":\"exists\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"blockHeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unstake\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unstakePeriodBlocks\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"upgradeToAndCall\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"whitelistStakers\",\"inputs\":[{\"name\":\"stakers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"whitelistedStakers\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"whitelisted\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdraw\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"FeeTransfer\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"recipient\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MinStakeSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newMinStake\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlashOracleSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newSlashOracle\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlashReceiverSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newSlashReceiver\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Slashed\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"slashReceiver\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlashingPayoutPeriodBlocksSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newSlashingPayoutPeriodBlocks\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakeAdded\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newBalance\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakeWithdrawn\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Staked\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakerRemovedFromWhitelist\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakerWhitelisted\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TotalStakeWithdrawn\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"totalAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"UnstakePeriodBlocksSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newUnstakePeriodBlocks\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unstaked\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AddressEmptyCode\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"AtLeastOneRecipientRequired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ERC1967InvalidImplementation\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967NonPayable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"EnforcedPause\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ExpectedPause\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FailedInnerCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FeeRecipientIsZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidBLSPubKeyLength\",\"inputs\":[{\"name\":\"expected\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"actual\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"InvalidFallback\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidReceive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"MustUnstakeToWithdraw\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoFundsToWithdraw\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"PayoutPeriodMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SenderIsNotSlashOracle\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"slashOracle\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"SenderIsNotWhitelistedStaker\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"SenderIsNotWithdrawalAddress\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"SlashAmountMustBeLessThanMinStake\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashAmountMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashOracleMustBeSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashReceiverMustBeSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashingPayoutPeriodMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashingTransferFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StakeTooLowForNumberOfKeys\",\"inputs\":[{\"name\":\"msgValue\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"required\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"StakerAlreadyWhitelisted\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"StakerNotWhitelisted\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"TransferToRecipientFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnauthorizedCallContext\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnsupportedProxiableUUID\",\"inputs\":[{\"name\":\"slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"UnstakePeriodMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ValidatorCannotBeUnstaking\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ValidatorRecordMustExist\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ValidatorRecordMustNotExist\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"WithdrawalAddressMismatch\",\"inputs\":[{\"name\":\"actualWithdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"expectedWithdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"WithdrawalAddressMustBeSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WithdrawalFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WithdrawingTooSoon\",\"inputs\":[]}]", } // VanillaregistryABI is the input ABI used to generate the binding from. @@ -352,15 +352,15 @@ func (_Vanillaregistry *VanillaregistryCallerSession) GetStakedAmount(valBLSPubK // GetStakedValidator is a free data retrieval call binding the contract method 0x1fc7c7c8. // // Solidity: function getStakedValidator(bytes valBLSPubKey) view returns((bool,address,uint256,(bool,uint256))) -func (_Vanillaregistry *VanillaregistryCaller) GetStakedValidator(opts *bind.CallOpts, valBLSPubKey []byte) (IVanillaRegistryStakedValidator, error) { +func (_Vanillaregistry *VanillaregistryCaller) GetStakedValidator(opts *bind.CallOpts, valBLSPubKey []byte) (IVanillaRegistryV2StakedValidator, error) { var out []interface{} err := _Vanillaregistry.contract.Call(opts, &out, "getStakedValidator", valBLSPubKey) if err != nil { - return *new(IVanillaRegistryStakedValidator), err + return *new(IVanillaRegistryV2StakedValidator), err } - out0 := *abi.ConvertType(out[0], new(IVanillaRegistryStakedValidator)).(*IVanillaRegistryStakedValidator) + out0 := *abi.ConvertType(out[0], new(IVanillaRegistryV2StakedValidator)).(*IVanillaRegistryV2StakedValidator) return out0, err @@ -369,14 +369,14 @@ func (_Vanillaregistry *VanillaregistryCaller) GetStakedValidator(opts *bind.Cal // GetStakedValidator is a free data retrieval call binding the contract method 0x1fc7c7c8. // // Solidity: function getStakedValidator(bytes valBLSPubKey) view returns((bool,address,uint256,(bool,uint256))) -func (_Vanillaregistry *VanillaregistrySession) GetStakedValidator(valBLSPubKey []byte) (IVanillaRegistryStakedValidator, error) { +func (_Vanillaregistry *VanillaregistrySession) GetStakedValidator(valBLSPubKey []byte) (IVanillaRegistryV2StakedValidator, error) { return _Vanillaregistry.Contract.GetStakedValidator(&_Vanillaregistry.CallOpts, valBLSPubKey) } // GetStakedValidator is a free data retrieval call binding the contract method 0x1fc7c7c8. // // Solidity: function getStakedValidator(bytes valBLSPubKey) view returns((bool,address,uint256,(bool,uint256))) -func (_Vanillaregistry *VanillaregistryCallerSession) GetStakedValidator(valBLSPubKey []byte) (IVanillaRegistryStakedValidator, error) { +func (_Vanillaregistry *VanillaregistryCallerSession) GetStakedValidator(valBLSPubKey []byte) (IVanillaRegistryV2StakedValidator, error) { return _Vanillaregistry.Contract.GetStakedValidator(&_Vanillaregistry.CallOpts, valBLSPubKey) } @@ -800,6 +800,37 @@ func (_Vanillaregistry *VanillaregistryCallerSession) UnstakePeriodBlocks() (*bi return _Vanillaregistry.Contract.UnstakePeriodBlocks(&_Vanillaregistry.CallOpts) } +// WhitelistedStakers is a free data retrieval call binding the contract method 0xfdaf17f0. +// +// Solidity: function whitelistedStakers(address staker) view returns(bool whitelisted) +func (_Vanillaregistry *VanillaregistryCaller) WhitelistedStakers(opts *bind.CallOpts, staker common.Address) (bool, error) { + var out []interface{} + err := _Vanillaregistry.contract.Call(opts, &out, "whitelistedStakers", staker) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// WhitelistedStakers is a free data retrieval call binding the contract method 0xfdaf17f0. +// +// Solidity: function whitelistedStakers(address staker) view returns(bool whitelisted) +func (_Vanillaregistry *VanillaregistrySession) WhitelistedStakers(staker common.Address) (bool, error) { + return _Vanillaregistry.Contract.WhitelistedStakers(&_Vanillaregistry.CallOpts, staker) +} + +// WhitelistedStakers is a free data retrieval call binding the contract method 0xfdaf17f0. +// +// Solidity: function whitelistedStakers(address staker) view returns(bool whitelisted) +func (_Vanillaregistry *VanillaregistryCallerSession) WhitelistedStakers(staker common.Address) (bool, error) { + return _Vanillaregistry.Contract.WhitelistedStakers(&_Vanillaregistry.CallOpts, staker) +} + // AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. // // Solidity: function acceptOwnership() returns() @@ -968,6 +999,27 @@ func (_Vanillaregistry *VanillaregistryTransactorSession) Pause() (*types.Transa return _Vanillaregistry.Contract.Pause(&_Vanillaregistry.TransactOpts) } +// RemoveWhitelistedStakers is a paid mutator transaction binding the contract method 0x5158c9fa. +// +// Solidity: function removeWhitelistedStakers(address[] stakers) returns() +func (_Vanillaregistry *VanillaregistryTransactor) RemoveWhitelistedStakers(opts *bind.TransactOpts, stakers []common.Address) (*types.Transaction, error) { + return _Vanillaregistry.contract.Transact(opts, "removeWhitelistedStakers", stakers) +} + +// RemoveWhitelistedStakers is a paid mutator transaction binding the contract method 0x5158c9fa. +// +// Solidity: function removeWhitelistedStakers(address[] stakers) returns() +func (_Vanillaregistry *VanillaregistrySession) RemoveWhitelistedStakers(stakers []common.Address) (*types.Transaction, error) { + return _Vanillaregistry.Contract.RemoveWhitelistedStakers(&_Vanillaregistry.TransactOpts, stakers) +} + +// RemoveWhitelistedStakers is a paid mutator transaction binding the contract method 0x5158c9fa. +// +// Solidity: function removeWhitelistedStakers(address[] stakers) returns() +func (_Vanillaregistry *VanillaregistryTransactorSession) RemoveWhitelistedStakers(stakers []common.Address) (*types.Transaction, error) { + return _Vanillaregistry.Contract.RemoveWhitelistedStakers(&_Vanillaregistry.TransactOpts, stakers) +} + // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. // // Solidity: function renounceOwnership() returns() @@ -1220,6 +1272,27 @@ func (_Vanillaregistry *VanillaregistryTransactorSession) UpgradeToAndCall(newIm return _Vanillaregistry.Contract.UpgradeToAndCall(&_Vanillaregistry.TransactOpts, newImplementation, data) } +// WhitelistStakers is a paid mutator transaction binding the contract method 0x95ebffdb. +// +// Solidity: function whitelistStakers(address[] stakers) returns() +func (_Vanillaregistry *VanillaregistryTransactor) WhitelistStakers(opts *bind.TransactOpts, stakers []common.Address) (*types.Transaction, error) { + return _Vanillaregistry.contract.Transact(opts, "whitelistStakers", stakers) +} + +// WhitelistStakers is a paid mutator transaction binding the contract method 0x95ebffdb. +// +// Solidity: function whitelistStakers(address[] stakers) returns() +func (_Vanillaregistry *VanillaregistrySession) WhitelistStakers(stakers []common.Address) (*types.Transaction, error) { + return _Vanillaregistry.Contract.WhitelistStakers(&_Vanillaregistry.TransactOpts, stakers) +} + +// WhitelistStakers is a paid mutator transaction binding the contract method 0x95ebffdb. +// +// Solidity: function whitelistStakers(address[] stakers) returns() +func (_Vanillaregistry *VanillaregistryTransactorSession) WhitelistStakers(stakers []common.Address) (*types.Transaction, error) { + return _Vanillaregistry.Contract.WhitelistStakers(&_Vanillaregistry.TransactOpts, stakers) +} + // Withdraw is a paid mutator transaction binding the contract method 0xdcb1edcb. // // Solidity: function withdraw(bytes[] blsPubKeys) returns() @@ -3212,6 +3285,296 @@ func (_Vanillaregistry *VanillaregistryFilterer) ParseStaked(log types.Log) (*Va return event, nil } +// VanillaregistryStakerRemovedFromWhitelistIterator is returned from FilterStakerRemovedFromWhitelist and is used to iterate over the raw logs and unpacked data for StakerRemovedFromWhitelist events raised by the Vanillaregistry contract. +type VanillaregistryStakerRemovedFromWhitelistIterator struct { + Event *VanillaregistryStakerRemovedFromWhitelist // 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 *VanillaregistryStakerRemovedFromWhitelistIterator) 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(VanillaregistryStakerRemovedFromWhitelist) + 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(VanillaregistryStakerRemovedFromWhitelist) + 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 *VanillaregistryStakerRemovedFromWhitelistIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *VanillaregistryStakerRemovedFromWhitelistIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// VanillaregistryStakerRemovedFromWhitelist represents a StakerRemovedFromWhitelist event raised by the Vanillaregistry contract. +type VanillaregistryStakerRemovedFromWhitelist struct { + MsgSender common.Address + Staker common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterStakerRemovedFromWhitelist is a free log retrieval operation binding the contract event 0x79fccea9ca325c6c715589de68546a63a35425178d1a8b1436bef7f7a76087a4. +// +// Solidity: event StakerRemovedFromWhitelist(address indexed msgSender, address staker) +func (_Vanillaregistry *VanillaregistryFilterer) FilterStakerRemovedFromWhitelist(opts *bind.FilterOpts, msgSender []common.Address) (*VanillaregistryStakerRemovedFromWhitelistIterator, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + + logs, sub, err := _Vanillaregistry.contract.FilterLogs(opts, "StakerRemovedFromWhitelist", msgSenderRule) + if err != nil { + return nil, err + } + return &VanillaregistryStakerRemovedFromWhitelistIterator{contract: _Vanillaregistry.contract, event: "StakerRemovedFromWhitelist", logs: logs, sub: sub}, nil +} + +// WatchStakerRemovedFromWhitelist is a free log subscription operation binding the contract event 0x79fccea9ca325c6c715589de68546a63a35425178d1a8b1436bef7f7a76087a4. +// +// Solidity: event StakerRemovedFromWhitelist(address indexed msgSender, address staker) +func (_Vanillaregistry *VanillaregistryFilterer) WatchStakerRemovedFromWhitelist(opts *bind.WatchOpts, sink chan<- *VanillaregistryStakerRemovedFromWhitelist, msgSender []common.Address) (event.Subscription, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + + logs, sub, err := _Vanillaregistry.contract.WatchLogs(opts, "StakerRemovedFromWhitelist", msgSenderRule) + 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(VanillaregistryStakerRemovedFromWhitelist) + if err := _Vanillaregistry.contract.UnpackLog(event, "StakerRemovedFromWhitelist", 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 +} + +// ParseStakerRemovedFromWhitelist is a log parse operation binding the contract event 0x79fccea9ca325c6c715589de68546a63a35425178d1a8b1436bef7f7a76087a4. +// +// Solidity: event StakerRemovedFromWhitelist(address indexed msgSender, address staker) +func (_Vanillaregistry *VanillaregistryFilterer) ParseStakerRemovedFromWhitelist(log types.Log) (*VanillaregistryStakerRemovedFromWhitelist, error) { + event := new(VanillaregistryStakerRemovedFromWhitelist) + if err := _Vanillaregistry.contract.UnpackLog(event, "StakerRemovedFromWhitelist", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// VanillaregistryStakerWhitelistedIterator is returned from FilterStakerWhitelisted and is used to iterate over the raw logs and unpacked data for StakerWhitelisted events raised by the Vanillaregistry contract. +type VanillaregistryStakerWhitelistedIterator struct { + Event *VanillaregistryStakerWhitelisted // 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 *VanillaregistryStakerWhitelistedIterator) 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(VanillaregistryStakerWhitelisted) + 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(VanillaregistryStakerWhitelisted) + 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 *VanillaregistryStakerWhitelistedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *VanillaregistryStakerWhitelistedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// VanillaregistryStakerWhitelisted represents a StakerWhitelisted event raised by the Vanillaregistry contract. +type VanillaregistryStakerWhitelisted struct { + MsgSender common.Address + Staker common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterStakerWhitelisted is a free log retrieval operation binding the contract event 0xc94be990bcb425c41f84d9928ad9082894fb4f1f1d2508bc088d3a6a3e4059db. +// +// Solidity: event StakerWhitelisted(address indexed msgSender, address staker) +func (_Vanillaregistry *VanillaregistryFilterer) FilterStakerWhitelisted(opts *bind.FilterOpts, msgSender []common.Address) (*VanillaregistryStakerWhitelistedIterator, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + + logs, sub, err := _Vanillaregistry.contract.FilterLogs(opts, "StakerWhitelisted", msgSenderRule) + if err != nil { + return nil, err + } + return &VanillaregistryStakerWhitelistedIterator{contract: _Vanillaregistry.contract, event: "StakerWhitelisted", logs: logs, sub: sub}, nil +} + +// WatchStakerWhitelisted is a free log subscription operation binding the contract event 0xc94be990bcb425c41f84d9928ad9082894fb4f1f1d2508bc088d3a6a3e4059db. +// +// Solidity: event StakerWhitelisted(address indexed msgSender, address staker) +func (_Vanillaregistry *VanillaregistryFilterer) WatchStakerWhitelisted(opts *bind.WatchOpts, sink chan<- *VanillaregistryStakerWhitelisted, msgSender []common.Address) (event.Subscription, error) { + + var msgSenderRule []interface{} + for _, msgSenderItem := range msgSender { + msgSenderRule = append(msgSenderRule, msgSenderItem) + } + + logs, sub, err := _Vanillaregistry.contract.WatchLogs(opts, "StakerWhitelisted", msgSenderRule) + 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(VanillaregistryStakerWhitelisted) + if err := _Vanillaregistry.contract.UnpackLog(event, "StakerWhitelisted", 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 +} + +// ParseStakerWhitelisted is a log parse operation binding the contract event 0xc94be990bcb425c41f84d9928ad9082894fb4f1f1d2508bc088d3a6a3e4059db. +// +// Solidity: event StakerWhitelisted(address indexed msgSender, address staker) +func (_Vanillaregistry *VanillaregistryFilterer) ParseStakerWhitelisted(log types.Log) (*VanillaregistryStakerWhitelisted, error) { + event := new(VanillaregistryStakerWhitelisted) + if err := _Vanillaregistry.contract.UnpackLog(event, "StakerWhitelisted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // VanillaregistryTotalStakeWithdrawnIterator is returned from FilterTotalStakeWithdrawn and is used to iterate over the raw logs and unpacked data for TotalStakeWithdrawn events raised by the Vanillaregistry contract. type VanillaregistryTotalStakeWithdrawnIterator struct { Event *VanillaregistryTotalStakeWithdrawn // Event containing the contract specifics and raw log diff --git a/contracts-abi/clients/VanillaRegistryV2/VanillaRegistryV2.go b/contracts-abi/clients/VanillaRegistryV2/VanillaRegistryV2.go deleted file mode 100644 index 9651792f9..000000000 --- a/contracts-abi/clients/VanillaRegistryV2/VanillaRegistryV2.go +++ /dev/null @@ -1,4308 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package vanillaregistryv2 - -import ( - "errors" - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" -) - -// Reference imports to suppress errors if they are not otherwise used. -var ( - _ = errors.New - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription - _ = abi.ConvertType -) - -// BlockHeightOccurrenceOccurrence is an auto generated low-level Go binding around an user-defined struct. -type BlockHeightOccurrenceOccurrence struct { - Exists bool - BlockHeight *big.Int -} - -// IVanillaRegistryV2StakedValidator is an auto generated low-level Go binding around an user-defined struct. -type IVanillaRegistryV2StakedValidator struct { - Exists bool - WithdrawalAddress common.Address - Balance *big.Int - UnstakeOccurrence BlockHeightOccurrenceOccurrence -} - -// Vanillaregistryv2MetaData contains all meta data concerning the Vanillaregistryv2 contract. -var Vanillaregistryv2MetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"fallback\",\"stateMutability\":\"payable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"UPGRADE_INTERFACE_VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"addStake\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"claimForceWithdrawnFunds\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegateStake\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"forceWithdrawalAsOwner\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"forceWithdrawnFunds\",\"inputs\":[{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"amountToClaim\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAccumulatedSlashingFunds\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBlocksTillWithdrawAllowed\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStakedAmount\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStakedValidator\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIVanillaRegistryV2.StakedValidator\",\"components\":[{\"name\":\"exists\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"balance\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"unstakeOccurrence\",\"type\":\"tuple\",\"internalType\":\"structBlockHeightOccurrence.Occurrence\",\"components\":[{\"name\":\"exists\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"blockHeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_minStake\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_slashOracle\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_slashReceiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_unstakePeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_slashingPayoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isSlashingPayoutDue\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isUnstaking\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isValidatorOptedIn\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"manuallyTransferSlashingFunds\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"minStake\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proxiableUUID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"removeWhitelistedStakers\",\"inputs\":[{\"name\":\"stakers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setMinStake\",\"inputs\":[{\"name\":\"newMinStake\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setSlashOracle\",\"inputs\":[{\"name\":\"newSlashOracle\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setSlashReceiver\",\"inputs\":[{\"name\":\"newSlashReceiver\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setSlashingPayoutPeriodBlocks\",\"inputs\":[{\"name\":\"newSlashingPayoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setUnstakePeriodBlocks\",\"inputs\":[{\"name\":\"newUnstakePeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slash\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"payoutIfDue\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slashOracle\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"slashingFundsTracker\",\"inputs\":[],\"outputs\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"accumulatedAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"lastPayoutBlock\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"payoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stake\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"stakedValidators\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"exists\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"balance\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"unstakeOccurrence\",\"type\":\"tuple\",\"internalType\":\"structBlockHeightOccurrence.Occurrence\",\"components\":[{\"name\":\"exists\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"blockHeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unstake\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unstakePeriodBlocks\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"upgradeToAndCall\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"whitelistStakers\",\"inputs\":[{\"name\":\"stakers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"whitelistedStakers\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"whitelisted\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdraw\",\"inputs\":[{\"name\":\"blsPubKeys\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"FeeTransfer\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"recipient\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MinStakeSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newMinStake\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlashOracleSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newSlashOracle\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlashReceiverSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newSlashReceiver\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Slashed\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"slashReceiver\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlashingPayoutPeriodBlocksSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newSlashingPayoutPeriodBlocks\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakeAdded\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newBalance\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakeWithdrawn\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Staked\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakerRemovedFromWhitelist\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakerWhitelisted\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TotalStakeWithdrawn\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"totalAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"UnstakePeriodBlocksSet\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newUnstakePeriodBlocks\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unstaked\",\"inputs\":[{\"name\":\"msgSender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AddressEmptyCode\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"AtLeastOneRecipientRequired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ERC1967InvalidImplementation\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967NonPayable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"EnforcedPause\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ExpectedPause\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FailedInnerCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FeeRecipientIsZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidBLSPubKeyLength\",\"inputs\":[{\"name\":\"expected\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"actual\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"InvalidFallback\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidReceive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"MustUnstakeToWithdraw\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoFundsToWithdraw\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"PayoutPeriodMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SenderIsNotSlashOracle\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"slashOracle\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"SenderIsNotWhitelistedStaker\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"SenderIsNotWithdrawalAddress\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"SlashAmountMustBeLessThanMinStake\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashAmountMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashOracleMustBeSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashReceiverMustBeSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashingPayoutPeriodMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashingTransferFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StakeTooLowForNumberOfKeys\",\"inputs\":[{\"name\":\"msgValue\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"required\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"StakerAlreadyWhitelisted\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"StakerNotWhitelisted\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"TransferToRecipientFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnauthorizedCallContext\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnsupportedProxiableUUID\",\"inputs\":[{\"name\":\"slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"UnstakePeriodMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ValidatorCannotBeUnstaking\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ValidatorRecordMustExist\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ValidatorRecordMustNotExist\",\"inputs\":[{\"name\":\"valBLSPubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"WithdrawalAddressMismatch\",\"inputs\":[{\"name\":\"actualWithdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"expectedWithdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"WithdrawalAddressMustBeSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WithdrawalFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WithdrawingTooSoon\",\"inputs\":[]}]", -} - -// Vanillaregistryv2ABI is the input ABI used to generate the binding from. -// Deprecated: Use Vanillaregistryv2MetaData.ABI instead. -var Vanillaregistryv2ABI = Vanillaregistryv2MetaData.ABI - -// Vanillaregistryv2 is an auto generated Go binding around an Ethereum contract. -type Vanillaregistryv2 struct { - Vanillaregistryv2Caller // Read-only binding to the contract - Vanillaregistryv2Transactor // Write-only binding to the contract - Vanillaregistryv2Filterer // Log filterer for contract events -} - -// Vanillaregistryv2Caller is an auto generated read-only Go binding around an Ethereum contract. -type Vanillaregistryv2Caller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// Vanillaregistryv2Transactor is an auto generated write-only Go binding around an Ethereum contract. -type Vanillaregistryv2Transactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// Vanillaregistryv2Filterer is an auto generated log filtering Go binding around an Ethereum contract events. -type Vanillaregistryv2Filterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// Vanillaregistryv2Session is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type Vanillaregistryv2Session struct { - Contract *Vanillaregistryv2 // 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 -} - -// Vanillaregistryv2CallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type Vanillaregistryv2CallerSession struct { - Contract *Vanillaregistryv2Caller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// Vanillaregistryv2TransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type Vanillaregistryv2TransactorSession struct { - Contract *Vanillaregistryv2Transactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// Vanillaregistryv2Raw is an auto generated low-level Go binding around an Ethereum contract. -type Vanillaregistryv2Raw struct { - Contract *Vanillaregistryv2 // Generic contract binding to access the raw methods on -} - -// Vanillaregistryv2CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type Vanillaregistryv2CallerRaw struct { - Contract *Vanillaregistryv2Caller // Generic read-only contract binding to access the raw methods on -} - -// Vanillaregistryv2TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type Vanillaregistryv2TransactorRaw struct { - Contract *Vanillaregistryv2Transactor // Generic write-only contract binding to access the raw methods on -} - -// NewVanillaregistryv2 creates a new instance of Vanillaregistryv2, bound to a specific deployed contract. -func NewVanillaregistryv2(address common.Address, backend bind.ContractBackend) (*Vanillaregistryv2, error) { - contract, err := bindVanillaregistryv2(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Vanillaregistryv2{Vanillaregistryv2Caller: Vanillaregistryv2Caller{contract: contract}, Vanillaregistryv2Transactor: Vanillaregistryv2Transactor{contract: contract}, Vanillaregistryv2Filterer: Vanillaregistryv2Filterer{contract: contract}}, nil -} - -// NewVanillaregistryv2Caller creates a new read-only instance of Vanillaregistryv2, bound to a specific deployed contract. -func NewVanillaregistryv2Caller(address common.Address, caller bind.ContractCaller) (*Vanillaregistryv2Caller, error) { - contract, err := bindVanillaregistryv2(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &Vanillaregistryv2Caller{contract: contract}, nil -} - -// NewVanillaregistryv2Transactor creates a new write-only instance of Vanillaregistryv2, bound to a specific deployed contract. -func NewVanillaregistryv2Transactor(address common.Address, transactor bind.ContractTransactor) (*Vanillaregistryv2Transactor, error) { - contract, err := bindVanillaregistryv2(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &Vanillaregistryv2Transactor{contract: contract}, nil -} - -// NewVanillaregistryv2Filterer creates a new log filterer instance of Vanillaregistryv2, bound to a specific deployed contract. -func NewVanillaregistryv2Filterer(address common.Address, filterer bind.ContractFilterer) (*Vanillaregistryv2Filterer, error) { - contract, err := bindVanillaregistryv2(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &Vanillaregistryv2Filterer{contract: contract}, nil -} - -// bindVanillaregistryv2 binds a generic wrapper to an already deployed contract. -func bindVanillaregistryv2(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := Vanillaregistryv2MetaData.GetAbi() - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil -} - -// Call invokes the (constant) contract method with params as input values and -// sets the output to result. The result type might be a single field for simple -// returns, a slice of interfaces for anonymous returns and a struct for named -// returns. -func (_Vanillaregistryv2 *Vanillaregistryv2Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Vanillaregistryv2.Contract.Vanillaregistryv2Caller.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 (_Vanillaregistryv2 *Vanillaregistryv2Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.Vanillaregistryv2Transactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Vanillaregistryv2 *Vanillaregistryv2Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.Vanillaregistryv2Transactor.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 (_Vanillaregistryv2 *Vanillaregistryv2CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Vanillaregistryv2.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 (_Vanillaregistryv2 *Vanillaregistryv2TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Vanillaregistryv2 *Vanillaregistryv2TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.contract.Transact(opts, method, params...) -} - -// UPGRADEINTERFACEVERSION is a free data retrieval call binding the contract method 0xad3cb1cc. -// -// Solidity: function UPGRADE_INTERFACE_VERSION() view returns(string) -func (_Vanillaregistryv2 *Vanillaregistryv2Caller) UPGRADEINTERFACEVERSION(opts *bind.CallOpts) (string, error) { - var out []interface{} - err := _Vanillaregistryv2.contract.Call(opts, &out, "UPGRADE_INTERFACE_VERSION") - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -// UPGRADEINTERFACEVERSION is a free data retrieval call binding the contract method 0xad3cb1cc. -// -// Solidity: function UPGRADE_INTERFACE_VERSION() view returns(string) -func (_Vanillaregistryv2 *Vanillaregistryv2Session) UPGRADEINTERFACEVERSION() (string, error) { - return _Vanillaregistryv2.Contract.UPGRADEINTERFACEVERSION(&_Vanillaregistryv2.CallOpts) -} - -// UPGRADEINTERFACEVERSION is a free data retrieval call binding the contract method 0xad3cb1cc. -// -// Solidity: function UPGRADE_INTERFACE_VERSION() view returns(string) -func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) UPGRADEINTERFACEVERSION() (string, error) { - return _Vanillaregistryv2.Contract.UPGRADEINTERFACEVERSION(&_Vanillaregistryv2.CallOpts) -} - -// ForceWithdrawnFunds is a free data retrieval call binding the contract method 0x3de24562. -// -// Solidity: function forceWithdrawnFunds(address withdrawalAddress) view returns(uint256 amountToClaim) -func (_Vanillaregistryv2 *Vanillaregistryv2Caller) ForceWithdrawnFunds(opts *bind.CallOpts, withdrawalAddress common.Address) (*big.Int, error) { - var out []interface{} - err := _Vanillaregistryv2.contract.Call(opts, &out, "forceWithdrawnFunds", withdrawalAddress) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// ForceWithdrawnFunds is a free data retrieval call binding the contract method 0x3de24562. -// -// Solidity: function forceWithdrawnFunds(address withdrawalAddress) view returns(uint256 amountToClaim) -func (_Vanillaregistryv2 *Vanillaregistryv2Session) ForceWithdrawnFunds(withdrawalAddress common.Address) (*big.Int, error) { - return _Vanillaregistryv2.Contract.ForceWithdrawnFunds(&_Vanillaregistryv2.CallOpts, withdrawalAddress) -} - -// ForceWithdrawnFunds is a free data retrieval call binding the contract method 0x3de24562. -// -// Solidity: function forceWithdrawnFunds(address withdrawalAddress) view returns(uint256 amountToClaim) -func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) ForceWithdrawnFunds(withdrawalAddress common.Address) (*big.Int, error) { - return _Vanillaregistryv2.Contract.ForceWithdrawnFunds(&_Vanillaregistryv2.CallOpts, withdrawalAddress) -} - -// GetAccumulatedSlashingFunds is a free data retrieval call binding the contract method 0x5ddae85d. -// -// Solidity: function getAccumulatedSlashingFunds() view returns(uint256) -func (_Vanillaregistryv2 *Vanillaregistryv2Caller) GetAccumulatedSlashingFunds(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Vanillaregistryv2.contract.Call(opts, &out, "getAccumulatedSlashingFunds") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetAccumulatedSlashingFunds is a free data retrieval call binding the contract method 0x5ddae85d. -// -// Solidity: function getAccumulatedSlashingFunds() view returns(uint256) -func (_Vanillaregistryv2 *Vanillaregistryv2Session) GetAccumulatedSlashingFunds() (*big.Int, error) { - return _Vanillaregistryv2.Contract.GetAccumulatedSlashingFunds(&_Vanillaregistryv2.CallOpts) -} - -// GetAccumulatedSlashingFunds is a free data retrieval call binding the contract method 0x5ddae85d. -// -// Solidity: function getAccumulatedSlashingFunds() view returns(uint256) -func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) GetAccumulatedSlashingFunds() (*big.Int, error) { - return _Vanillaregistryv2.Contract.GetAccumulatedSlashingFunds(&_Vanillaregistryv2.CallOpts) -} - -// GetBlocksTillWithdrawAllowed is a free data retrieval call binding the contract method 0x14699cb9. -// -// Solidity: function getBlocksTillWithdrawAllowed(bytes valBLSPubKey) view returns(uint256) -func (_Vanillaregistryv2 *Vanillaregistryv2Caller) GetBlocksTillWithdrawAllowed(opts *bind.CallOpts, valBLSPubKey []byte) (*big.Int, error) { - var out []interface{} - err := _Vanillaregistryv2.contract.Call(opts, &out, "getBlocksTillWithdrawAllowed", valBLSPubKey) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetBlocksTillWithdrawAllowed is a free data retrieval call binding the contract method 0x14699cb9. -// -// Solidity: function getBlocksTillWithdrawAllowed(bytes valBLSPubKey) view returns(uint256) -func (_Vanillaregistryv2 *Vanillaregistryv2Session) GetBlocksTillWithdrawAllowed(valBLSPubKey []byte) (*big.Int, error) { - return _Vanillaregistryv2.Contract.GetBlocksTillWithdrawAllowed(&_Vanillaregistryv2.CallOpts, valBLSPubKey) -} - -// GetBlocksTillWithdrawAllowed is a free data retrieval call binding the contract method 0x14699cb9. -// -// Solidity: function getBlocksTillWithdrawAllowed(bytes valBLSPubKey) view returns(uint256) -func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) GetBlocksTillWithdrawAllowed(valBLSPubKey []byte) (*big.Int, error) { - return _Vanillaregistryv2.Contract.GetBlocksTillWithdrawAllowed(&_Vanillaregistryv2.CallOpts, valBLSPubKey) -} - -// GetStakedAmount is a free data retrieval call binding the contract method 0xb2a453e6. -// -// Solidity: function getStakedAmount(bytes valBLSPubKey) view returns(uint256) -func (_Vanillaregistryv2 *Vanillaregistryv2Caller) GetStakedAmount(opts *bind.CallOpts, valBLSPubKey []byte) (*big.Int, error) { - var out []interface{} - err := _Vanillaregistryv2.contract.Call(opts, &out, "getStakedAmount", valBLSPubKey) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetStakedAmount is a free data retrieval call binding the contract method 0xb2a453e6. -// -// Solidity: function getStakedAmount(bytes valBLSPubKey) view returns(uint256) -func (_Vanillaregistryv2 *Vanillaregistryv2Session) GetStakedAmount(valBLSPubKey []byte) (*big.Int, error) { - return _Vanillaregistryv2.Contract.GetStakedAmount(&_Vanillaregistryv2.CallOpts, valBLSPubKey) -} - -// GetStakedAmount is a free data retrieval call binding the contract method 0xb2a453e6. -// -// Solidity: function getStakedAmount(bytes valBLSPubKey) view returns(uint256) -func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) GetStakedAmount(valBLSPubKey []byte) (*big.Int, error) { - return _Vanillaregistryv2.Contract.GetStakedAmount(&_Vanillaregistryv2.CallOpts, valBLSPubKey) -} - -// GetStakedValidator is a free data retrieval call binding the contract method 0x1fc7c7c8. -// -// Solidity: function getStakedValidator(bytes valBLSPubKey) view returns((bool,address,uint256,(bool,uint256))) -func (_Vanillaregistryv2 *Vanillaregistryv2Caller) GetStakedValidator(opts *bind.CallOpts, valBLSPubKey []byte) (IVanillaRegistryV2StakedValidator, error) { - var out []interface{} - err := _Vanillaregistryv2.contract.Call(opts, &out, "getStakedValidator", valBLSPubKey) - - if err != nil { - return *new(IVanillaRegistryV2StakedValidator), err - } - - out0 := *abi.ConvertType(out[0], new(IVanillaRegistryV2StakedValidator)).(*IVanillaRegistryV2StakedValidator) - - return out0, err - -} - -// GetStakedValidator is a free data retrieval call binding the contract method 0x1fc7c7c8. -// -// Solidity: function getStakedValidator(bytes valBLSPubKey) view returns((bool,address,uint256,(bool,uint256))) -func (_Vanillaregistryv2 *Vanillaregistryv2Session) GetStakedValidator(valBLSPubKey []byte) (IVanillaRegistryV2StakedValidator, error) { - return _Vanillaregistryv2.Contract.GetStakedValidator(&_Vanillaregistryv2.CallOpts, valBLSPubKey) -} - -// GetStakedValidator is a free data retrieval call binding the contract method 0x1fc7c7c8. -// -// Solidity: function getStakedValidator(bytes valBLSPubKey) view returns((bool,address,uint256,(bool,uint256))) -func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) GetStakedValidator(valBLSPubKey []byte) (IVanillaRegistryV2StakedValidator, error) { - return _Vanillaregistryv2.Contract.GetStakedValidator(&_Vanillaregistryv2.CallOpts, valBLSPubKey) -} - -// IsSlashingPayoutDue is a free data retrieval call binding the contract method 0x35fe201b. -// -// Solidity: function isSlashingPayoutDue() view returns(bool) -func (_Vanillaregistryv2 *Vanillaregistryv2Caller) IsSlashingPayoutDue(opts *bind.CallOpts) (bool, error) { - var out []interface{} - err := _Vanillaregistryv2.contract.Call(opts, &out, "isSlashingPayoutDue") - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsSlashingPayoutDue is a free data retrieval call binding the contract method 0x35fe201b. -// -// Solidity: function isSlashingPayoutDue() view returns(bool) -func (_Vanillaregistryv2 *Vanillaregistryv2Session) IsSlashingPayoutDue() (bool, error) { - return _Vanillaregistryv2.Contract.IsSlashingPayoutDue(&_Vanillaregistryv2.CallOpts) -} - -// IsSlashingPayoutDue is a free data retrieval call binding the contract method 0x35fe201b. -// -// Solidity: function isSlashingPayoutDue() view returns(bool) -func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) IsSlashingPayoutDue() (bool, error) { - return _Vanillaregistryv2.Contract.IsSlashingPayoutDue(&_Vanillaregistryv2.CallOpts) -} - -// IsUnstaking is a free data retrieval call binding the contract method 0x388a7968. -// -// Solidity: function isUnstaking(bytes valBLSPubKey) view returns(bool) -func (_Vanillaregistryv2 *Vanillaregistryv2Caller) IsUnstaking(opts *bind.CallOpts, valBLSPubKey []byte) (bool, error) { - var out []interface{} - err := _Vanillaregistryv2.contract.Call(opts, &out, "isUnstaking", valBLSPubKey) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsUnstaking is a free data retrieval call binding the contract method 0x388a7968. -// -// Solidity: function isUnstaking(bytes valBLSPubKey) view returns(bool) -func (_Vanillaregistryv2 *Vanillaregistryv2Session) IsUnstaking(valBLSPubKey []byte) (bool, error) { - return _Vanillaregistryv2.Contract.IsUnstaking(&_Vanillaregistryv2.CallOpts, valBLSPubKey) -} - -// IsUnstaking is a free data retrieval call binding the contract method 0x388a7968. -// -// Solidity: function isUnstaking(bytes valBLSPubKey) view returns(bool) -func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) IsUnstaking(valBLSPubKey []byte) (bool, error) { - return _Vanillaregistryv2.Contract.IsUnstaking(&_Vanillaregistryv2.CallOpts, valBLSPubKey) -} - -// IsValidatorOptedIn is a free data retrieval call binding the contract method 0x470b690f. -// -// Solidity: function isValidatorOptedIn(bytes valBLSPubKey) view returns(bool) -func (_Vanillaregistryv2 *Vanillaregistryv2Caller) IsValidatorOptedIn(opts *bind.CallOpts, valBLSPubKey []byte) (bool, error) { - var out []interface{} - err := _Vanillaregistryv2.contract.Call(opts, &out, "isValidatorOptedIn", valBLSPubKey) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsValidatorOptedIn is a free data retrieval call binding the contract method 0x470b690f. -// -// Solidity: function isValidatorOptedIn(bytes valBLSPubKey) view returns(bool) -func (_Vanillaregistryv2 *Vanillaregistryv2Session) IsValidatorOptedIn(valBLSPubKey []byte) (bool, error) { - return _Vanillaregistryv2.Contract.IsValidatorOptedIn(&_Vanillaregistryv2.CallOpts, valBLSPubKey) -} - -// IsValidatorOptedIn is a free data retrieval call binding the contract method 0x470b690f. -// -// Solidity: function isValidatorOptedIn(bytes valBLSPubKey) view returns(bool) -func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) IsValidatorOptedIn(valBLSPubKey []byte) (bool, error) { - return _Vanillaregistryv2.Contract.IsValidatorOptedIn(&_Vanillaregistryv2.CallOpts, valBLSPubKey) -} - -// MinStake is a free data retrieval call binding the contract method 0x375b3c0a. -// -// Solidity: function minStake() view returns(uint256) -func (_Vanillaregistryv2 *Vanillaregistryv2Caller) MinStake(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Vanillaregistryv2.contract.Call(opts, &out, "minStake") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// MinStake is a free data retrieval call binding the contract method 0x375b3c0a. -// -// Solidity: function minStake() view returns(uint256) -func (_Vanillaregistryv2 *Vanillaregistryv2Session) MinStake() (*big.Int, error) { - return _Vanillaregistryv2.Contract.MinStake(&_Vanillaregistryv2.CallOpts) -} - -// MinStake is a free data retrieval call binding the contract method 0x375b3c0a. -// -// Solidity: function minStake() view returns(uint256) -func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) MinStake() (*big.Int, error) { - return _Vanillaregistryv2.Contract.MinStake(&_Vanillaregistryv2.CallOpts) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_Vanillaregistryv2 *Vanillaregistryv2Caller) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Vanillaregistryv2.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 (_Vanillaregistryv2 *Vanillaregistryv2Session) Owner() (common.Address, error) { - return _Vanillaregistryv2.Contract.Owner(&_Vanillaregistryv2.CallOpts) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) Owner() (common.Address, error) { - return _Vanillaregistryv2.Contract.Owner(&_Vanillaregistryv2.CallOpts) -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_Vanillaregistryv2 *Vanillaregistryv2Caller) Paused(opts *bind.CallOpts) (bool, error) { - var out []interface{} - err := _Vanillaregistryv2.contract.Call(opts, &out, "paused") - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_Vanillaregistryv2 *Vanillaregistryv2Session) Paused() (bool, error) { - return _Vanillaregistryv2.Contract.Paused(&_Vanillaregistryv2.CallOpts) -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) Paused() (bool, error) { - return _Vanillaregistryv2.Contract.Paused(&_Vanillaregistryv2.CallOpts) -} - -// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. -// -// Solidity: function pendingOwner() view returns(address) -func (_Vanillaregistryv2 *Vanillaregistryv2Caller) PendingOwner(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Vanillaregistryv2.contract.Call(opts, &out, "pendingOwner") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. -// -// Solidity: function pendingOwner() view returns(address) -func (_Vanillaregistryv2 *Vanillaregistryv2Session) PendingOwner() (common.Address, error) { - return _Vanillaregistryv2.Contract.PendingOwner(&_Vanillaregistryv2.CallOpts) -} - -// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. -// -// Solidity: function pendingOwner() view returns(address) -func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) PendingOwner() (common.Address, error) { - return _Vanillaregistryv2.Contract.PendingOwner(&_Vanillaregistryv2.CallOpts) -} - -// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. -// -// Solidity: function proxiableUUID() view returns(bytes32) -func (_Vanillaregistryv2 *Vanillaregistryv2Caller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) { - var out []interface{} - err := _Vanillaregistryv2.contract.Call(opts, &out, "proxiableUUID") - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. -// -// Solidity: function proxiableUUID() view returns(bytes32) -func (_Vanillaregistryv2 *Vanillaregistryv2Session) ProxiableUUID() ([32]byte, error) { - return _Vanillaregistryv2.Contract.ProxiableUUID(&_Vanillaregistryv2.CallOpts) -} - -// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. -// -// Solidity: function proxiableUUID() view returns(bytes32) -func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) ProxiableUUID() ([32]byte, error) { - return _Vanillaregistryv2.Contract.ProxiableUUID(&_Vanillaregistryv2.CallOpts) -} - -// SlashOracle is a free data retrieval call binding the contract method 0x38063b54. -// -// Solidity: function slashOracle() view returns(address) -func (_Vanillaregistryv2 *Vanillaregistryv2Caller) SlashOracle(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Vanillaregistryv2.contract.Call(opts, &out, "slashOracle") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// SlashOracle is a free data retrieval call binding the contract method 0x38063b54. -// -// Solidity: function slashOracle() view returns(address) -func (_Vanillaregistryv2 *Vanillaregistryv2Session) SlashOracle() (common.Address, error) { - return _Vanillaregistryv2.Contract.SlashOracle(&_Vanillaregistryv2.CallOpts) -} - -// SlashOracle is a free data retrieval call binding the contract method 0x38063b54. -// -// Solidity: function slashOracle() view returns(address) -func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) SlashOracle() (common.Address, error) { - return _Vanillaregistryv2.Contract.SlashOracle(&_Vanillaregistryv2.CallOpts) -} - -// SlashingFundsTracker is a free data retrieval call binding the contract method 0x6f0301bd. -// -// Solidity: function slashingFundsTracker() view returns(address recipient, uint256 accumulatedAmount, uint256 lastPayoutBlock, uint256 payoutPeriodBlocks) -func (_Vanillaregistryv2 *Vanillaregistryv2Caller) SlashingFundsTracker(opts *bind.CallOpts) (struct { - Recipient common.Address - AccumulatedAmount *big.Int - LastPayoutBlock *big.Int - PayoutPeriodBlocks *big.Int -}, error) { - var out []interface{} - err := _Vanillaregistryv2.contract.Call(opts, &out, "slashingFundsTracker") - - outstruct := new(struct { - Recipient common.Address - AccumulatedAmount *big.Int - LastPayoutBlock *big.Int - PayoutPeriodBlocks *big.Int - }) - if err != nil { - return *outstruct, err - } - - outstruct.Recipient = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - outstruct.AccumulatedAmount = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) - outstruct.LastPayoutBlock = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) - outstruct.PayoutPeriodBlocks = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) - - return *outstruct, err - -} - -// SlashingFundsTracker is a free data retrieval call binding the contract method 0x6f0301bd. -// -// Solidity: function slashingFundsTracker() view returns(address recipient, uint256 accumulatedAmount, uint256 lastPayoutBlock, uint256 payoutPeriodBlocks) -func (_Vanillaregistryv2 *Vanillaregistryv2Session) SlashingFundsTracker() (struct { - Recipient common.Address - AccumulatedAmount *big.Int - LastPayoutBlock *big.Int - PayoutPeriodBlocks *big.Int -}, error) { - return _Vanillaregistryv2.Contract.SlashingFundsTracker(&_Vanillaregistryv2.CallOpts) -} - -// SlashingFundsTracker is a free data retrieval call binding the contract method 0x6f0301bd. -// -// Solidity: function slashingFundsTracker() view returns(address recipient, uint256 accumulatedAmount, uint256 lastPayoutBlock, uint256 payoutPeriodBlocks) -func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) SlashingFundsTracker() (struct { - Recipient common.Address - AccumulatedAmount *big.Int - LastPayoutBlock *big.Int - PayoutPeriodBlocks *big.Int -}, error) { - return _Vanillaregistryv2.Contract.SlashingFundsTracker(&_Vanillaregistryv2.CallOpts) -} - -// StakedValidators is a free data retrieval call binding the contract method 0xfced6425. -// -// Solidity: function stakedValidators(bytes ) view returns(bool exists, address withdrawalAddress, uint256 balance, (bool,uint256) unstakeOccurrence) -func (_Vanillaregistryv2 *Vanillaregistryv2Caller) StakedValidators(opts *bind.CallOpts, arg0 []byte) (struct { - Exists bool - WithdrawalAddress common.Address - Balance *big.Int - UnstakeOccurrence BlockHeightOccurrenceOccurrence -}, error) { - var out []interface{} - err := _Vanillaregistryv2.contract.Call(opts, &out, "stakedValidators", arg0) - - outstruct := new(struct { - Exists bool - WithdrawalAddress common.Address - Balance *big.Int - UnstakeOccurrence BlockHeightOccurrenceOccurrence - }) - if err != nil { - return *outstruct, err - } - - outstruct.Exists = *abi.ConvertType(out[0], new(bool)).(*bool) - outstruct.WithdrawalAddress = *abi.ConvertType(out[1], new(common.Address)).(*common.Address) - outstruct.Balance = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) - outstruct.UnstakeOccurrence = *abi.ConvertType(out[3], new(BlockHeightOccurrenceOccurrence)).(*BlockHeightOccurrenceOccurrence) - - return *outstruct, err - -} - -// StakedValidators is a free data retrieval call binding the contract method 0xfced6425. -// -// Solidity: function stakedValidators(bytes ) view returns(bool exists, address withdrawalAddress, uint256 balance, (bool,uint256) unstakeOccurrence) -func (_Vanillaregistryv2 *Vanillaregistryv2Session) StakedValidators(arg0 []byte) (struct { - Exists bool - WithdrawalAddress common.Address - Balance *big.Int - UnstakeOccurrence BlockHeightOccurrenceOccurrence -}, error) { - return _Vanillaregistryv2.Contract.StakedValidators(&_Vanillaregistryv2.CallOpts, arg0) -} - -// StakedValidators is a free data retrieval call binding the contract method 0xfced6425. -// -// Solidity: function stakedValidators(bytes ) view returns(bool exists, address withdrawalAddress, uint256 balance, (bool,uint256) unstakeOccurrence) -func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) StakedValidators(arg0 []byte) (struct { - Exists bool - WithdrawalAddress common.Address - Balance *big.Int - UnstakeOccurrence BlockHeightOccurrenceOccurrence -}, error) { - return _Vanillaregistryv2.Contract.StakedValidators(&_Vanillaregistryv2.CallOpts, arg0) -} - -// UnstakePeriodBlocks is a free data retrieval call binding the contract method 0xc253f765. -// -// Solidity: function unstakePeriodBlocks() view returns(uint256) -func (_Vanillaregistryv2 *Vanillaregistryv2Caller) UnstakePeriodBlocks(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Vanillaregistryv2.contract.Call(opts, &out, "unstakePeriodBlocks") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// UnstakePeriodBlocks is a free data retrieval call binding the contract method 0xc253f765. -// -// Solidity: function unstakePeriodBlocks() view returns(uint256) -func (_Vanillaregistryv2 *Vanillaregistryv2Session) UnstakePeriodBlocks() (*big.Int, error) { - return _Vanillaregistryv2.Contract.UnstakePeriodBlocks(&_Vanillaregistryv2.CallOpts) -} - -// UnstakePeriodBlocks is a free data retrieval call binding the contract method 0xc253f765. -// -// Solidity: function unstakePeriodBlocks() view returns(uint256) -func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) UnstakePeriodBlocks() (*big.Int, error) { - return _Vanillaregistryv2.Contract.UnstakePeriodBlocks(&_Vanillaregistryv2.CallOpts) -} - -// WhitelistedStakers is a free data retrieval call binding the contract method 0xfdaf17f0. -// -// Solidity: function whitelistedStakers(address staker) view returns(bool whitelisted) -func (_Vanillaregistryv2 *Vanillaregistryv2Caller) WhitelistedStakers(opts *bind.CallOpts, staker common.Address) (bool, error) { - var out []interface{} - err := _Vanillaregistryv2.contract.Call(opts, &out, "whitelistedStakers", staker) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// WhitelistedStakers is a free data retrieval call binding the contract method 0xfdaf17f0. -// -// Solidity: function whitelistedStakers(address staker) view returns(bool whitelisted) -func (_Vanillaregistryv2 *Vanillaregistryv2Session) WhitelistedStakers(staker common.Address) (bool, error) { - return _Vanillaregistryv2.Contract.WhitelistedStakers(&_Vanillaregistryv2.CallOpts, staker) -} - -// WhitelistedStakers is a free data retrieval call binding the contract method 0xfdaf17f0. -// -// Solidity: function whitelistedStakers(address staker) view returns(bool whitelisted) -func (_Vanillaregistryv2 *Vanillaregistryv2CallerSession) WhitelistedStakers(staker common.Address) (bool, error) { - return _Vanillaregistryv2.Contract.WhitelistedStakers(&_Vanillaregistryv2.CallOpts, staker) -} - -// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. -// -// Solidity: function acceptOwnership() returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Vanillaregistryv2.contract.Transact(opts, "acceptOwnership") -} - -// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. -// -// Solidity: function acceptOwnership() returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Session) AcceptOwnership() (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.AcceptOwnership(&_Vanillaregistryv2.TransactOpts) -} - -// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. -// -// Solidity: function acceptOwnership() returns() -func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) AcceptOwnership() (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.AcceptOwnership(&_Vanillaregistryv2.TransactOpts) -} - -// AddStake is a paid mutator transaction binding the contract method 0x92afedf6. -// -// Solidity: function addStake(bytes[] blsPubKeys) payable returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) AddStake(opts *bind.TransactOpts, blsPubKeys [][]byte) (*types.Transaction, error) { - return _Vanillaregistryv2.contract.Transact(opts, "addStake", blsPubKeys) -} - -// AddStake is a paid mutator transaction binding the contract method 0x92afedf6. -// -// Solidity: function addStake(bytes[] blsPubKeys) payable returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Session) AddStake(blsPubKeys [][]byte) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.AddStake(&_Vanillaregistryv2.TransactOpts, blsPubKeys) -} - -// AddStake is a paid mutator transaction binding the contract method 0x92afedf6. -// -// Solidity: function addStake(bytes[] blsPubKeys) payable returns() -func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) AddStake(blsPubKeys [][]byte) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.AddStake(&_Vanillaregistryv2.TransactOpts, blsPubKeys) -} - -// ClaimForceWithdrawnFunds is a paid mutator transaction binding the contract method 0xf55690fd. -// -// Solidity: function claimForceWithdrawnFunds() returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) ClaimForceWithdrawnFunds(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Vanillaregistryv2.contract.Transact(opts, "claimForceWithdrawnFunds") -} - -// ClaimForceWithdrawnFunds is a paid mutator transaction binding the contract method 0xf55690fd. -// -// Solidity: function claimForceWithdrawnFunds() returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Session) ClaimForceWithdrawnFunds() (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.ClaimForceWithdrawnFunds(&_Vanillaregistryv2.TransactOpts) -} - -// ClaimForceWithdrawnFunds is a paid mutator transaction binding the contract method 0xf55690fd. -// -// Solidity: function claimForceWithdrawnFunds() returns() -func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) ClaimForceWithdrawnFunds() (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.ClaimForceWithdrawnFunds(&_Vanillaregistryv2.TransactOpts) -} - -// DelegateStake is a paid mutator transaction binding the contract method 0x4b7952b3. -// -// Solidity: function delegateStake(bytes[] blsPubKeys, address withdrawalAddress) payable returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) DelegateStake(opts *bind.TransactOpts, blsPubKeys [][]byte, withdrawalAddress common.Address) (*types.Transaction, error) { - return _Vanillaregistryv2.contract.Transact(opts, "delegateStake", blsPubKeys, withdrawalAddress) -} - -// DelegateStake is a paid mutator transaction binding the contract method 0x4b7952b3. -// -// Solidity: function delegateStake(bytes[] blsPubKeys, address withdrawalAddress) payable returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Session) DelegateStake(blsPubKeys [][]byte, withdrawalAddress common.Address) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.DelegateStake(&_Vanillaregistryv2.TransactOpts, blsPubKeys, withdrawalAddress) -} - -// DelegateStake is a paid mutator transaction binding the contract method 0x4b7952b3. -// -// Solidity: function delegateStake(bytes[] blsPubKeys, address withdrawalAddress) payable returns() -func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) DelegateStake(blsPubKeys [][]byte, withdrawalAddress common.Address) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.DelegateStake(&_Vanillaregistryv2.TransactOpts, blsPubKeys, withdrawalAddress) -} - -// ForceWithdrawalAsOwner is a paid mutator transaction binding the contract method 0x7cadea98. -// -// Solidity: function forceWithdrawalAsOwner(bytes[] blsPubKeys, address withdrawalAddress) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) ForceWithdrawalAsOwner(opts *bind.TransactOpts, blsPubKeys [][]byte, withdrawalAddress common.Address) (*types.Transaction, error) { - return _Vanillaregistryv2.contract.Transact(opts, "forceWithdrawalAsOwner", blsPubKeys, withdrawalAddress) -} - -// ForceWithdrawalAsOwner is a paid mutator transaction binding the contract method 0x7cadea98. -// -// Solidity: function forceWithdrawalAsOwner(bytes[] blsPubKeys, address withdrawalAddress) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Session) ForceWithdrawalAsOwner(blsPubKeys [][]byte, withdrawalAddress common.Address) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.ForceWithdrawalAsOwner(&_Vanillaregistryv2.TransactOpts, blsPubKeys, withdrawalAddress) -} - -// ForceWithdrawalAsOwner is a paid mutator transaction binding the contract method 0x7cadea98. -// -// Solidity: function forceWithdrawalAsOwner(bytes[] blsPubKeys, address withdrawalAddress) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) ForceWithdrawalAsOwner(blsPubKeys [][]byte, withdrawalAddress common.Address) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.ForceWithdrawalAsOwner(&_Vanillaregistryv2.TransactOpts, blsPubKeys, withdrawalAddress) -} - -// Initialize is a paid mutator transaction binding the contract method 0xacfb89fd. -// -// Solidity: function initialize(uint256 _minStake, address _slashOracle, address _slashReceiver, uint256 _unstakePeriodBlocks, uint256 _slashingPayoutPeriodBlocks, address _owner) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) Initialize(opts *bind.TransactOpts, _minStake *big.Int, _slashOracle common.Address, _slashReceiver common.Address, _unstakePeriodBlocks *big.Int, _slashingPayoutPeriodBlocks *big.Int, _owner common.Address) (*types.Transaction, error) { - return _Vanillaregistryv2.contract.Transact(opts, "initialize", _minStake, _slashOracle, _slashReceiver, _unstakePeriodBlocks, _slashingPayoutPeriodBlocks, _owner) -} - -// Initialize is a paid mutator transaction binding the contract method 0xacfb89fd. -// -// Solidity: function initialize(uint256 _minStake, address _slashOracle, address _slashReceiver, uint256 _unstakePeriodBlocks, uint256 _slashingPayoutPeriodBlocks, address _owner) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Session) Initialize(_minStake *big.Int, _slashOracle common.Address, _slashReceiver common.Address, _unstakePeriodBlocks *big.Int, _slashingPayoutPeriodBlocks *big.Int, _owner common.Address) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.Initialize(&_Vanillaregistryv2.TransactOpts, _minStake, _slashOracle, _slashReceiver, _unstakePeriodBlocks, _slashingPayoutPeriodBlocks, _owner) -} - -// Initialize is a paid mutator transaction binding the contract method 0xacfb89fd. -// -// Solidity: function initialize(uint256 _minStake, address _slashOracle, address _slashReceiver, uint256 _unstakePeriodBlocks, uint256 _slashingPayoutPeriodBlocks, address _owner) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) Initialize(_minStake *big.Int, _slashOracle common.Address, _slashReceiver common.Address, _unstakePeriodBlocks *big.Int, _slashingPayoutPeriodBlocks *big.Int, _owner common.Address) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.Initialize(&_Vanillaregistryv2.TransactOpts, _minStake, _slashOracle, _slashReceiver, _unstakePeriodBlocks, _slashingPayoutPeriodBlocks, _owner) -} - -// ManuallyTransferSlashingFunds is a paid mutator transaction binding the contract method 0xa1d694eb. -// -// Solidity: function manuallyTransferSlashingFunds() returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) ManuallyTransferSlashingFunds(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Vanillaregistryv2.contract.Transact(opts, "manuallyTransferSlashingFunds") -} - -// ManuallyTransferSlashingFunds is a paid mutator transaction binding the contract method 0xa1d694eb. -// -// Solidity: function manuallyTransferSlashingFunds() returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Session) ManuallyTransferSlashingFunds() (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.ManuallyTransferSlashingFunds(&_Vanillaregistryv2.TransactOpts) -} - -// ManuallyTransferSlashingFunds is a paid mutator transaction binding the contract method 0xa1d694eb. -// -// Solidity: function manuallyTransferSlashingFunds() returns() -func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) ManuallyTransferSlashingFunds() (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.ManuallyTransferSlashingFunds(&_Vanillaregistryv2.TransactOpts) -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Vanillaregistryv2.contract.Transact(opts, "pause") -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Session) Pause() (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.Pause(&_Vanillaregistryv2.TransactOpts) -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns() -func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) Pause() (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.Pause(&_Vanillaregistryv2.TransactOpts) -} - -// RemoveWhitelistedStakers is a paid mutator transaction binding the contract method 0x5158c9fa. -// -// Solidity: function removeWhitelistedStakers(address[] stakers) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) RemoveWhitelistedStakers(opts *bind.TransactOpts, stakers []common.Address) (*types.Transaction, error) { - return _Vanillaregistryv2.contract.Transact(opts, "removeWhitelistedStakers", stakers) -} - -// RemoveWhitelistedStakers is a paid mutator transaction binding the contract method 0x5158c9fa. -// -// Solidity: function removeWhitelistedStakers(address[] stakers) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Session) RemoveWhitelistedStakers(stakers []common.Address) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.RemoveWhitelistedStakers(&_Vanillaregistryv2.TransactOpts, stakers) -} - -// RemoveWhitelistedStakers is a paid mutator transaction binding the contract method 0x5158c9fa. -// -// Solidity: function removeWhitelistedStakers(address[] stakers) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) RemoveWhitelistedStakers(stakers []common.Address) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.RemoveWhitelistedStakers(&_Vanillaregistryv2.TransactOpts, stakers) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Vanillaregistryv2.contract.Transact(opts, "renounceOwnership") -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Session) RenounceOwnership() (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.RenounceOwnership(&_Vanillaregistryv2.TransactOpts) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) RenounceOwnership() (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.RenounceOwnership(&_Vanillaregistryv2.TransactOpts) -} - -// SetMinStake is a paid mutator transaction binding the contract method 0x8c80fd90. -// -// Solidity: function setMinStake(uint256 newMinStake) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) SetMinStake(opts *bind.TransactOpts, newMinStake *big.Int) (*types.Transaction, error) { - return _Vanillaregistryv2.contract.Transact(opts, "setMinStake", newMinStake) -} - -// SetMinStake is a paid mutator transaction binding the contract method 0x8c80fd90. -// -// Solidity: function setMinStake(uint256 newMinStake) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Session) SetMinStake(newMinStake *big.Int) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.SetMinStake(&_Vanillaregistryv2.TransactOpts, newMinStake) -} - -// SetMinStake is a paid mutator transaction binding the contract method 0x8c80fd90. -// -// Solidity: function setMinStake(uint256 newMinStake) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) SetMinStake(newMinStake *big.Int) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.SetMinStake(&_Vanillaregistryv2.TransactOpts, newMinStake) -} - -// SetSlashOracle is a paid mutator transaction binding the contract method 0x370baff6. -// -// Solidity: function setSlashOracle(address newSlashOracle) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) SetSlashOracle(opts *bind.TransactOpts, newSlashOracle common.Address) (*types.Transaction, error) { - return _Vanillaregistryv2.contract.Transact(opts, "setSlashOracle", newSlashOracle) -} - -// SetSlashOracle is a paid mutator transaction binding the contract method 0x370baff6. -// -// Solidity: function setSlashOracle(address newSlashOracle) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Session) SetSlashOracle(newSlashOracle common.Address) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.SetSlashOracle(&_Vanillaregistryv2.TransactOpts, newSlashOracle) -} - -// SetSlashOracle is a paid mutator transaction binding the contract method 0x370baff6. -// -// Solidity: function setSlashOracle(address newSlashOracle) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) SetSlashOracle(newSlashOracle common.Address) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.SetSlashOracle(&_Vanillaregistryv2.TransactOpts, newSlashOracle) -} - -// SetSlashReceiver is a paid mutator transaction binding the contract method 0x1a6933d5. -// -// Solidity: function setSlashReceiver(address newSlashReceiver) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) SetSlashReceiver(opts *bind.TransactOpts, newSlashReceiver common.Address) (*types.Transaction, error) { - return _Vanillaregistryv2.contract.Transact(opts, "setSlashReceiver", newSlashReceiver) -} - -// SetSlashReceiver is a paid mutator transaction binding the contract method 0x1a6933d5. -// -// Solidity: function setSlashReceiver(address newSlashReceiver) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Session) SetSlashReceiver(newSlashReceiver common.Address) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.SetSlashReceiver(&_Vanillaregistryv2.TransactOpts, newSlashReceiver) -} - -// SetSlashReceiver is a paid mutator transaction binding the contract method 0x1a6933d5. -// -// Solidity: function setSlashReceiver(address newSlashReceiver) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) SetSlashReceiver(newSlashReceiver common.Address) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.SetSlashReceiver(&_Vanillaregistryv2.TransactOpts, newSlashReceiver) -} - -// SetSlashingPayoutPeriodBlocks is a paid mutator transaction binding the contract method 0xc4828f6b. -// -// Solidity: function setSlashingPayoutPeriodBlocks(uint256 newSlashingPayoutPeriodBlocks) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) SetSlashingPayoutPeriodBlocks(opts *bind.TransactOpts, newSlashingPayoutPeriodBlocks *big.Int) (*types.Transaction, error) { - return _Vanillaregistryv2.contract.Transact(opts, "setSlashingPayoutPeriodBlocks", newSlashingPayoutPeriodBlocks) -} - -// SetSlashingPayoutPeriodBlocks is a paid mutator transaction binding the contract method 0xc4828f6b. -// -// Solidity: function setSlashingPayoutPeriodBlocks(uint256 newSlashingPayoutPeriodBlocks) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Session) SetSlashingPayoutPeriodBlocks(newSlashingPayoutPeriodBlocks *big.Int) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.SetSlashingPayoutPeriodBlocks(&_Vanillaregistryv2.TransactOpts, newSlashingPayoutPeriodBlocks) -} - -// SetSlashingPayoutPeriodBlocks is a paid mutator transaction binding the contract method 0xc4828f6b. -// -// Solidity: function setSlashingPayoutPeriodBlocks(uint256 newSlashingPayoutPeriodBlocks) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) SetSlashingPayoutPeriodBlocks(newSlashingPayoutPeriodBlocks *big.Int) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.SetSlashingPayoutPeriodBlocks(&_Vanillaregistryv2.TransactOpts, newSlashingPayoutPeriodBlocks) -} - -// SetUnstakePeriodBlocks is a paid mutator transaction binding the contract method 0xbc325c59. -// -// Solidity: function setUnstakePeriodBlocks(uint256 newUnstakePeriodBlocks) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) SetUnstakePeriodBlocks(opts *bind.TransactOpts, newUnstakePeriodBlocks *big.Int) (*types.Transaction, error) { - return _Vanillaregistryv2.contract.Transact(opts, "setUnstakePeriodBlocks", newUnstakePeriodBlocks) -} - -// SetUnstakePeriodBlocks is a paid mutator transaction binding the contract method 0xbc325c59. -// -// Solidity: function setUnstakePeriodBlocks(uint256 newUnstakePeriodBlocks) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Session) SetUnstakePeriodBlocks(newUnstakePeriodBlocks *big.Int) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.SetUnstakePeriodBlocks(&_Vanillaregistryv2.TransactOpts, newUnstakePeriodBlocks) -} - -// SetUnstakePeriodBlocks is a paid mutator transaction binding the contract method 0xbc325c59. -// -// Solidity: function setUnstakePeriodBlocks(uint256 newUnstakePeriodBlocks) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) SetUnstakePeriodBlocks(newUnstakePeriodBlocks *big.Int) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.SetUnstakePeriodBlocks(&_Vanillaregistryv2.TransactOpts, newUnstakePeriodBlocks) -} - -// Slash is a paid mutator transaction binding the contract method 0x7aa7dc14. -// -// Solidity: function slash(bytes[] blsPubKeys, bool payoutIfDue) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) Slash(opts *bind.TransactOpts, blsPubKeys [][]byte, payoutIfDue bool) (*types.Transaction, error) { - return _Vanillaregistryv2.contract.Transact(opts, "slash", blsPubKeys, payoutIfDue) -} - -// Slash is a paid mutator transaction binding the contract method 0x7aa7dc14. -// -// Solidity: function slash(bytes[] blsPubKeys, bool payoutIfDue) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Session) Slash(blsPubKeys [][]byte, payoutIfDue bool) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.Slash(&_Vanillaregistryv2.TransactOpts, blsPubKeys, payoutIfDue) -} - -// Slash is a paid mutator transaction binding the contract method 0x7aa7dc14. -// -// Solidity: function slash(bytes[] blsPubKeys, bool payoutIfDue) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) Slash(blsPubKeys [][]byte, payoutIfDue bool) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.Slash(&_Vanillaregistryv2.TransactOpts, blsPubKeys, payoutIfDue) -} - -// Stake is a paid mutator transaction binding the contract method 0x7299e0e6. -// -// Solidity: function stake(bytes[] blsPubKeys) payable returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) Stake(opts *bind.TransactOpts, blsPubKeys [][]byte) (*types.Transaction, error) { - return _Vanillaregistryv2.contract.Transact(opts, "stake", blsPubKeys) -} - -// Stake is a paid mutator transaction binding the contract method 0x7299e0e6. -// -// Solidity: function stake(bytes[] blsPubKeys) payable returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Session) Stake(blsPubKeys [][]byte) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.Stake(&_Vanillaregistryv2.TransactOpts, blsPubKeys) -} - -// Stake is a paid mutator transaction binding the contract method 0x7299e0e6. -// -// Solidity: function stake(bytes[] blsPubKeys) payable returns() -func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) Stake(blsPubKeys [][]byte) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.Stake(&_Vanillaregistryv2.TransactOpts, blsPubKeys) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { - return _Vanillaregistryv2.contract.Transact(opts, "transferOwnership", newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Session) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.TransferOwnership(&_Vanillaregistryv2.TransactOpts, newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.TransferOwnership(&_Vanillaregistryv2.TransactOpts, newOwner) -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Vanillaregistryv2.contract.Transact(opts, "unpause") -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Session) Unpause() (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.Unpause(&_Vanillaregistryv2.TransactOpts) -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns() -func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) Unpause() (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.Unpause(&_Vanillaregistryv2.TransactOpts) -} - -// Unstake is a paid mutator transaction binding the contract method 0xc08a2081. -// -// Solidity: function unstake(bytes[] blsPubKeys) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) Unstake(opts *bind.TransactOpts, blsPubKeys [][]byte) (*types.Transaction, error) { - return _Vanillaregistryv2.contract.Transact(opts, "unstake", blsPubKeys) -} - -// Unstake is a paid mutator transaction binding the contract method 0xc08a2081. -// -// Solidity: function unstake(bytes[] blsPubKeys) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Session) Unstake(blsPubKeys [][]byte) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.Unstake(&_Vanillaregistryv2.TransactOpts, blsPubKeys) -} - -// Unstake is a paid mutator transaction binding the contract method 0xc08a2081. -// -// Solidity: function unstake(bytes[] blsPubKeys) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) Unstake(blsPubKeys [][]byte) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.Unstake(&_Vanillaregistryv2.TransactOpts, blsPubKeys) -} - -// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. -// -// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) { - return _Vanillaregistryv2.contract.Transact(opts, "upgradeToAndCall", newImplementation, data) -} - -// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. -// -// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Session) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.UpgradeToAndCall(&_Vanillaregistryv2.TransactOpts, newImplementation, data) -} - -// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. -// -// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() -func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.UpgradeToAndCall(&_Vanillaregistryv2.TransactOpts, newImplementation, data) -} - -// WhitelistStakers is a paid mutator transaction binding the contract method 0x95ebffdb. -// -// Solidity: function whitelistStakers(address[] stakers) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) WhitelistStakers(opts *bind.TransactOpts, stakers []common.Address) (*types.Transaction, error) { - return _Vanillaregistryv2.contract.Transact(opts, "whitelistStakers", stakers) -} - -// WhitelistStakers is a paid mutator transaction binding the contract method 0x95ebffdb. -// -// Solidity: function whitelistStakers(address[] stakers) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Session) WhitelistStakers(stakers []common.Address) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.WhitelistStakers(&_Vanillaregistryv2.TransactOpts, stakers) -} - -// WhitelistStakers is a paid mutator transaction binding the contract method 0x95ebffdb. -// -// Solidity: function whitelistStakers(address[] stakers) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) WhitelistStakers(stakers []common.Address) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.WhitelistStakers(&_Vanillaregistryv2.TransactOpts, stakers) -} - -// Withdraw is a paid mutator transaction binding the contract method 0xdcb1edcb. -// -// Solidity: function withdraw(bytes[] blsPubKeys) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) Withdraw(opts *bind.TransactOpts, blsPubKeys [][]byte) (*types.Transaction, error) { - return _Vanillaregistryv2.contract.Transact(opts, "withdraw", blsPubKeys) -} - -// Withdraw is a paid mutator transaction binding the contract method 0xdcb1edcb. -// -// Solidity: function withdraw(bytes[] blsPubKeys) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Session) Withdraw(blsPubKeys [][]byte) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.Withdraw(&_Vanillaregistryv2.TransactOpts, blsPubKeys) -} - -// Withdraw is a paid mutator transaction binding the contract method 0xdcb1edcb. -// -// Solidity: function withdraw(bytes[] blsPubKeys) returns() -func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) Withdraw(blsPubKeys [][]byte) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.Withdraw(&_Vanillaregistryv2.TransactOpts, blsPubKeys) -} - -// Fallback is a paid mutator transaction binding the contract fallback function. -// -// Solidity: fallback() payable returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) { - return _Vanillaregistryv2.contract.RawTransact(opts, calldata) -} - -// Fallback is a paid mutator transaction binding the contract fallback function. -// -// Solidity: fallback() payable returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Session) Fallback(calldata []byte) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.Fallback(&_Vanillaregistryv2.TransactOpts, calldata) -} - -// Fallback is a paid mutator transaction binding the contract fallback function. -// -// Solidity: fallback() payable returns() -func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) Fallback(calldata []byte) (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.Fallback(&_Vanillaregistryv2.TransactOpts, calldata) -} - -// Receive is a paid mutator transaction binding the contract receive function. -// -// Solidity: receive() payable returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Transactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Vanillaregistryv2.contract.RawTransact(opts, nil) // calldata is disallowed for receive function -} - -// Receive is a paid mutator transaction binding the contract receive function. -// -// Solidity: receive() payable returns() -func (_Vanillaregistryv2 *Vanillaregistryv2Session) Receive() (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.Receive(&_Vanillaregistryv2.TransactOpts) -} - -// Receive is a paid mutator transaction binding the contract receive function. -// -// Solidity: receive() payable returns() -func (_Vanillaregistryv2 *Vanillaregistryv2TransactorSession) Receive() (*types.Transaction, error) { - return _Vanillaregistryv2.Contract.Receive(&_Vanillaregistryv2.TransactOpts) -} - -// Vanillaregistryv2FeeTransferIterator is returned from FilterFeeTransfer and is used to iterate over the raw logs and unpacked data for FeeTransfer events raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2FeeTransferIterator struct { - Event *Vanillaregistryv2FeeTransfer // 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 *Vanillaregistryv2FeeTransferIterator) 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(Vanillaregistryv2FeeTransfer) - 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(Vanillaregistryv2FeeTransfer) - 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 *Vanillaregistryv2FeeTransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *Vanillaregistryv2FeeTransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// Vanillaregistryv2FeeTransfer represents a FeeTransfer event raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2FeeTransfer struct { - Amount *big.Int - Recipient common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterFeeTransfer is a free log retrieval operation binding the contract event 0x445bb6587d6cd09e272a0d1e5179e772b547dbf1041b6163f86bb62e86f25031. -// -// Solidity: event FeeTransfer(uint256 amount, address indexed recipient) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterFeeTransfer(opts *bind.FilterOpts, recipient []common.Address) (*Vanillaregistryv2FeeTransferIterator, error) { - - var recipientRule []interface{} - for _, recipientItem := range recipient { - recipientRule = append(recipientRule, recipientItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "FeeTransfer", recipientRule) - if err != nil { - return nil, err - } - return &Vanillaregistryv2FeeTransferIterator{contract: _Vanillaregistryv2.contract, event: "FeeTransfer", logs: logs, sub: sub}, nil -} - -// WatchFeeTransfer is a free log subscription operation binding the contract event 0x445bb6587d6cd09e272a0d1e5179e772b547dbf1041b6163f86bb62e86f25031. -// -// Solidity: event FeeTransfer(uint256 amount, address indexed recipient) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchFeeTransfer(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2FeeTransfer, recipient []common.Address) (event.Subscription, error) { - - var recipientRule []interface{} - for _, recipientItem := range recipient { - recipientRule = append(recipientRule, recipientItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "FeeTransfer", recipientRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(Vanillaregistryv2FeeTransfer) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "FeeTransfer", 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 -} - -// ParseFeeTransfer is a log parse operation binding the contract event 0x445bb6587d6cd09e272a0d1e5179e772b547dbf1041b6163f86bb62e86f25031. -// -// Solidity: event FeeTransfer(uint256 amount, address indexed recipient) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseFeeTransfer(log types.Log) (*Vanillaregistryv2FeeTransfer, error) { - event := new(Vanillaregistryv2FeeTransfer) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "FeeTransfer", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// Vanillaregistryv2InitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2InitializedIterator struct { - Event *Vanillaregistryv2Initialized // 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 *Vanillaregistryv2InitializedIterator) 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(Vanillaregistryv2Initialized) - 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(Vanillaregistryv2Initialized) - 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 *Vanillaregistryv2InitializedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *Vanillaregistryv2InitializedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// Vanillaregistryv2Initialized represents a Initialized event raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2Initialized struct { - Version uint64 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterInitialized is a free log retrieval operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. -// -// Solidity: event Initialized(uint64 version) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterInitialized(opts *bind.FilterOpts) (*Vanillaregistryv2InitializedIterator, error) { - - logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "Initialized") - if err != nil { - return nil, err - } - return &Vanillaregistryv2InitializedIterator{contract: _Vanillaregistryv2.contract, event: "Initialized", logs: logs, sub: sub}, nil -} - -// WatchInitialized is a free log subscription operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. -// -// Solidity: event Initialized(uint64 version) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2Initialized) (event.Subscription, error) { - - logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "Initialized") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(Vanillaregistryv2Initialized) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "Initialized", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseInitialized is a log parse operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. -// -// Solidity: event Initialized(uint64 version) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseInitialized(log types.Log) (*Vanillaregistryv2Initialized, error) { - event := new(Vanillaregistryv2Initialized) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "Initialized", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// Vanillaregistryv2MinStakeSetIterator is returned from FilterMinStakeSet and is used to iterate over the raw logs and unpacked data for MinStakeSet events raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2MinStakeSetIterator struct { - Event *Vanillaregistryv2MinStakeSet // 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 *Vanillaregistryv2MinStakeSetIterator) 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(Vanillaregistryv2MinStakeSet) - 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(Vanillaregistryv2MinStakeSet) - 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 *Vanillaregistryv2MinStakeSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *Vanillaregistryv2MinStakeSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// Vanillaregistryv2MinStakeSet represents a MinStakeSet event raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2MinStakeSet struct { - MsgSender common.Address - NewMinStake *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterMinStakeSet is a free log retrieval operation binding the contract event 0xbd0f06c543aec7980853f7cb191dff311f0ef977570d34683aacc97e33b3f301. -// -// Solidity: event MinStakeSet(address indexed msgSender, uint256 newMinStake) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterMinStakeSet(opts *bind.FilterOpts, msgSender []common.Address) (*Vanillaregistryv2MinStakeSetIterator, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "MinStakeSet", msgSenderRule) - if err != nil { - return nil, err - } - return &Vanillaregistryv2MinStakeSetIterator{contract: _Vanillaregistryv2.contract, event: "MinStakeSet", logs: logs, sub: sub}, nil -} - -// WatchMinStakeSet is a free log subscription operation binding the contract event 0xbd0f06c543aec7980853f7cb191dff311f0ef977570d34683aacc97e33b3f301. -// -// Solidity: event MinStakeSet(address indexed msgSender, uint256 newMinStake) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchMinStakeSet(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2MinStakeSet, msgSender []common.Address) (event.Subscription, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "MinStakeSet", msgSenderRule) - 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(Vanillaregistryv2MinStakeSet) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "MinStakeSet", 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 -} - -// ParseMinStakeSet is a log parse operation binding the contract event 0xbd0f06c543aec7980853f7cb191dff311f0ef977570d34683aacc97e33b3f301. -// -// Solidity: event MinStakeSet(address indexed msgSender, uint256 newMinStake) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseMinStakeSet(log types.Log) (*Vanillaregistryv2MinStakeSet, error) { - event := new(Vanillaregistryv2MinStakeSet) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "MinStakeSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// Vanillaregistryv2OwnershipTransferStartedIterator is returned from FilterOwnershipTransferStarted and is used to iterate over the raw logs and unpacked data for OwnershipTransferStarted events raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2OwnershipTransferStartedIterator struct { - Event *Vanillaregistryv2OwnershipTransferStarted // 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 *Vanillaregistryv2OwnershipTransferStartedIterator) 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(Vanillaregistryv2OwnershipTransferStarted) - 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(Vanillaregistryv2OwnershipTransferStarted) - 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 *Vanillaregistryv2OwnershipTransferStartedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *Vanillaregistryv2OwnershipTransferStartedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// Vanillaregistryv2OwnershipTransferStarted represents a OwnershipTransferStarted event raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2OwnershipTransferStarted struct { - PreviousOwner common.Address - NewOwner common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterOwnershipTransferStarted is a free log retrieval operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. -// -// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterOwnershipTransferStarted(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*Vanillaregistryv2OwnershipTransferStartedIterator, 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 := _Vanillaregistryv2.contract.FilterLogs(opts, "OwnershipTransferStarted", previousOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return &Vanillaregistryv2OwnershipTransferStartedIterator{contract: _Vanillaregistryv2.contract, event: "OwnershipTransferStarted", logs: logs, sub: sub}, nil -} - -// WatchOwnershipTransferStarted is a free log subscription operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. -// -// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchOwnershipTransferStarted(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2OwnershipTransferStarted, 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 := _Vanillaregistryv2.contract.WatchLogs(opts, "OwnershipTransferStarted", 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(Vanillaregistryv2OwnershipTransferStarted) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "OwnershipTransferStarted", 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 -} - -// ParseOwnershipTransferStarted is a log parse operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. -// -// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseOwnershipTransferStarted(log types.Log) (*Vanillaregistryv2OwnershipTransferStarted, error) { - event := new(Vanillaregistryv2OwnershipTransferStarted) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "OwnershipTransferStarted", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// Vanillaregistryv2OwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2OwnershipTransferredIterator struct { - Event *Vanillaregistryv2OwnershipTransferred // 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 *Vanillaregistryv2OwnershipTransferredIterator) 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(Vanillaregistryv2OwnershipTransferred) - 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(Vanillaregistryv2OwnershipTransferred) - 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 *Vanillaregistryv2OwnershipTransferredIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *Vanillaregistryv2OwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// Vanillaregistryv2OwnershipTransferred represents a OwnershipTransferred event raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2OwnershipTransferred 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 (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*Vanillaregistryv2OwnershipTransferredIterator, 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 := _Vanillaregistryv2.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return &Vanillaregistryv2OwnershipTransferredIterator{contract: _Vanillaregistryv2.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 (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2OwnershipTransferred, 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 := _Vanillaregistryv2.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(Vanillaregistryv2OwnershipTransferred) - if err := _Vanillaregistryv2.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 (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseOwnershipTransferred(log types.Log) (*Vanillaregistryv2OwnershipTransferred, error) { - event := new(Vanillaregistryv2OwnershipTransferred) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// Vanillaregistryv2PausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2PausedIterator struct { - Event *Vanillaregistryv2Paused // 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 *Vanillaregistryv2PausedIterator) 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(Vanillaregistryv2Paused) - 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(Vanillaregistryv2Paused) - 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 *Vanillaregistryv2PausedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *Vanillaregistryv2PausedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// Vanillaregistryv2Paused represents a Paused event raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2Paused struct { - Account common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. -// -// Solidity: event Paused(address account) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterPaused(opts *bind.FilterOpts) (*Vanillaregistryv2PausedIterator, error) { - - logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "Paused") - if err != nil { - return nil, err - } - return &Vanillaregistryv2PausedIterator{contract: _Vanillaregistryv2.contract, event: "Paused", logs: logs, sub: sub}, nil -} - -// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. -// -// Solidity: event Paused(address account) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2Paused) (event.Subscription, error) { - - logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "Paused") - 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(Vanillaregistryv2Paused) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "Paused", 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 -} - -// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. -// -// Solidity: event Paused(address account) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParsePaused(log types.Log) (*Vanillaregistryv2Paused, error) { - event := new(Vanillaregistryv2Paused) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "Paused", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// Vanillaregistryv2SlashOracleSetIterator is returned from FilterSlashOracleSet and is used to iterate over the raw logs and unpacked data for SlashOracleSet events raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2SlashOracleSetIterator struct { - Event *Vanillaregistryv2SlashOracleSet // 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 *Vanillaregistryv2SlashOracleSetIterator) 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(Vanillaregistryv2SlashOracleSet) - 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(Vanillaregistryv2SlashOracleSet) - 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 *Vanillaregistryv2SlashOracleSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *Vanillaregistryv2SlashOracleSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// Vanillaregistryv2SlashOracleSet represents a SlashOracleSet event raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2SlashOracleSet struct { - MsgSender common.Address - NewSlashOracle common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSlashOracleSet is a free log retrieval operation binding the contract event 0x5b8cc95f72c2f7fba20ba3e60c77062f56cc5a2f3cba5aeaddee4c51812d27ea. -// -// Solidity: event SlashOracleSet(address indexed msgSender, address newSlashOracle) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterSlashOracleSet(opts *bind.FilterOpts, msgSender []common.Address) (*Vanillaregistryv2SlashOracleSetIterator, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "SlashOracleSet", msgSenderRule) - if err != nil { - return nil, err - } - return &Vanillaregistryv2SlashOracleSetIterator{contract: _Vanillaregistryv2.contract, event: "SlashOracleSet", logs: logs, sub: sub}, nil -} - -// WatchSlashOracleSet is a free log subscription operation binding the contract event 0x5b8cc95f72c2f7fba20ba3e60c77062f56cc5a2f3cba5aeaddee4c51812d27ea. -// -// Solidity: event SlashOracleSet(address indexed msgSender, address newSlashOracle) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchSlashOracleSet(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2SlashOracleSet, msgSender []common.Address) (event.Subscription, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "SlashOracleSet", msgSenderRule) - 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(Vanillaregistryv2SlashOracleSet) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "SlashOracleSet", 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 -} - -// ParseSlashOracleSet is a log parse operation binding the contract event 0x5b8cc95f72c2f7fba20ba3e60c77062f56cc5a2f3cba5aeaddee4c51812d27ea. -// -// Solidity: event SlashOracleSet(address indexed msgSender, address newSlashOracle) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseSlashOracleSet(log types.Log) (*Vanillaregistryv2SlashOracleSet, error) { - event := new(Vanillaregistryv2SlashOracleSet) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "SlashOracleSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// Vanillaregistryv2SlashReceiverSetIterator is returned from FilterSlashReceiverSet and is used to iterate over the raw logs and unpacked data for SlashReceiverSet events raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2SlashReceiverSetIterator struct { - Event *Vanillaregistryv2SlashReceiverSet // 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 *Vanillaregistryv2SlashReceiverSetIterator) 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(Vanillaregistryv2SlashReceiverSet) - 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(Vanillaregistryv2SlashReceiverSet) - 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 *Vanillaregistryv2SlashReceiverSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *Vanillaregistryv2SlashReceiverSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// Vanillaregistryv2SlashReceiverSet represents a SlashReceiverSet event raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2SlashReceiverSet struct { - MsgSender common.Address - NewSlashReceiver common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSlashReceiverSet is a free log retrieval operation binding the contract event 0xf7f99ea479b331e341a35cdf347f232a35dd611f889867759df261eeb540770a. -// -// Solidity: event SlashReceiverSet(address indexed msgSender, address newSlashReceiver) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterSlashReceiverSet(opts *bind.FilterOpts, msgSender []common.Address) (*Vanillaregistryv2SlashReceiverSetIterator, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "SlashReceiverSet", msgSenderRule) - if err != nil { - return nil, err - } - return &Vanillaregistryv2SlashReceiverSetIterator{contract: _Vanillaregistryv2.contract, event: "SlashReceiverSet", logs: logs, sub: sub}, nil -} - -// WatchSlashReceiverSet is a free log subscription operation binding the contract event 0xf7f99ea479b331e341a35cdf347f232a35dd611f889867759df261eeb540770a. -// -// Solidity: event SlashReceiverSet(address indexed msgSender, address newSlashReceiver) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchSlashReceiverSet(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2SlashReceiverSet, msgSender []common.Address) (event.Subscription, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "SlashReceiverSet", msgSenderRule) - 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(Vanillaregistryv2SlashReceiverSet) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "SlashReceiverSet", 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 -} - -// ParseSlashReceiverSet is a log parse operation binding the contract event 0xf7f99ea479b331e341a35cdf347f232a35dd611f889867759df261eeb540770a. -// -// Solidity: event SlashReceiverSet(address indexed msgSender, address newSlashReceiver) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseSlashReceiverSet(log types.Log) (*Vanillaregistryv2SlashReceiverSet, error) { - event := new(Vanillaregistryv2SlashReceiverSet) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "SlashReceiverSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// Vanillaregistryv2SlashedIterator is returned from FilterSlashed and is used to iterate over the raw logs and unpacked data for Slashed events raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2SlashedIterator struct { - Event *Vanillaregistryv2Slashed // 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 *Vanillaregistryv2SlashedIterator) 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(Vanillaregistryv2Slashed) - 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(Vanillaregistryv2Slashed) - 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 *Vanillaregistryv2SlashedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *Vanillaregistryv2SlashedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// Vanillaregistryv2Slashed represents a Slashed event raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2Slashed struct { - MsgSender common.Address - SlashReceiver common.Address - WithdrawalAddress common.Address - ValBLSPubKey []byte - Amount *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSlashed is a free log retrieval operation binding the contract event 0xf15b8630ce764d5dbcfaaa9843c3e5fcdb460aaaa46d7dc3ff4f19ca4096fc07. -// -// Solidity: event Slashed(address indexed msgSender, address indexed slashReceiver, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterSlashed(opts *bind.FilterOpts, msgSender []common.Address, slashReceiver []common.Address, withdrawalAddress []common.Address) (*Vanillaregistryv2SlashedIterator, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - var slashReceiverRule []interface{} - for _, slashReceiverItem := range slashReceiver { - slashReceiverRule = append(slashReceiverRule, slashReceiverItem) - } - var withdrawalAddressRule []interface{} - for _, withdrawalAddressItem := range withdrawalAddress { - withdrawalAddressRule = append(withdrawalAddressRule, withdrawalAddressItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "Slashed", msgSenderRule, slashReceiverRule, withdrawalAddressRule) - if err != nil { - return nil, err - } - return &Vanillaregistryv2SlashedIterator{contract: _Vanillaregistryv2.contract, event: "Slashed", logs: logs, sub: sub}, nil -} - -// WatchSlashed is a free log subscription operation binding the contract event 0xf15b8630ce764d5dbcfaaa9843c3e5fcdb460aaaa46d7dc3ff4f19ca4096fc07. -// -// Solidity: event Slashed(address indexed msgSender, address indexed slashReceiver, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchSlashed(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2Slashed, msgSender []common.Address, slashReceiver []common.Address, withdrawalAddress []common.Address) (event.Subscription, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - var slashReceiverRule []interface{} - for _, slashReceiverItem := range slashReceiver { - slashReceiverRule = append(slashReceiverRule, slashReceiverItem) - } - var withdrawalAddressRule []interface{} - for _, withdrawalAddressItem := range withdrawalAddress { - withdrawalAddressRule = append(withdrawalAddressRule, withdrawalAddressItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "Slashed", msgSenderRule, slashReceiverRule, withdrawalAddressRule) - 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(Vanillaregistryv2Slashed) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "Slashed", 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 -} - -// ParseSlashed is a log parse operation binding the contract event 0xf15b8630ce764d5dbcfaaa9843c3e5fcdb460aaaa46d7dc3ff4f19ca4096fc07. -// -// Solidity: event Slashed(address indexed msgSender, address indexed slashReceiver, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseSlashed(log types.Log) (*Vanillaregistryv2Slashed, error) { - event := new(Vanillaregistryv2Slashed) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "Slashed", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// Vanillaregistryv2SlashingPayoutPeriodBlocksSetIterator is returned from FilterSlashingPayoutPeriodBlocksSet and is used to iterate over the raw logs and unpacked data for SlashingPayoutPeriodBlocksSet events raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2SlashingPayoutPeriodBlocksSetIterator struct { - Event *Vanillaregistryv2SlashingPayoutPeriodBlocksSet // 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 *Vanillaregistryv2SlashingPayoutPeriodBlocksSetIterator) 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(Vanillaregistryv2SlashingPayoutPeriodBlocksSet) - 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(Vanillaregistryv2SlashingPayoutPeriodBlocksSet) - 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 *Vanillaregistryv2SlashingPayoutPeriodBlocksSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *Vanillaregistryv2SlashingPayoutPeriodBlocksSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// Vanillaregistryv2SlashingPayoutPeriodBlocksSet represents a SlashingPayoutPeriodBlocksSet event raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2SlashingPayoutPeriodBlocksSet struct { - MsgSender common.Address - NewSlashingPayoutPeriodBlocks *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSlashingPayoutPeriodBlocksSet is a free log retrieval operation binding the contract event 0x537af662b191583a2538de843160914f46fd6033598c645efd5f9ac3cb3f650e. -// -// Solidity: event SlashingPayoutPeriodBlocksSet(address indexed msgSender, uint256 newSlashingPayoutPeriodBlocks) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterSlashingPayoutPeriodBlocksSet(opts *bind.FilterOpts, msgSender []common.Address) (*Vanillaregistryv2SlashingPayoutPeriodBlocksSetIterator, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "SlashingPayoutPeriodBlocksSet", msgSenderRule) - if err != nil { - return nil, err - } - return &Vanillaregistryv2SlashingPayoutPeriodBlocksSetIterator{contract: _Vanillaregistryv2.contract, event: "SlashingPayoutPeriodBlocksSet", logs: logs, sub: sub}, nil -} - -// WatchSlashingPayoutPeriodBlocksSet is a free log subscription operation binding the contract event 0x537af662b191583a2538de843160914f46fd6033598c645efd5f9ac3cb3f650e. -// -// Solidity: event SlashingPayoutPeriodBlocksSet(address indexed msgSender, uint256 newSlashingPayoutPeriodBlocks) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchSlashingPayoutPeriodBlocksSet(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2SlashingPayoutPeriodBlocksSet, msgSender []common.Address) (event.Subscription, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "SlashingPayoutPeriodBlocksSet", msgSenderRule) - 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(Vanillaregistryv2SlashingPayoutPeriodBlocksSet) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "SlashingPayoutPeriodBlocksSet", 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 -} - -// ParseSlashingPayoutPeriodBlocksSet is a log parse operation binding the contract event 0x537af662b191583a2538de843160914f46fd6033598c645efd5f9ac3cb3f650e. -// -// Solidity: event SlashingPayoutPeriodBlocksSet(address indexed msgSender, uint256 newSlashingPayoutPeriodBlocks) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseSlashingPayoutPeriodBlocksSet(log types.Log) (*Vanillaregistryv2SlashingPayoutPeriodBlocksSet, error) { - event := new(Vanillaregistryv2SlashingPayoutPeriodBlocksSet) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "SlashingPayoutPeriodBlocksSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// Vanillaregistryv2StakeAddedIterator is returned from FilterStakeAdded and is used to iterate over the raw logs and unpacked data for StakeAdded events raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2StakeAddedIterator struct { - Event *Vanillaregistryv2StakeAdded // 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 *Vanillaregistryv2StakeAddedIterator) 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(Vanillaregistryv2StakeAdded) - 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(Vanillaregistryv2StakeAdded) - 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 *Vanillaregistryv2StakeAddedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *Vanillaregistryv2StakeAddedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// Vanillaregistryv2StakeAdded represents a StakeAdded event raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2StakeAdded struct { - MsgSender common.Address - WithdrawalAddress common.Address - ValBLSPubKey []byte - Amount *big.Int - NewBalance *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterStakeAdded is a free log retrieval operation binding the contract event 0xb01516cc7ddda8b10127c714474503b38a75b9afa8a4e4b9da306e61181980c7. -// -// Solidity: event StakeAdded(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount, uint256 newBalance) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterStakeAdded(opts *bind.FilterOpts, msgSender []common.Address, withdrawalAddress []common.Address) (*Vanillaregistryv2StakeAddedIterator, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - var withdrawalAddressRule []interface{} - for _, withdrawalAddressItem := range withdrawalAddress { - withdrawalAddressRule = append(withdrawalAddressRule, withdrawalAddressItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "StakeAdded", msgSenderRule, withdrawalAddressRule) - if err != nil { - return nil, err - } - return &Vanillaregistryv2StakeAddedIterator{contract: _Vanillaregistryv2.contract, event: "StakeAdded", logs: logs, sub: sub}, nil -} - -// WatchStakeAdded is a free log subscription operation binding the contract event 0xb01516cc7ddda8b10127c714474503b38a75b9afa8a4e4b9da306e61181980c7. -// -// Solidity: event StakeAdded(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount, uint256 newBalance) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchStakeAdded(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2StakeAdded, msgSender []common.Address, withdrawalAddress []common.Address) (event.Subscription, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - var withdrawalAddressRule []interface{} - for _, withdrawalAddressItem := range withdrawalAddress { - withdrawalAddressRule = append(withdrawalAddressRule, withdrawalAddressItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "StakeAdded", msgSenderRule, withdrawalAddressRule) - 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(Vanillaregistryv2StakeAdded) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "StakeAdded", 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 -} - -// ParseStakeAdded is a log parse operation binding the contract event 0xb01516cc7ddda8b10127c714474503b38a75b9afa8a4e4b9da306e61181980c7. -// -// Solidity: event StakeAdded(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount, uint256 newBalance) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseStakeAdded(log types.Log) (*Vanillaregistryv2StakeAdded, error) { - event := new(Vanillaregistryv2StakeAdded) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "StakeAdded", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// Vanillaregistryv2StakeWithdrawnIterator is returned from FilterStakeWithdrawn and is used to iterate over the raw logs and unpacked data for StakeWithdrawn events raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2StakeWithdrawnIterator struct { - Event *Vanillaregistryv2StakeWithdrawn // 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 *Vanillaregistryv2StakeWithdrawnIterator) 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(Vanillaregistryv2StakeWithdrawn) - 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(Vanillaregistryv2StakeWithdrawn) - 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 *Vanillaregistryv2StakeWithdrawnIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *Vanillaregistryv2StakeWithdrawnIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// Vanillaregistryv2StakeWithdrawn represents a StakeWithdrawn event raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2StakeWithdrawn struct { - MsgSender common.Address - WithdrawalAddress common.Address - ValBLSPubKey []byte - Amount *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterStakeWithdrawn is a free log retrieval operation binding the contract event 0x3ff0f1758b0b95c72d1f781b732306588b99dabb298fec793499eb8803b05465. -// -// Solidity: event StakeWithdrawn(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterStakeWithdrawn(opts *bind.FilterOpts, msgSender []common.Address, withdrawalAddress []common.Address) (*Vanillaregistryv2StakeWithdrawnIterator, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - var withdrawalAddressRule []interface{} - for _, withdrawalAddressItem := range withdrawalAddress { - withdrawalAddressRule = append(withdrawalAddressRule, withdrawalAddressItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "StakeWithdrawn", msgSenderRule, withdrawalAddressRule) - if err != nil { - return nil, err - } - return &Vanillaregistryv2StakeWithdrawnIterator{contract: _Vanillaregistryv2.contract, event: "StakeWithdrawn", logs: logs, sub: sub}, nil -} - -// WatchStakeWithdrawn is a free log subscription operation binding the contract event 0x3ff0f1758b0b95c72d1f781b732306588b99dabb298fec793499eb8803b05465. -// -// Solidity: event StakeWithdrawn(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchStakeWithdrawn(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2StakeWithdrawn, msgSender []common.Address, withdrawalAddress []common.Address) (event.Subscription, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - var withdrawalAddressRule []interface{} - for _, withdrawalAddressItem := range withdrawalAddress { - withdrawalAddressRule = append(withdrawalAddressRule, withdrawalAddressItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "StakeWithdrawn", msgSenderRule, withdrawalAddressRule) - 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(Vanillaregistryv2StakeWithdrawn) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "StakeWithdrawn", 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 -} - -// ParseStakeWithdrawn is a log parse operation binding the contract event 0x3ff0f1758b0b95c72d1f781b732306588b99dabb298fec793499eb8803b05465. -// -// Solidity: event StakeWithdrawn(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseStakeWithdrawn(log types.Log) (*Vanillaregistryv2StakeWithdrawn, error) { - event := new(Vanillaregistryv2StakeWithdrawn) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "StakeWithdrawn", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// Vanillaregistryv2StakedIterator is returned from FilterStaked and is used to iterate over the raw logs and unpacked data for Staked events raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2StakedIterator struct { - Event *Vanillaregistryv2Staked // 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 *Vanillaregistryv2StakedIterator) 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(Vanillaregistryv2Staked) - 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(Vanillaregistryv2Staked) - 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 *Vanillaregistryv2StakedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *Vanillaregistryv2StakedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// Vanillaregistryv2Staked represents a Staked event raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2Staked struct { - MsgSender common.Address - WithdrawalAddress common.Address - ValBLSPubKey []byte - Amount *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterStaked is a free log retrieval operation binding the contract event 0x1c9a8e1c32f2ea144885ec1a1398b5d51d627f9532fb2614516322a0b8087de5. -// -// Solidity: event Staked(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterStaked(opts *bind.FilterOpts, msgSender []common.Address, withdrawalAddress []common.Address) (*Vanillaregistryv2StakedIterator, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - var withdrawalAddressRule []interface{} - for _, withdrawalAddressItem := range withdrawalAddress { - withdrawalAddressRule = append(withdrawalAddressRule, withdrawalAddressItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "Staked", msgSenderRule, withdrawalAddressRule) - if err != nil { - return nil, err - } - return &Vanillaregistryv2StakedIterator{contract: _Vanillaregistryv2.contract, event: "Staked", logs: logs, sub: sub}, nil -} - -// WatchStaked is a free log subscription operation binding the contract event 0x1c9a8e1c32f2ea144885ec1a1398b5d51d627f9532fb2614516322a0b8087de5. -// -// Solidity: event Staked(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchStaked(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2Staked, msgSender []common.Address, withdrawalAddress []common.Address) (event.Subscription, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - var withdrawalAddressRule []interface{} - for _, withdrawalAddressItem := range withdrawalAddress { - withdrawalAddressRule = append(withdrawalAddressRule, withdrawalAddressItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "Staked", msgSenderRule, withdrawalAddressRule) - 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(Vanillaregistryv2Staked) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "Staked", 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 -} - -// ParseStaked is a log parse operation binding the contract event 0x1c9a8e1c32f2ea144885ec1a1398b5d51d627f9532fb2614516322a0b8087de5. -// -// Solidity: event Staked(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseStaked(log types.Log) (*Vanillaregistryv2Staked, error) { - event := new(Vanillaregistryv2Staked) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "Staked", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// Vanillaregistryv2StakerRemovedFromWhitelistIterator is returned from FilterStakerRemovedFromWhitelist and is used to iterate over the raw logs and unpacked data for StakerRemovedFromWhitelist events raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2StakerRemovedFromWhitelistIterator struct { - Event *Vanillaregistryv2StakerRemovedFromWhitelist // 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 *Vanillaregistryv2StakerRemovedFromWhitelistIterator) 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(Vanillaregistryv2StakerRemovedFromWhitelist) - 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(Vanillaregistryv2StakerRemovedFromWhitelist) - 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 *Vanillaregistryv2StakerRemovedFromWhitelistIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *Vanillaregistryv2StakerRemovedFromWhitelistIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// Vanillaregistryv2StakerRemovedFromWhitelist represents a StakerRemovedFromWhitelist event raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2StakerRemovedFromWhitelist struct { - MsgSender common.Address - Staker common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterStakerRemovedFromWhitelist is a free log retrieval operation binding the contract event 0x79fccea9ca325c6c715589de68546a63a35425178d1a8b1436bef7f7a76087a4. -// -// Solidity: event StakerRemovedFromWhitelist(address indexed msgSender, address staker) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterStakerRemovedFromWhitelist(opts *bind.FilterOpts, msgSender []common.Address) (*Vanillaregistryv2StakerRemovedFromWhitelistIterator, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "StakerRemovedFromWhitelist", msgSenderRule) - if err != nil { - return nil, err - } - return &Vanillaregistryv2StakerRemovedFromWhitelistIterator{contract: _Vanillaregistryv2.contract, event: "StakerRemovedFromWhitelist", logs: logs, sub: sub}, nil -} - -// WatchStakerRemovedFromWhitelist is a free log subscription operation binding the contract event 0x79fccea9ca325c6c715589de68546a63a35425178d1a8b1436bef7f7a76087a4. -// -// Solidity: event StakerRemovedFromWhitelist(address indexed msgSender, address staker) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchStakerRemovedFromWhitelist(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2StakerRemovedFromWhitelist, msgSender []common.Address) (event.Subscription, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "StakerRemovedFromWhitelist", msgSenderRule) - 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(Vanillaregistryv2StakerRemovedFromWhitelist) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "StakerRemovedFromWhitelist", 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 -} - -// ParseStakerRemovedFromWhitelist is a log parse operation binding the contract event 0x79fccea9ca325c6c715589de68546a63a35425178d1a8b1436bef7f7a76087a4. -// -// Solidity: event StakerRemovedFromWhitelist(address indexed msgSender, address staker) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseStakerRemovedFromWhitelist(log types.Log) (*Vanillaregistryv2StakerRemovedFromWhitelist, error) { - event := new(Vanillaregistryv2StakerRemovedFromWhitelist) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "StakerRemovedFromWhitelist", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// Vanillaregistryv2StakerWhitelistedIterator is returned from FilterStakerWhitelisted and is used to iterate over the raw logs and unpacked data for StakerWhitelisted events raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2StakerWhitelistedIterator struct { - Event *Vanillaregistryv2StakerWhitelisted // 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 *Vanillaregistryv2StakerWhitelistedIterator) 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(Vanillaregistryv2StakerWhitelisted) - 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(Vanillaregistryv2StakerWhitelisted) - 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 *Vanillaregistryv2StakerWhitelistedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *Vanillaregistryv2StakerWhitelistedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// Vanillaregistryv2StakerWhitelisted represents a StakerWhitelisted event raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2StakerWhitelisted struct { - MsgSender common.Address - Staker common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterStakerWhitelisted is a free log retrieval operation binding the contract event 0xc94be990bcb425c41f84d9928ad9082894fb4f1f1d2508bc088d3a6a3e4059db. -// -// Solidity: event StakerWhitelisted(address indexed msgSender, address staker) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterStakerWhitelisted(opts *bind.FilterOpts, msgSender []common.Address) (*Vanillaregistryv2StakerWhitelistedIterator, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "StakerWhitelisted", msgSenderRule) - if err != nil { - return nil, err - } - return &Vanillaregistryv2StakerWhitelistedIterator{contract: _Vanillaregistryv2.contract, event: "StakerWhitelisted", logs: logs, sub: sub}, nil -} - -// WatchStakerWhitelisted is a free log subscription operation binding the contract event 0xc94be990bcb425c41f84d9928ad9082894fb4f1f1d2508bc088d3a6a3e4059db. -// -// Solidity: event StakerWhitelisted(address indexed msgSender, address staker) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchStakerWhitelisted(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2StakerWhitelisted, msgSender []common.Address) (event.Subscription, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "StakerWhitelisted", msgSenderRule) - 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(Vanillaregistryv2StakerWhitelisted) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "StakerWhitelisted", 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 -} - -// ParseStakerWhitelisted is a log parse operation binding the contract event 0xc94be990bcb425c41f84d9928ad9082894fb4f1f1d2508bc088d3a6a3e4059db. -// -// Solidity: event StakerWhitelisted(address indexed msgSender, address staker) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseStakerWhitelisted(log types.Log) (*Vanillaregistryv2StakerWhitelisted, error) { - event := new(Vanillaregistryv2StakerWhitelisted) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "StakerWhitelisted", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// Vanillaregistryv2TotalStakeWithdrawnIterator is returned from FilterTotalStakeWithdrawn and is used to iterate over the raw logs and unpacked data for TotalStakeWithdrawn events raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2TotalStakeWithdrawnIterator struct { - Event *Vanillaregistryv2TotalStakeWithdrawn // 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 *Vanillaregistryv2TotalStakeWithdrawnIterator) 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(Vanillaregistryv2TotalStakeWithdrawn) - 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(Vanillaregistryv2TotalStakeWithdrawn) - 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 *Vanillaregistryv2TotalStakeWithdrawnIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *Vanillaregistryv2TotalStakeWithdrawnIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// Vanillaregistryv2TotalStakeWithdrawn represents a TotalStakeWithdrawn event raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2TotalStakeWithdrawn struct { - MsgSender common.Address - WithdrawalAddress common.Address - TotalAmount *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTotalStakeWithdrawn is a free log retrieval operation binding the contract event 0xf0ac877c24c32b3466c3766ad66c170058d5f4ae8347c93bc5adc21b10c14cbe. -// -// Solidity: event TotalStakeWithdrawn(address indexed msgSender, address indexed withdrawalAddress, uint256 totalAmount) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterTotalStakeWithdrawn(opts *bind.FilterOpts, msgSender []common.Address, withdrawalAddress []common.Address) (*Vanillaregistryv2TotalStakeWithdrawnIterator, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - var withdrawalAddressRule []interface{} - for _, withdrawalAddressItem := range withdrawalAddress { - withdrawalAddressRule = append(withdrawalAddressRule, withdrawalAddressItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "TotalStakeWithdrawn", msgSenderRule, withdrawalAddressRule) - if err != nil { - return nil, err - } - return &Vanillaregistryv2TotalStakeWithdrawnIterator{contract: _Vanillaregistryv2.contract, event: "TotalStakeWithdrawn", logs: logs, sub: sub}, nil -} - -// WatchTotalStakeWithdrawn is a free log subscription operation binding the contract event 0xf0ac877c24c32b3466c3766ad66c170058d5f4ae8347c93bc5adc21b10c14cbe. -// -// Solidity: event TotalStakeWithdrawn(address indexed msgSender, address indexed withdrawalAddress, uint256 totalAmount) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchTotalStakeWithdrawn(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2TotalStakeWithdrawn, msgSender []common.Address, withdrawalAddress []common.Address) (event.Subscription, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - var withdrawalAddressRule []interface{} - for _, withdrawalAddressItem := range withdrawalAddress { - withdrawalAddressRule = append(withdrawalAddressRule, withdrawalAddressItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "TotalStakeWithdrawn", msgSenderRule, withdrawalAddressRule) - 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(Vanillaregistryv2TotalStakeWithdrawn) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "TotalStakeWithdrawn", 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 -} - -// ParseTotalStakeWithdrawn is a log parse operation binding the contract event 0xf0ac877c24c32b3466c3766ad66c170058d5f4ae8347c93bc5adc21b10c14cbe. -// -// Solidity: event TotalStakeWithdrawn(address indexed msgSender, address indexed withdrawalAddress, uint256 totalAmount) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseTotalStakeWithdrawn(log types.Log) (*Vanillaregistryv2TotalStakeWithdrawn, error) { - event := new(Vanillaregistryv2TotalStakeWithdrawn) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "TotalStakeWithdrawn", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// Vanillaregistryv2UnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2UnpausedIterator struct { - Event *Vanillaregistryv2Unpaused // 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 *Vanillaregistryv2UnpausedIterator) 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(Vanillaregistryv2Unpaused) - 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(Vanillaregistryv2Unpaused) - 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 *Vanillaregistryv2UnpausedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *Vanillaregistryv2UnpausedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// Vanillaregistryv2Unpaused represents a Unpaused event raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2Unpaused struct { - Account common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. -// -// Solidity: event Unpaused(address account) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterUnpaused(opts *bind.FilterOpts) (*Vanillaregistryv2UnpausedIterator, error) { - - logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "Unpaused") - if err != nil { - return nil, err - } - return &Vanillaregistryv2UnpausedIterator{contract: _Vanillaregistryv2.contract, event: "Unpaused", logs: logs, sub: sub}, nil -} - -// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. -// -// Solidity: event Unpaused(address account) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2Unpaused) (event.Subscription, error) { - - logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "Unpaused") - 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(Vanillaregistryv2Unpaused) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "Unpaused", 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 -} - -// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. -// -// Solidity: event Unpaused(address account) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseUnpaused(log types.Log) (*Vanillaregistryv2Unpaused, error) { - event := new(Vanillaregistryv2Unpaused) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "Unpaused", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// Vanillaregistryv2UnstakePeriodBlocksSetIterator is returned from FilterUnstakePeriodBlocksSet and is used to iterate over the raw logs and unpacked data for UnstakePeriodBlocksSet events raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2UnstakePeriodBlocksSetIterator struct { - Event *Vanillaregistryv2UnstakePeriodBlocksSet // 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 *Vanillaregistryv2UnstakePeriodBlocksSetIterator) 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(Vanillaregistryv2UnstakePeriodBlocksSet) - 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(Vanillaregistryv2UnstakePeriodBlocksSet) - 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 *Vanillaregistryv2UnstakePeriodBlocksSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *Vanillaregistryv2UnstakePeriodBlocksSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// Vanillaregistryv2UnstakePeriodBlocksSet represents a UnstakePeriodBlocksSet event raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2UnstakePeriodBlocksSet struct { - MsgSender common.Address - NewUnstakePeriodBlocks *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterUnstakePeriodBlocksSet is a free log retrieval operation binding the contract event 0x1c7b684565a5bbbb1e7647588e4e6cf72ffa21a25545a4385f2074132aa51613. -// -// Solidity: event UnstakePeriodBlocksSet(address indexed msgSender, uint256 newUnstakePeriodBlocks) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterUnstakePeriodBlocksSet(opts *bind.FilterOpts, msgSender []common.Address) (*Vanillaregistryv2UnstakePeriodBlocksSetIterator, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "UnstakePeriodBlocksSet", msgSenderRule) - if err != nil { - return nil, err - } - return &Vanillaregistryv2UnstakePeriodBlocksSetIterator{contract: _Vanillaregistryv2.contract, event: "UnstakePeriodBlocksSet", logs: logs, sub: sub}, nil -} - -// WatchUnstakePeriodBlocksSet is a free log subscription operation binding the contract event 0x1c7b684565a5bbbb1e7647588e4e6cf72ffa21a25545a4385f2074132aa51613. -// -// Solidity: event UnstakePeriodBlocksSet(address indexed msgSender, uint256 newUnstakePeriodBlocks) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchUnstakePeriodBlocksSet(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2UnstakePeriodBlocksSet, msgSender []common.Address) (event.Subscription, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "UnstakePeriodBlocksSet", msgSenderRule) - 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(Vanillaregistryv2UnstakePeriodBlocksSet) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "UnstakePeriodBlocksSet", 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 -} - -// ParseUnstakePeriodBlocksSet is a log parse operation binding the contract event 0x1c7b684565a5bbbb1e7647588e4e6cf72ffa21a25545a4385f2074132aa51613. -// -// Solidity: event UnstakePeriodBlocksSet(address indexed msgSender, uint256 newUnstakePeriodBlocks) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseUnstakePeriodBlocksSet(log types.Log) (*Vanillaregistryv2UnstakePeriodBlocksSet, error) { - event := new(Vanillaregistryv2UnstakePeriodBlocksSet) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "UnstakePeriodBlocksSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// Vanillaregistryv2UnstakedIterator is returned from FilterUnstaked and is used to iterate over the raw logs and unpacked data for Unstaked events raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2UnstakedIterator struct { - Event *Vanillaregistryv2Unstaked // 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 *Vanillaregistryv2UnstakedIterator) 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(Vanillaregistryv2Unstaked) - 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(Vanillaregistryv2Unstaked) - 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 *Vanillaregistryv2UnstakedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *Vanillaregistryv2UnstakedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// Vanillaregistryv2Unstaked represents a Unstaked event raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2Unstaked struct { - MsgSender common.Address - WithdrawalAddress common.Address - ValBLSPubKey []byte - Amount *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterUnstaked is a free log retrieval operation binding the contract event 0x104975b81462e4e991f38b5b4158bf402b1528cd36ac80b123aef9d06dd0e1a9. -// -// Solidity: event Unstaked(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterUnstaked(opts *bind.FilterOpts, msgSender []common.Address, withdrawalAddress []common.Address) (*Vanillaregistryv2UnstakedIterator, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - var withdrawalAddressRule []interface{} - for _, withdrawalAddressItem := range withdrawalAddress { - withdrawalAddressRule = append(withdrawalAddressRule, withdrawalAddressItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "Unstaked", msgSenderRule, withdrawalAddressRule) - if err != nil { - return nil, err - } - return &Vanillaregistryv2UnstakedIterator{contract: _Vanillaregistryv2.contract, event: "Unstaked", logs: logs, sub: sub}, nil -} - -// WatchUnstaked is a free log subscription operation binding the contract event 0x104975b81462e4e991f38b5b4158bf402b1528cd36ac80b123aef9d06dd0e1a9. -// -// Solidity: event Unstaked(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchUnstaked(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2Unstaked, msgSender []common.Address, withdrawalAddress []common.Address) (event.Subscription, error) { - - var msgSenderRule []interface{} - for _, msgSenderItem := range msgSender { - msgSenderRule = append(msgSenderRule, msgSenderItem) - } - var withdrawalAddressRule []interface{} - for _, withdrawalAddressItem := range withdrawalAddress { - withdrawalAddressRule = append(withdrawalAddressRule, withdrawalAddressItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "Unstaked", msgSenderRule, withdrawalAddressRule) - 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(Vanillaregistryv2Unstaked) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "Unstaked", 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 -} - -// ParseUnstaked is a log parse operation binding the contract event 0x104975b81462e4e991f38b5b4158bf402b1528cd36ac80b123aef9d06dd0e1a9. -// -// Solidity: event Unstaked(address indexed msgSender, address indexed withdrawalAddress, bytes valBLSPubKey, uint256 amount) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseUnstaked(log types.Log) (*Vanillaregistryv2Unstaked, error) { - event := new(Vanillaregistryv2Unstaked) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "Unstaked", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// Vanillaregistryv2UpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2UpgradedIterator struct { - Event *Vanillaregistryv2Upgraded // 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 *Vanillaregistryv2UpgradedIterator) 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(Vanillaregistryv2Upgraded) - 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(Vanillaregistryv2Upgraded) - 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 *Vanillaregistryv2UpgradedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *Vanillaregistryv2UpgradedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// Vanillaregistryv2Upgraded represents a Upgraded event raised by the Vanillaregistryv2 contract. -type Vanillaregistryv2Upgraded struct { - Implementation common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. -// -// Solidity: event Upgraded(address indexed implementation) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*Vanillaregistryv2UpgradedIterator, error) { - - var implementationRule []interface{} - for _, implementationItem := range implementation { - implementationRule = append(implementationRule, implementationItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.FilterLogs(opts, "Upgraded", implementationRule) - if err != nil { - return nil, err - } - return &Vanillaregistryv2UpgradedIterator{contract: _Vanillaregistryv2.contract, event: "Upgraded", logs: logs, sub: sub}, nil -} - -// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. -// -// Solidity: event Upgraded(address indexed implementation) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *Vanillaregistryv2Upgraded, implementation []common.Address) (event.Subscription, error) { - - var implementationRule []interface{} - for _, implementationItem := range implementation { - implementationRule = append(implementationRule, implementationItem) - } - - logs, sub, err := _Vanillaregistryv2.contract.WatchLogs(opts, "Upgraded", implementationRule) - 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(Vanillaregistryv2Upgraded) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "Upgraded", 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 -} - -// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. -// -// Solidity: event Upgraded(address indexed implementation) -func (_Vanillaregistryv2 *Vanillaregistryv2Filterer) ParseUpgraded(log types.Log) (*Vanillaregistryv2Upgraded, error) { - event := new(Vanillaregistryv2Upgraded) - if err := _Vanillaregistryv2.contract.UnpackLog(event, "Upgraded", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} diff --git a/contracts-abi/script.sh b/contracts-abi/script.sh index 0004f573e..986b865ca 100755 --- a/contracts-abi/script.sh +++ b/contracts-abi/script.sh @@ -34,9 +34,7 @@ extract_and_save_abi "$BASE_DIR/out/SettlementGateway.sol/SettlementGateway.json # Extract ABI for L1Gateway.json extract_and_save_abi "$BASE_DIR/out/L1Gateway.sol/L1Gateway.json" "$ABI_DIR/L1Gateway.abi" -extract_and_save_abi "$BASE_DIR/out/VanillaRegistry.sol/VanillaRegistry.json" "$ABI_DIR/VanillaRegistry.abi" - -extract_and_save_abi "$BASE_DIR/out/VanillaRegistryV2.sol/VanillaRegistryV2.json" "$ABI_DIR/VanillaRegistryV2.abi" +extract_and_save_abi "$BASE_DIR/out/VanillaRegistryV2.sol/VanillaRegistryV2.json" "$ABI_DIR/VanillaRegistry.abi" extract_and_save_abi "$BASE_DIR/out/BlockTracker.sol/BlockTracker.json" "$ABI_DIR/BlockTracker.abi" @@ -111,8 +109,6 @@ generate_go_code "$ABI_DIR/SettlementGateway.abi" "SettlementGateway" "settlemen # Generate Go code for L1Gateway.abi generate_go_code "$ABI_DIR/L1Gateway.abi" "L1Gateway" "l1gateway" -generate_go_code "$ABI_DIR/VanillaRegistryV2.abi" "VanillaRegistryV2" "vanillaregistryv2" - generate_go_code "$ABI_DIR/VanillaRegistry.abi" "VanillaRegistry" "vanillaregistry" generate_go_code "$ABI_DIR/BlockTracker.abi" "BlockTracker" "blocktracker" diff --git a/tools/vanilla-stake/main.go b/tools/vanilla-stake/main.go index e6e5e88e6..973c2c480 100644 --- a/tools/vanilla-stake/main.go +++ b/tools/vanilla-stake/main.go @@ -14,7 +14,7 @@ import ( "github.com/ethereum/go-ethereum/ethclient" "github.com/urfave/cli/v2" - vanillaregistry "github.com/primev/mev-commit/contracts-abi/clients/VanillaRegistryV2" + vanillaregistry "github.com/primev/mev-commit/contracts-abi/clients/VanillaRegistry" "github.com/primev/mev-commit/x/keysigner" ) @@ -114,7 +114,7 @@ func stakeVanilla(c *cli.Context) error { return fmt.Errorf("failed to get chain ID: %w", err) } - vrc, err := vanillaregistry.NewVanillaregistryv2Caller(common.HexToAddress(vanillaRegistryAddress), client) + vrc, err := vanillaregistry.NewVanillaregistryCaller(common.HexToAddress(vanillaRegistryAddress), client) if err != nil { return fmt.Errorf("failed to create Vanilla Registry caller: %w", err) } @@ -136,7 +136,7 @@ func stakeVanilla(c *cli.Context) error { return fmt.Errorf("caller %v is not whitelisted", signer.GetAddress()) } - vrt, err := vanillaregistry.NewVanillaregistryv2Transactor(common.HexToAddress(vanillaRegistryAddress), client) + vrt, err := vanillaregistry.NewVanillaregistryTransactor(common.HexToAddress(vanillaRegistryAddress), client) if err != nil { return fmt.Errorf("failed to create Vanilla Registry transactor: %w", err) } From ac58cd4379e1be8d748edaa11f95d9603877b96e Mon Sep 17 00:00:00 2001 From: owen-eth Date: Thu, 11 Dec 2025 13:16:57 -0500 Subject: [PATCH 6/6] attempted protobuf parity fix --- p2p/gen/go/bidderapi/v1/bidderapi_grpc.pb.go | 32 +++++++++---------- p2p/gen/go/debugapi/v1/debugapi_grpc.pb.go | 10 +++--- .../v1/notifications_grpc.pb.go | 6 ++-- .../go/providerapi/v1/providerapi_grpc.pb.go | 26 +++++++-------- .../validatorapi/v1/validatorapi_grpc.pb.go | 6 ++-- 5 files changed, 40 insertions(+), 40 deletions(-) diff --git a/p2p/gen/go/bidderapi/v1/bidderapi_grpc.pb.go b/p2p/gen/go/bidderapi/v1/bidderapi_grpc.pb.go index 1462cf44c..3badbf509 100644 --- a/p2p/gen/go/bidderapi/v1/bidderapi_grpc.pb.go +++ b/p2p/gen/go/bidderapi/v1/bidderapi_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 +// - protoc-gen-go-grpc v1.6.0 // - protoc (unknown) // source: bidderapi/v1/bidderapi.proto @@ -358,46 +358,46 @@ type BidderServer interface { type UnimplementedBidderServer struct{} func (UnimplementedBidderServer) SendBid(*Bid, grpc.ServerStreamingServer[Commitment]) error { - return status.Errorf(codes.Unimplemented, "method SendBid not implemented") + return status.Error(codes.Unimplemented, "method SendBid not implemented") } func (UnimplementedBidderServer) Deposit(context.Context, *DepositRequest) (*DepositResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Deposit not implemented") + return nil, status.Error(codes.Unimplemented, "method Deposit not implemented") } func (UnimplementedBidderServer) DepositEvenly(context.Context, *DepositEvenlyRequest) (*DepositEvenlyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DepositEvenly not implemented") + return nil, status.Error(codes.Unimplemented, "method DepositEvenly not implemented") } func (UnimplementedBidderServer) EnableDepositManager(context.Context, *EnableDepositManagerRequest) (*EnableDepositManagerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EnableDepositManager not implemented") + return nil, status.Error(codes.Unimplemented, "method EnableDepositManager not implemented") } func (UnimplementedBidderServer) DisableDepositManager(context.Context, *DisableDepositManagerRequest) (*DisableDepositManagerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DisableDepositManager not implemented") + return nil, status.Error(codes.Unimplemented, "method DisableDepositManager not implemented") } func (UnimplementedBidderServer) SetTargetDeposits(context.Context, *SetTargetDepositsRequest) (*SetTargetDepositsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetTargetDeposits not implemented") + return nil, status.Error(codes.Unimplemented, "method SetTargetDeposits not implemented") } func (UnimplementedBidderServer) DepositManagerStatus(context.Context, *DepositManagerStatusRequest) (*DepositManagerStatusResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DepositManagerStatus not implemented") + return nil, status.Error(codes.Unimplemented, "method DepositManagerStatus not implemented") } func (UnimplementedBidderServer) RequestWithdrawals(context.Context, *RequestWithdrawalsRequest) (*RequestWithdrawalsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RequestWithdrawals not implemented") + return nil, status.Error(codes.Unimplemented, "method RequestWithdrawals not implemented") } func (UnimplementedBidderServer) GetValidProviders(context.Context, *GetValidProvidersRequest) (*GetValidProvidersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetValidProviders not implemented") + return nil, status.Error(codes.Unimplemented, "method GetValidProviders not implemented") } func (UnimplementedBidderServer) GetDeposit(context.Context, *GetDepositRequest) (*DepositResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDeposit not implemented") + return nil, status.Error(codes.Unimplemented, "method GetDeposit not implemented") } func (UnimplementedBidderServer) GetAllDeposits(context.Context, *GetAllDepositsRequest) (*GetAllDepositsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAllDeposits not implemented") + return nil, status.Error(codes.Unimplemented, "method GetAllDeposits not implemented") } func (UnimplementedBidderServer) Withdraw(context.Context, *WithdrawRequest) (*WithdrawResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Withdraw not implemented") + return nil, status.Error(codes.Unimplemented, "method Withdraw not implemented") } func (UnimplementedBidderServer) GetBidInfo(context.Context, *GetBidInfoRequest) (*GetBidInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBidInfo not implemented") + return nil, status.Error(codes.Unimplemented, "method GetBidInfo not implemented") } func (UnimplementedBidderServer) ClaimSlashedFunds(context.Context, *EmptyMessage) (*wrapperspb.StringValue, error) { - return nil, status.Errorf(codes.Unimplemented, "method ClaimSlashedFunds not implemented") + return nil, status.Error(codes.Unimplemented, "method ClaimSlashedFunds not implemented") } func (UnimplementedBidderServer) mustEmbedUnimplementedBidderServer() {} func (UnimplementedBidderServer) testEmbeddedByValue() {} @@ -410,7 +410,7 @@ type UnsafeBidderServer interface { } func RegisterBidderServer(s grpc.ServiceRegistrar, srv BidderServer) { - // If the following call pancis, it indicates UnimplementedBidderServer was + // If the following call panics, it indicates UnimplementedBidderServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. diff --git a/p2p/gen/go/debugapi/v1/debugapi_grpc.pb.go b/p2p/gen/go/debugapi/v1/debugapi_grpc.pb.go index 20f4ffc94..fb6c80f6e 100644 --- a/p2p/gen/go/debugapi/v1/debugapi_grpc.pb.go +++ b/p2p/gen/go/debugapi/v1/debugapi_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 +// - protoc-gen-go-grpc v1.6.0 // - protoc (unknown) // source: debugapi/v1/debugapi.proto @@ -109,13 +109,13 @@ type DebugServiceServer interface { type UnimplementedDebugServiceServer struct{} func (UnimplementedDebugServiceServer) GetTopology(context.Context, *EmptyMessage) (*TopologyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTopology not implemented") + return nil, status.Error(codes.Unimplemented, "method GetTopology not implemented") } func (UnimplementedDebugServiceServer) GetPendingTransactions(context.Context, *EmptyMessage) (*PendingTransactionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPendingTransactions not implemented") + return nil, status.Error(codes.Unimplemented, "method GetPendingTransactions not implemented") } func (UnimplementedDebugServiceServer) CancelTransaction(context.Context, *CancelTransactionReq) (*CancelTransactionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CancelTransaction not implemented") + return nil, status.Error(codes.Unimplemented, "method CancelTransaction not implemented") } func (UnimplementedDebugServiceServer) mustEmbedUnimplementedDebugServiceServer() {} func (UnimplementedDebugServiceServer) testEmbeddedByValue() {} @@ -128,7 +128,7 @@ type UnsafeDebugServiceServer interface { } func RegisterDebugServiceServer(s grpc.ServiceRegistrar, srv DebugServiceServer) { - // If the following call pancis, it indicates UnimplementedDebugServiceServer was + // If the following call panics, it indicates UnimplementedDebugServiceServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. diff --git a/p2p/gen/go/notificationsapi/v1/notifications_grpc.pb.go b/p2p/gen/go/notificationsapi/v1/notifications_grpc.pb.go index e875dbaf6..b2982efc8 100644 --- a/p2p/gen/go/notificationsapi/v1/notifications_grpc.pb.go +++ b/p2p/gen/go/notificationsapi/v1/notifications_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 +// - protoc-gen-go-grpc v1.6.0 // - protoc (unknown) // source: notificationsapi/v1/notifications.proto @@ -82,7 +82,7 @@ type NotificationsServer interface { type UnimplementedNotificationsServer struct{} func (UnimplementedNotificationsServer) Subscribe(*SubscribeRequest, grpc.ServerStreamingServer[Notification]) error { - return status.Errorf(codes.Unimplemented, "method Subscribe not implemented") + return status.Error(codes.Unimplemented, "method Subscribe not implemented") } func (UnimplementedNotificationsServer) mustEmbedUnimplementedNotificationsServer() {} func (UnimplementedNotificationsServer) testEmbeddedByValue() {} @@ -95,7 +95,7 @@ type UnsafeNotificationsServer interface { } func RegisterNotificationsServer(s grpc.ServiceRegistrar, srv NotificationsServer) { - // If the following call pancis, it indicates UnimplementedNotificationsServer was + // If the following call panics, it indicates UnimplementedNotificationsServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. diff --git a/p2p/gen/go/providerapi/v1/providerapi_grpc.pb.go b/p2p/gen/go/providerapi/v1/providerapi_grpc.pb.go index 3a45c4fc3..2cd982b6a 100644 --- a/p2p/gen/go/providerapi/v1/providerapi_grpc.pb.go +++ b/p2p/gen/go/providerapi/v1/providerapi_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 +// - protoc-gen-go-grpc v1.6.0 // - protoc (unknown) // source: providerapi/v1/providerapi.proto @@ -283,37 +283,37 @@ type ProviderServer interface { type UnimplementedProviderServer struct{} func (UnimplementedProviderServer) ReceiveBids(*EmptyMessage, grpc.ServerStreamingServer[Bid]) error { - return status.Errorf(codes.Unimplemented, "method ReceiveBids not implemented") + return status.Error(codes.Unimplemented, "method ReceiveBids not implemented") } func (UnimplementedProviderServer) SendProcessedBids(grpc.ClientStreamingServer[BidResponse, EmptyMessage]) error { - return status.Errorf(codes.Unimplemented, "method SendProcessedBids not implemented") + return status.Error(codes.Unimplemented, "method SendProcessedBids not implemented") } func (UnimplementedProviderServer) Stake(context.Context, *StakeRequest) (*StakeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Stake not implemented") + return nil, status.Error(codes.Unimplemented, "method Stake not implemented") } func (UnimplementedProviderServer) GetStake(context.Context, *EmptyMessage) (*StakeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetStake not implemented") + return nil, status.Error(codes.Unimplemented, "method GetStake not implemented") } func (UnimplementedProviderServer) GetMinStake(context.Context, *EmptyMessage) (*StakeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetMinStake not implemented") + return nil, status.Error(codes.Unimplemented, "method GetMinStake not implemented") } func (UnimplementedProviderServer) WithdrawStake(context.Context, *EmptyMessage) (*WithdrawalResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method WithdrawStake not implemented") + return nil, status.Error(codes.Unimplemented, "method WithdrawStake not implemented") } func (UnimplementedProviderServer) Unstake(context.Context, *EmptyMessage) (*EmptyMessage, error) { - return nil, status.Errorf(codes.Unimplemented, "method Unstake not implemented") + return nil, status.Error(codes.Unimplemented, "method Unstake not implemented") } func (UnimplementedProviderServer) GetProviderReward(context.Context, *EmptyMessage) (*RewardResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetProviderReward not implemented") + return nil, status.Error(codes.Unimplemented, "method GetProviderReward not implemented") } func (UnimplementedProviderServer) WithdrawProviderReward(context.Context, *EmptyMessage) (*WithdrawalResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method WithdrawProviderReward not implemented") + return nil, status.Error(codes.Unimplemented, "method WithdrawProviderReward not implemented") } func (UnimplementedProviderServer) GetCommitmentInfo(context.Context, *GetCommitmentInfoRequest) (*CommitmentInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetCommitmentInfo not implemented") + return nil, status.Error(codes.Unimplemented, "method GetCommitmentInfo not implemented") } func (UnimplementedProviderServer) GetDecryptedTransaction(context.Context, *GetDecryptedTransactionRequest) (*GetDecryptedTransactionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDecryptedTransaction not implemented") + return nil, status.Error(codes.Unimplemented, "method GetDecryptedTransaction not implemented") } func (UnimplementedProviderServer) mustEmbedUnimplementedProviderServer() {} func (UnimplementedProviderServer) testEmbeddedByValue() {} @@ -326,7 +326,7 @@ type UnsafeProviderServer interface { } func RegisterProviderServer(s grpc.ServiceRegistrar, srv ProviderServer) { - // If the following call pancis, it indicates UnimplementedProviderServer was + // If the following call panics, it indicates UnimplementedProviderServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. diff --git a/p2p/gen/go/validatorapi/v1/validatorapi_grpc.pb.go b/p2p/gen/go/validatorapi/v1/validatorapi_grpc.pb.go index 7346eb264..0f6e17675 100644 --- a/p2p/gen/go/validatorapi/v1/validatorapi_grpc.pb.go +++ b/p2p/gen/go/validatorapi/v1/validatorapi_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 +// - protoc-gen-go-grpc v1.6.0 // - protoc (unknown) // source: validatorapi/v1/validatorapi.proto @@ -69,7 +69,7 @@ type ValidatorServer interface { type UnimplementedValidatorServer struct{} func (UnimplementedValidatorServer) GetValidators(context.Context, *GetValidatorsRequest) (*GetValidatorsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetValidators not implemented") + return nil, status.Error(codes.Unimplemented, "method GetValidators not implemented") } func (UnimplementedValidatorServer) mustEmbedUnimplementedValidatorServer() {} func (UnimplementedValidatorServer) testEmbeddedByValue() {} @@ -82,7 +82,7 @@ type UnsafeValidatorServer interface { } func RegisterValidatorServer(s grpc.ServiceRegistrar, srv ValidatorServer) { - // If the following call pancis, it indicates UnimplementedValidatorServer was + // If the following call panics, it indicates UnimplementedValidatorServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O.